Terapix Star Formation Region IC 1396, © 2001 CFHT
The subsky directory and procedure for WIRCam data
Article
by CMA - Updated November 23rd, 2007

Until now, sky subtraction on WIRCam data, in first or second pass mode, has been done using a perl procedure. Up-to-date TERAPIX software versions and Fred-Linux-perl installation are required.

Waiting for more portable software, this article contains instructions about installing and using it.

The entire collection of procedures needed for WIRCam processing (as detailed in Step by step procedure to reduce WIRCam data) is also described.

The procedures to reduce WIRCam images are available on the private svn repository:

wsvn/index/private/software/subsky/.

You can download it as a tarball from the svn repository, or checkout it directly in a svn work directory using

$ svn checkout svn+ssh://terapix.iap.fr/private/software/subsky.

The directory subsky contains
-  subsky.pl: the perl script for sky subtraction.
-  config: the directory collecting the configuration files for TERAPIX software. WARNING: this directory contains all configuration files used during WIRCam processing, for processing steps strongly dependent on image properties copy them outside the SVN directory and modify them without committing.
-  c_scripts: the directory collecting C programs used in the execution of the main script and others useful during the processing chain.
-  imcopy.pl: an optional procedure to RICE-decompress images.
-  qfits.pl: an optional procedure to apply qualityFITS.
-  preparesub.pl: a perl script to flag zeroes in *s.fits image sky-subtraction, to link weight maps and external headers.
-  slistbuild.x: a shell script to prepare sub and s list from the p ones.
-  detar.x: a shell script to de-archiving qualityFITS results (if they had been produced using the do-tar option in qfits.pl).
-  qfits1.x: an example of shell script for the submission of qfits.pl using condor.
-  subsky.x: an example of shell script for the submission of subsky.pl using condor.
-  sgsep.pl: a Henry Joy McCracken perl script for star galaxy separation.
-  smmacro: a directory collecting useful SM macros; a subdirectory galaxy_counts contains galaxy counts from the literature in 2MASS-like filters. WARNING: SM macros are strongly dependent on image properties copy them outside the SVN directory and modify them without committing.


No configuration file is provided for subsky.pl.

Assuming that you downloaded the svn directory in your home directory (/home/nis/you/), you can run the script just using the command line

/home/nis/you/subsky/subsky.pl <image_list> [options]
where <image_list> is the list of images you want to subtract.

Before starting the procedure:
-  build input image list, selecting adjacent (in time and space) exposures (you can use listfile a C program available in the c_script ditrectory.);
-  if you start a second pass subtraction, link in the directory the external headers and the weight maps you used for preliminary stacking as image.head and image_weight.fits, if image.fits is the name of the image you want to subtract (you can use link.pl provided in this distribution).

Subtracted images will be called image_sub.fits

The available options are:
-  the number of input image extensions, -N or --n-exten (mandatory);
-  the number of images to use in building sky frame, -n or --n-images (mandatory);
-  the suffix of input weight maps, --inweight-suffix (optional);
-  the suffix of output weight maps, --outweight-suffix (mandatory);
-  the input bad pixel mask, -M or --mask (mandatory);
-  the detection threshold to mask out objects, --threshold (optional, default is 1.);
-  selection of second pass subtraction, --pass2;
-  stack on which masked are built, -I or --image (mandatory with pass2 option);
-  its weight map, -W or --weight (mandatory with pass2 option);
-  creation of masks disabled, --disable-mask;
-  production of sky-frame and subtraction disabled, --disable-sky;
-  selection of guide crosstalk masking, --guide-on;
-  number of parallel mask production, -T or --n-thread (optional, default is 1);
-  path for TERAPIX software configuration files, --conf-path (mandatory, to be set to /home/nis/you/subsky/config if default configuration is used);
-  path for C scripts, --script-path (mandatory, to be set to /home/nis/you/subsky/c_scripts if default path is used);
-  option to do not delete sky-frames, --debug (optional, sky-frames are deleted by default);
-  selection of VERBOSE_TYPE for TERAPIX software, --verbose (optional, default is QUIET);
-  e-mail adress to notify the end of the processing, --mail (optional).


No configuration file is provided for qfits.pl.

Assuming that you downloaded the svn directory in your home directory (/home/nis/you/), you can run the script just using the command line

/home/nis/you/subsky/qfits.pl <image_list> [options]
where <image_list> is the list of images you want to 'qfitsed'.

The available options are:

-  the suffix of input weight maps, --inweight-suffix (optional);
-  path for TERAPIX software configuration files, --conf-dir (mandatory, to be set to /home/nis/you/subsky/config if default configuration is used);
-  path for calibration images (flats and bad pixel masks), --calib-dir (mandatory);
-  selection of quality assessment on double pass subtracted images (some flags on input images are different), --pass2;
-  selection of output format in tar archive (useful only for condor submissions), --do-tar;
-  e-mail adress to notify the end of the processing, --mail (optional).


For more details and examples see the WIRCam Documentation and the step-by-step WIRCam data reduction article.


Site Map  -   -  Contact
© Terapix 2003-2011