wolffd@0: function d = mirdesign(orig,argin,option,postoption,specif,type); %,nout) wolffd@0: wolffd@0: if isa(orig,'mirdesign') wolffd@0: d.method = orig.method; wolffd@0: d.argin = orig.argin; wolffd@0: d.option = orig.option; wolffd@0: d.postoption = orig.postoption; wolffd@0: d.specif = orig.specif; wolffd@0: d.type = orig.type; wolffd@0: d.frame = orig.frame; wolffd@0: d.segment = orig.segment; wolffd@0: d.chunkdecomposed = orig.chunkdecomposed; wolffd@0: d.size = orig.size; wolffd@0: d.file = orig.file; wolffd@0: d.channel = orig.channel; wolffd@0: d.sampling = orig.sampling; wolffd@0: d.resampling = orig.resampling; wolffd@0: d.nochunk = orig.nochunk; wolffd@0: d.ascending = orig.ascending; wolffd@0: d.overlap = orig.overlap; wolffd@0: d.separate = orig.separate; wolffd@0: d.chunk = orig.chunk; wolffd@0: d.eval = orig.eval; wolffd@0: d.interchunk = orig.interchunk; wolffd@0: d.acrosschunks = orig.acrosschunks; wolffd@0: d.ready = orig.ready; wolffd@0: d.struct = orig.struct; wolffd@0: d.stored = orig.stored; wolffd@0: d.index = orig.index; wolffd@0: d.tmpfile = orig.tmpfile; wolffd@0: d.tmpof = orig.tmpof; wolffd@0: else wolffd@0: d.method = orig; wolffd@0: d.argin = argin; wolffd@0: d.option = option; wolffd@0: d.postoption = postoption; wolffd@0: d.specif = specif; wolffd@0: d.type = type; wolffd@0: if ischar(argin) wolffd@0: d.frame = {}; wolffd@0: d.segment = {}; wolffd@0: d.chunkdecomposed = 0; wolffd@0: d.size = {}; wolffd@0: d.file = ''; wolffd@0: d.channel = []; wolffd@0: d.sampling = 0; wolffd@0: d.resampling = 0; wolffd@0: d.nochunk = 0; wolffd@0: if not(isempty(orig)) && ... wolffd@0: strcmp(func2str(orig),'mirenvelope') && d.option.zp == 2 wolffd@0: d.ascending = 0; wolffd@0: else wolffd@0: d.ascending = 1; wolffd@0: end wolffd@0: d.overlap = 0; wolffd@0: d.separate = 0; wolffd@0: else wolffd@0: if iscell(argin) wolffd@0: argin = argin{1}; wolffd@0: end wolffd@0: if (strcmp(func2str(orig),'mirspectrum') && d.option.alongbands) ... wolffd@0: || (isfield(specif,'nochunk') && specif.nochunk) wolffd@0: d.frame = []; wolffd@0: if isfield(d.specif,'eachchunk') wolffd@0: d.specif = rmfield(d.specif,'eachchunk'); wolffd@0: d.specif = rmfield(d.specif,'combinechunk'); wolffd@0: end wolffd@0: else wolffd@0: d.frame = argin.frame; wolffd@0: if not(isempty(d.frame)) wolffd@0: if isfield(d.specif,'extensive') wolffd@0: d.frame.dontchunk = 1; wolffd@0: % Some frame-decomposed extractor should not be evaluated wolffd@0: % chunk after chunk because the whole result is needed for wolffd@0: % subsequent computations. wolffd@0: elseif isfield(d.specif,'chunkframebefore') wolffd@0: d.frame.chunkbefore = 1; wolffd@0: end wolffd@0: end wolffd@0: end wolffd@0: d.segment = argin.segment; wolffd@0: d.chunkdecomposed = argin.chunkdecomposed; wolffd@0: d.size = argin.size; wolffd@0: d.file = argin.file; wolffd@0: d.channel = argin.channel; wolffd@0: d.sampling = argin.sampling; wolffd@0: d.resampling = argin.resampling; wolffd@0: if (isfield(specif,'nochunk') && specif.nochunk) wolffd@0: d.nochunk = 1; % was previously 2 wolffd@0: elseif not(isempty(argin.stored)) wolffd@0: % a temporary variable will be already computed. wolffd@0: d.nochunk = 2; % Flag to indicate that no chunk should be wolffd@0: % performed. Temporary variables cannot for the wolffd@0: % moment be dispatched to dependent variables wolffd@0: % chunk by chunk, but only once the whole wolffd@0: % variable has been computed. wolffd@0: else wolffd@0: d.nochunk = argin.nochunk; wolffd@0: end wolffd@0: if strcmp(func2str(orig),'mirenvelope') wolffd@0: if d.option.zp == 2 wolffd@0: d.ascending = not(isempty(d.segment)); wolffd@0: else wolffd@0: d.ascending = 1; wolffd@0: end wolffd@0: else wolffd@0: d.ascending = argin.ascending; wolffd@0: end wolffd@0: d.overlap = argin.overlap; wolffd@0: d.separate = argin.separate; wolffd@0: end wolffd@0: d.chunk = []; wolffd@0: d.eval = 0; wolffd@0: d.interchunk = []; % Data that can be passed between successive chunks during the main process. wolffd@0: d.acrosschunks = []; % Data that can be accumulated among chunks during the beforechunk process. wolffd@0: d.ready = 0; wolffd@0: d.struct = []; wolffd@0: d.stored = []; wolffd@0: d.index = NaN; wolffd@0: if not(isempty(orig)) && strcmp(func2str(orig),'mirenvelope') && ... wolffd@0: d.option.zp == 2 && isempty(d.segment) wolffd@0: % Triggers the use of temporary file for the mirenvelope computation wolffd@0: d.tmpfile.fid = 0; wolffd@0: else wolffd@0: d.tmpfile = []; wolffd@0: end wolffd@0: d.tmpof = []; wolffd@0: end wolffd@0: d = class(d,'mirdesign');