next up previous 323
Next: Two and three bolometer chopping
Up: Sample reductions
Previous: Example reduction - long method

Example reduction - scuquick

The PERL script scuquick can be used to save time by automating the reduction process up to and including the scuphot stage. Note that if many repetitive operations are to be performed then scuquick (or any other SURF command) will take options. For example,

% scuquick -remsky
will invoke the remsky command at the appropriate position in the reduction process. A list of avialable options can be accessed by typing
% scuquick -h
 
Usage:
   scuquick [-h] [-change_flat] [-remsky] [-rebin] [-notau|tau f] [-sub s]
Options:
   -h[elp]       This message
   -quick        Run all tasks with the 'accept' flag (ie take defaults)
   -quiet        Hide all messages generated by the script (note this is 
                 not the same as using MSG_FILTER=quiet which hides messages
                 from the tasks)
   -change_flat  Run the change_flatfield task
   -remsky       Run remsky
   -rebin        Regrid the data
   -sub s        Select a specific sub-instrument (else selects all)
   -notau        Use a tau value of 0 in extinction
   -tau f        Use a constant value (f) for the tau. This is dangerous
                 when reducing data containing multiple sub-instruments
                 unless the -sub flag is used.

Notes:
   Parameters for any task can be specified on the command line
   as param=value. All other command line arguments are assumed to be
   input NDFs.

The second example uses scuquick to reduce a long integration on the radio galaxy 8C1435+635 at 450 and 850$\mu$m. Note that scuquick will reduce data from both arrays unless instructed otherwise by use of the -sub option.

This data set was obtained under moderately noisy sky conditions so sky removal will be used in an attempt to correct for the sky variations. I'll just reduce the first demodulated data file here.

% scuquick -remsky
IN - Name of input file containing demodulated data > 19970502_dem_0052
SURF: run 52 was a PHOTOM observation of object 8C1435+635
USE_CALIBRATOR - Should the data be divided by the internal calibrator /NO/ > 
SURF: file contains data for 2 switch(es) in 1 exposure(s) in 40 integration(s)
in 1 measurement(s)
SPIKE_LEVEL - De-spike level /5/ > 
OUT - Name of output file to contain reduced switch data > r52
SURF: run 52 was a PHOTOM observation of 8C1435+635
SURF: applying flatfield from photflat1.dat
 
Processing the LONG sub instrument
 
SURF: run 52 was a PHOTOM observation with JIGGLE sampling of object 8C1435+635
SURF: file contains data for 1 exposure(s) in 40 integration(s) in 1
measurement(s)
SURF: observation started at sidereal time 14 54 12.45781 and ended at 15 14
46.826715
SURF: file contains data for the following sub-instrument(s)
 - LONG with filter 850
 - SHORT with filter 450
FIRST_TAU - First zenith sky opacity measured > 0.18
FIRST_LST - Sidereal time of first opacity measurement; hh mm ss.ss > 0
SECOND_TAU - Second zenith sky opacity measured > 0.18
SECOND_LST - Sidereal time of second opacity measurement; hh mm ss.ss > 0
Extinction corrected data has been written to file r52_ext_long.sdf
SURF: run 52 was a PHOTOM observation with JIGGLE sampling of object 8C1435+635
BOLOMETERS - The Sky bolometers, [a1,a2] for an array /['d10','c16','c12',
'c2','b9','b10','b11','c5','c16','d10','e2','e3']/ > [h6,h8,h13,h14,g15,g16]
MODE - Sky removal mode /'MEAN'/ > 
ITER_SIGMA - Sigma level to drop points from mean iteratively /-1/ > 3.
CLIP - Do you wish to clip the bolometers? /NO/ > 
Sky corrected data has been written to file r52_sky_long.sdf
SURF: run 52 was a PHOTOM observation of 8C1435+635
SURF: file contains data for 1 exposure(s) in 40 integrations(s) in 1
measurement(s)
ANALYSIS - Which reduction method /'AVERAGE'/ > 
Processed photometry data written to r52_phot_long.sdf and r52_phot_long.dat
 
Processing the SHORT sub instrument

SURF: run 52 was a PHOTOM observation with JIGGLE sampling of object 8C1435+635
SURF: file contains data for 1 exposure(s) in 40 integration(s) in 1
measurement(s)
SURF: observation started at sidereal time 14 54 12.45781 and ended at 15 14
46.826715
SURF: file contains data for the following sub-instrument(s)
 - LONG with filter 850
 - SHORT with filter 450
FIRST_TAU - First zenith sky opacity measured > 1.0
FIRST_LST - Sidereal time of first opacity measurement; hh mm ss.ss > 0
SECOND_TAU - Second zenith sky opacity measured > 1.0
SECOND_LST - Sidereal time of second opacity measurement; hh mm ss.ss > 0
Extinction corrected data has been written to file r52_ext_short.sdf
SURF: run 52 was a PHOTOM observation with JIGGLE sampling of object 8C1435+635
BOLOMETERS - The Sky bolometers, [a1,a2] for an array /['h6','h8','h13','h14',
'g15','g16']/ > [d10,c16,c12,c2,b9,b10,b11,c5,c16,d10,e2,e3]
MODE - Sky removal mode /'MEAN'/ > 
ITER_SIGMA - Sigma level to drop points from mean iteratively /-1/ > 3.
CLIP - Do you wish to clip the bolometers? /NO/ > 
Sky corrected data has been written to file r52_sky_short.sdf
SURF: run 52 was a PHOTOM observation of 8C1435+635
SURF: file contains data for 1 exposure(s) in 40 integrations(s) in 1
measurement(s)
ANALYSIS - Which reduction method /'AVERAGE'/ > 
Processed photometry data written to r52_phot_short.sdf and r52_phot_short.dat

and similarly for the rest of the data after which scucat and display/despike procedures can be followed as before. Note that I took the `default' sky bolometers which correspond to the inner ring of the long-wave array in this case - in fact these are not strictly the default but rather the last combination that were used. I recommend reducing the data both with and without sky removal since under very stable conditions the signal-to-noise can be degraded by removing the sky. A useful aid is a plot of signals from the source bolometer and sky removal bolometers. There are a variety of ways of doing this: Appendix A describes how to get ascii output for any bolometer; here I'll use SURF and KAPPA commands to investigate the effects of the adopted sky removal. Firstly, we can use scuphot and scucat to write out data for all bolometers in a file - in this case observation #52 as before. I'll use the extinction corrected data because these have been processed by flatfield;

% scuphot allbols=true
IN - Name of input file containing demodulated data // > r52_ext_long
SURF: run 52 was a PHOTOM observation of 8C1435+635
SURF: file contains data for 1 exposure(s) in 40 integrations(s) in 1
measurement(s)
ANALYSIS - Which reduction method /'AVERAGE'/ > 
OUT - Name of container file to hold map and time-sequence data > r52_all
SCUPHOT: All bolometers selected
FILE - Name of ASCII file to contain results summary /!/ > r52_all.dat
% scucat
OUT - Rootname of files to contain concatenated data > r52
IN - Name of input file containing photometry data // > r52_all
SURF: Found data for the following bolometers:
g1,g2,g3,g4,g7,g8,g9,g10,g11,g13,g14,g15,g16,h1,h2,h4,h5,h6,h7,h8,h9,h10,h11,h1
2,h13,h14,h15,h16,i1,i2,i3,i4,i5,i6,i7,i8,i9
SURF: This is a PHOTOM observation of 8C1435+635. There are 40 integrations
IN - Name of input file containing photometry data /!/ >

Each bolometer now has a file called, e.g. r52_h7.sdf. The KAPPA commands add and cdiv can be used to get a mean sky value for the inner ring.

Figure: Comparison of the the signal from the central bolometer of the long-wave array with the mean signal from the six surrounding sky bolometers. Correlated sky noise is clearly seen in this case.
\begin{figure}\epsfig{angle=-90,width=6.0in,file=sc10_fig3.eps}\end{figure}

% add
IN1 - First input NDF /'r52_all'/ > r52_h6
IN2 - Second input NDF > r52_h8
OUT - Output NDF > sum
% add
IN1 - First input NDF /@sum/ > sum
IN2 - Second input NDF > r52_h13
OUT - Output NDF > sum1
% add
IN1 - First input NDF /@sum1/ > sum1
IN2 - Second input NDF > r52_h14
OUT - Output NDF > sum2
% add
IN1 - First input NDF /@sum2/ > 
IN2 - Second input NDF > r52_g15
OUT - Output NDF > sum3
% add
IN1 - First input NDF /sum3/ >
IN2 - Second input NDF > r52_g16
OUT - Output NDF > sum4
% cdiv
IN - Input NDF data structure /@sum4/ > 
SCALAR - Division constant /6/ > 
OUT - Output NDF > inner_ring
% 

and then use linplot to overlay the data (you can use e.g. lincol=red to get coloured plots),

% linplot r52_h7 device=xwindows mode=line
% linplot inner_ring device=xwindows mode=line noclear

Figure [*] shows the output from linplot which clearly shows that the signal and sky are correlated in this case.


next up previous 323
Next: Two and three bolometer chopping
Up: Sample reductions
Previous: Example reduction - long method

The SCUBA photometry cookbook
Starlink Cookbook 10
J. A. Stevens, R. J. Ivison, T. Jenness
Joint Astronomy Centre, Hilo, Hawaii
1 August 1997
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council