---+ pipe_reduce_scan.m
This is where the data is cleaned and processed. Data is first sent to
pipe_loaddata to create an szd structure loaded with flux calibration data from the given Mars scan. All flags are set to zero.
An szd_log structure is created and its timestream plotted.
The szd structure is checked for optically dead channels with the flag_opticallydead.m. Any channels with an optical efficiency less than the cutoff given in szvar.noptcut are flagged. A list of unflagged channels is created and saved to szlog.channellist and if szvar.makeplots is set to '1', their timesteams are plotted.
The szd structure is then checked for glitches. Glitchy channels are flagged using flag_glitches.m and a sigma value defined by szvar.glitch_sigmacut. The list of unflagged channels is then kept in the szlog.channellist structure and the unflagged timestreams are plotted.
Then channels with high noise are flagged using flag_noisychannels. Channels with average noise above the threshold defined in szvar.noisychannel_noisecut are flagged. Channels with average noise below the noise threshold have their subscans examined. If the subscan has noise above the threshold times the subscan factor defined in szvar.noisychannel_subscanfactor then the subscan is flagged. The unflagged channels are kept in the szd.channellist structure and the unflagged timestreams are plotted.
In the final stage of the flagging process, the timestreams of data that have most of their channels flagged are flagged. The unflagged timestreams are plotted.
The next section of the pipe_reduce_scan filters the timestream data. The filtering options are selected in the szvar.tsfilter vector. The pipeline allows for any number of filtering cycles. The default is set to three. szvar.tsfilter{1} determines the method of the first cycle of filtering, szvar.tsfilter{2} determines the second and so on.
There is an option of plotting the timestream data and making a map after each filter cycle.
Finally the cleaned szd structure is sent to
pipe_makemap for a final scan map.
pipe_makelog is called to save the sz_log data and all the open figures are saved as .png files in the figures subdirectory.
--
JamesKennedy - 23 Jul 2007
This topic: APEX_SZ
> WebHome >
ApexPipeline > Pipe_reduce_scan
Topic revision: r4 - 2007-07-25 - JamesKennedy