0001 function d = astroCalWrapper(d, plotparams, parm, field);
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
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
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
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
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
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;