Mscstack takes the geometrically transformed images, and "stacks" them into a single image per filter, using the values of mscscale and msczero that have been entered into the image headers by "philmatch" as intensity scaling and offset values. It also allows us to create a bad pixel mask.
PACKAGE = mscred TASK = mscstack input = @us List of images to combine output = N6822U.fits Output image (headers= ) List of header files (optional) (bpmasks= n6822u) List of bad pixel masks (optional) (rejmask= ) List of rejection masks (optional) (nrejmas= ) List of number rejected masks (optional) (expmask= ) List of exposure masks (optional) (sigmas = ) List of sigma images (optional) (combine= average) Type of combine operation (median|average) (reject = ccdclip) Type of rejection (masktyp= goodvalue) Mask type (maskval= 0.) Mask value (blank = 50000.) Value if there are no pixels (scale = !mscscale) Image scaling (zero = !msczero) Image zero point offset (weight = none) Image weights (statsec= ) Image section for computing statistics (lthresh= 1.) Lower threshold (hthresh= INDEF) Upper threshold (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= 10) ccdclip: CCD readout noise (electrons) (gain = 2.2) ccdclip: CCD gain (electrons/DN) (snoise = 0) ccdclip: Sensitivity noise (fraction) (sigscal= 0.1) Tolerance for sigma clipping scaling corrections (pclip = -0.5) pclip: Percentile clipping parameter (grow = 0.) Radius (pixels) for neighbor rejection (mode = ql)
In order to run it on a bunch of images, we execute a little script that looks something like this:
mscstack @us WLMU.fits bpmask=wlmu mscstack @bs WLMB.fits bpmask=wlmb mscstack @vs WLMV.fits bpmask=wlmv mscstack @rs WLMR.fits bpmask=wlmr mscstack @is WLMI.fits bpmask=wlmi mscstack @has WLMHA.fits bpmask=wlmha mscstack @s2s WLMS2.fits bpmask=wlms2 mscstack @o3s WLMO3.fits bpmask=wlmo3 delete dstack files WLM*.fits > dstack philtrans dstack dstack WLMUThis last step is kind of dangerous: we shift the stacked images, replacing the existing ones, so that they all line up. See the next section for more.