%------------------------------------------------------------------------ % NAME: qpack % % The function to read Q definition functions (QDFs). % % This function sets all on and do variables to 0 before calling % the specified QDF. A QDF shall be of the form Q = fname(Q). % Note that a QDF can call another QDF. For example, all common % settings can be defined in one QDF, and the QDF for a % particular case starts then by calling the common QDF. % % After calling the QDF, some smaller operations are performed. % So far is only the global variable REPORT_LEVEL set to the % value of Q.QP_LEVEL. % % The function can also return the verion number of Qpack if % the input argument is '-v'. The version number of Qpack is % stored/handled by the function QPACK_VERSION. % % FORMAT: Q = qpack( fname ) % or % qpack -v % % OUT: Q the Q structure % IN: fname the name of the QDF to call % OPTIONAL: - % % TEMPLATE: - %------------------------------------------------------------------------ % HISTORY: 2001.03.25 Created by Patrick Eriksson function Q = qpack( fname ) %= A special feature for version number: qpack -v % if nargin & strcmp(fname,'-v') qpack_version; return end %=== Turn off everything % Q.HSE_IN_ON = 0; Q.HSE_RETRIEVAL_ON = 0; Q.REFRACTION_ON = 0; Q.EMISSION_ON = 0; Q.ANTENNA_ON = 0; Q.DSB_ON = 0; Q.BACKEND_ON = 0; Q.BINVIEW_ON = 0; Q.BINNING_ON = 0; Q.KRED_ON = 0; Q.LRED_ON = 0; Q.CHCORR_ON = 0; Q.SPECIES_POSITIVE_ON = 0; Q.RECALC_ABS_ON = 0; Q.CLS_NONLIN_ON = 0; % Q.MEASNOISE_DO = 0; Q.CALINOISE_DO = 0; Q.TEMPERATURE_DO = 0; Q.POINTING_DO = 0; Q.POINTING_PDF = 'gaussian'; Q.CONTABS_DO = 0; Q.EGROUND_DO = 0; Q.POLYFIT_DO = 0; Q.PPOLYFIT_DO = 0; if nargin %=== Call the QDF % eval([ 'Q = ', fname, '(Q);']) %=== Set REPORT_LEVEL % global REPORT_LEVEL % REPORT_LEVEL = Q.QP_LEVEL; end