Home > reduc > support > astroCalWrapper.m

astroCalWrapper

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function d = astroCalWrapper(d, plotparams, parm, field);

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  function d = astroCalWrapper(d, plotparams, parm, field);

    reduceData function that multiplies the total intensity channels by the
    noise diode temperature, removes the effect of the atmosphere, so the
    output is now in temperature units

    sjcm

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function d = astroCalWrapper(d, plotparams, parm, field);
0002 
0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004 %
0005 %  function d = astroCalWrapper(d, plotparams, parm, field);
0006 %
0007 %    reduceData function that multiplies the total intensity channels by the
0008 %    noise diode temperature, removes the effect of the atmosphere, so the
0009 %    output is now in temperature units
0010 %
0011 %    sjcm
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 [d,q] = logcal(d, 'astro');
0016 if (q)
0017   disp('astro has been applied');
0018   disp(' ')
0019   d=checkstatus(d);
0020   return
0021 end
0022 
0023 % check if we have all the information we need
0024 if( ~isfield(d.antenna0.receiver, 'noise'))
0025   display('Can Not calibrate, Missing noise diode temperatures');
0026   return;
0027 end
0028 if( ~isfield(d.antenna0.receiver, 'tau') )
0029   display('Can not calibrate, Missing opacities');
0030   return;
0031 end
0032 
0033 [d, q] = logcal(d, 'stokes');
0034 if(~q)
0035   display('Stokes Calculation not performed');
0036   display(' Can not calibrate');
0037   return;
0038 end
0039 
0040 % plot the interpolated values
0041 packd(d, d.flags, 'none', 'noiseInterp', plotparams, 'Interpolated Noise Diode', field);
0042 packd(d, d.flags, 'none', 'tauInterp', plotparams, 'Interpolated Opacity Plots', field);
0043 
0044 % apply the astro cal
0045 d = astrocal(d);
0046 flags = d.flags;
0047 setPlotDisplay(plotparams.plot);
0048 display('Plotting data');
0049 [d, outFlags] = packd(d, flags, 'none', 'astro', plotparams, 'Astro Cal Plots', field);
0050 d = setNewFlag(d, outFlags.new.out, 'astro');
0051 d = updateFlags(d, 1);
0052 
0053 % log that it has been applied
0054 d = logcal(d, 'astro');
0055 
0056 
0057 return;
0058 
0059 
0060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0061 function d=checkstatus(d, flags)
0062 
0063 disp('Would you like to view the plots?')
0064 
0065 if (query)
0066   d = packd(d, d.flags, 'none', 'alpha', 0, 'Alpha Plots', '');
0067 end
0068 
0069 disp(' ')
0070 
0071 return;

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005