Spitzer Documentation & Tools
IRSCLEAN Manual

5         How to Run IRSCLEAN

 

Now that you have installed the IRSCLEAN distribution and have configured your system, you are ready to start using it to make rogue pixel masks.

5.1       General Syntax

The full calling syntax of IRSCLEAN_MASK is

 

IDL> irsclean_mask, dataFile, inRmask_File=inRmask_File,$

           [/getFmask or getFmask=1 or 2], AGGRESSIVE=aggressive,$

            noise_Floor=noise_Floor, rogue_Thresh=rogue_Thresh,

            /ABS_VAL, /NEGATIVE_ONLY, /NAN, /CampaignRMask, $

            maskFunction=maskFunction, Bmask_File=Bmask_File, bMaskVal=bMaskVal, $

            bMaskBits=bMaskBits,$

            orderMask_File=orderMask_File, /wide_OMask, /noOrderMask,$

            ORDERS=ORDERS, /peakUp,$

            outRmask_File=outRmask_File, outClean_File=outClean_File,$

            /autoSave, filesToClean=filesToClean,

            dataRange=dataRange,winSize=winSize,$

            Directory=Directory,dataRange=dataRange,$

            /noStage2, /noMaskEdit,$

            colorNames=colorNames, /HELP, _EXTRA=extra

 

NOTE: IDL is not case-sensitive. In this document we use mixed case for IDL keywords and variables solely for readability. Feel free to use all upper-case, all lower-case, or whatever case combination you like.

 

All inputs to IRSCLEAN_MASK are optional. The simplest mode of running the program is to type irsclean_mask at the IDL command line without any inputs:

 

IDL> irsclean_mask

 

If no arguments are given, the program will walk you through the required steps.  (NOTE: This is the only way of running in Virtual Machine mode.)

 

The bare-bones mask editing and data cleaning procedure consists of

 

Stage 1: Creating and Editing Masks

1.     reading in data (dataFile),

2.     reading a rogue mask if desired (inRmask_File),

3.     editing the mask (skip if /noMaskEdit is set),

4.     saving the result (outRmask_File, /autoSave),

5.     saving the cleaned version of dataFile (outClean_File, /autoSave).

 

Stage 2: Cleaning a Set of Data

      (skip if /noStage2 is set)

1.     picking a set of .fits files to clean and/or one or more list (.txt) files (filesToClean),

2.     reviewing and editing the list of files to clean,

3.     cleaning the data (output files are automatically saved).

 

Relevant keywords that control a given step are given in computer type above.  If any one of the keyword arguments is missing, you will be queried by the program.  In Virtual Machine mode, all required inputs are requested.

 

There is also the option to find rogue pixels automatically (getFmask), in which case the program does not by default ask for a rogue mask (you can still set the inRmask_File keyword; the program will read in a rogue mask and combine it with the FMASK).

 

For all filename arguments (dataFile, inRmask_File, Bmask_File, orderMask_File, outRmask_File, outClean_File, filesToClean), if you don't want to type out the file name but want to make sure that IRSCLEAN asks for a file (or set of files in the case of filesToClean), simply enter a null value for the filename and the program will ask you to browse your computer for the file(s). For parameter dataFile, enter the null string '' (two single quotes with no space in between). For keywords, use the syntax inRmask_File=''. In most cases, however, this will not be necessary, since the default is for IRSCLEAN to ask for a file if missing.  For example

 

IDL> irsclean_mask,'',inRmask_File=''

 

is the same as typing

 

IDL> irsclean_mask

 

If the getFmask option is used, however, the default is not to ask for an external rogue mask file. To force IRSCLEAN to request an external rogue mask file, the inRmask_File=’’ syntax is required.

5.2       Running the Virtual Machine Version of IRSCLEAN

For those without an IDL license, the virtual machine (VM) version of IRSCLEAN can be run from the Unix command line.  First, IDL must be downloaded from http://www.ittvis.com/ProductServices/IDL.aspx.  Running in VM mode is akin to typing “irsclean_mask” at the command line and letting the program query you for all inputs.  The syntax is as follows

 

unix% idl -vm=[path to IRSCLEAN]/irsclean_mask.sav

 

Note that there are a few features of IRSCLEAN that will not be accessible from VM mode.  The most important of these is the ability for IRSCLEAN to find a mask automatically (getFmask, Rogue_Thresh, Noise_Thresh, AGGRESSIVE, /ABS_VAL, /NEGATIVE_ONLY, ORDERS, /peakUp). The following keywords will not be changeable from their default values: Bmask_File, bMaskVal, bMaskBits, and orderMask_File. In addition, the following keywords represent functionality that is not accessible via the virtual machine: /NAN, maskFunction, /wide_OMask, /noOrderMask, winSize, Directory, colorNames, /HELP.  All other keywords have values that will be set interactively at runtime.  (Currently many NaN pixels are already fatally masked by the BMASK and those that are not will be cleaned during spectral extraction with SPICE, so there is no longer more than cosmetic benefit to the /NAN keyword).