saltbias – Create bias frame/subtract bias from images
saltbias images outimages outpref subover trim subbias crbias masterbias median function order rej_lo rej_hi niter plotover (turbo) logfile (clobber) (verbose)
String. The functional form of the fit intended to characterize the the bias structure in the ovrscan region. The user has variety of function options to choose from:
chebyshev - Chebyshev polynomial
polynomial - standard polynomial
legendre - Legendre polynomial
spline1 - linear splines
spline3 - cubic splines
If the chebyshev, legendre of spline functions are called then saltbias will use the IRAF task colbias to subtract the overscan bias from science frames and trim the images. The colbias task does not subtract a master bias and therefore a second call to saltbias will be required to subtract the master bias frame. The colbias task does not parse the best fit function back to the user, so saltbias plots will not contain the data fits. In such cases it is advisable to run colbias as a standalone tool before deciding the form of the overscan fit and debiasing all science data in batch mode using saltbias. The polynomial option does not call colbias. The overscan fitting, subtraction and trimming are performed internally by the saltbias task and master bias subtraction can be performed as part of the same procedure. It is the user’s perogative to decide which function best fits their data.
saltbias performs two separate tasks and must be called twice to perform them both. Firstly saltbias can create a master bias frame. This is typically an average of multiple bias images which have been subtracted by the row-dependent overscan level and trimmed in size by the removal of the overscan region itself. Secondly saltbias will debias science and calibration images using a combination of overscan and masterbias subtraction.
Regardless of the tools function, the input arguments are mostly identical. The user is required to supply a list of input files, formatted to the SALT standard and parsed through the task saltprepare. Output file names and their directory path are also defined by the user. If a master bias frame is to be created then the user specifies crbias=’yes’ and provides a name for the new file. All bias frames in the input list will be dedbiased using overscan charge levels and averaged to produce the master frames file, which contains four (SALICAM) or six (RSS) image extensions.
If science or calibration frames are to be debiased, the user specifies whether to fit and subtract the overscan charge level from images and/or subtract the master bias frame and/or remove the overscan region from the science image.
The user has a number of choices for the functional form of the overscan fit. If Legendre polynomials, Cebyshev polynomials or splines are required the task calls the exisiting IRAF task noao.imred.bias.colbias and applies it to to each of the HDU in the input file. Users are referred to the online colbia documentation, obtained by typing ‘help colbias’ within the PyRAF or IRAF environments. If a standard polynomial form is chosen then overscan fitting, subtraction and trimming is performed internally by the saltbias task. In both cases the location and size of the overscan region is not supplied by the user but by the keywords BIASSEC and DATASEC stored in each image HDU.
The overscan region is collapsed across the image columns to produce a row-dependent one-dimensional distribution. The fit is performed iteratively using a sigma-clipping method. After each fit, any outliers in the data above or below a user-specified threshold are removed from the distribution and the fit re-performed. Iterations continue until mo more data are rejected or the maximum number of iterations is exceeded. Final results for each fit are logged in terms of the mean overscan charge level, the root mean square of the fit residuals and the number of iterations before convergence. The best fit is then subtracted from the science area of the image, the image trimmed of the overscan region (if specified) and the master bias frame subtracted from the science image (if specified).
If a master bias frame is subtracted, saltbias checks the GAIN, ROSPEED, CCDSUM, NAXIS1 and NAXIS2 keywords in all file to ensure that CCD gain, readout speed, binning and image size settings are compatible.
Diagnostics can be plotted. For all amplifiers the task plots the row-averaged distribution of the overscan and column-averaged distribution. The average is specified by the user as the mean or median. If the overscan fit is of standard polynomial form then the best-fit is also plotted. The average pixel value of the overscan is also plotted as a function of time.
To create a master bias from a list of bias frames:
--> saltbias images='@bias.lis' outimages='' outpref='b' subover='yes'
trim='yes' subbias='no' crbias='yes' masterbias='master.fits'
median='no' function='polynomial' order=3 rej_lo=3 rej_hi=3
niter=10 plotover='yes' turbo='no' logfile='salt.log' verbose='yes'
2. To debias a list of science images using overscan data and a master bias frame:
--> saltbias images='@sci.lis' outimages='' outpref='b' subover='yes'
trim='yes' subbias='yes' crbias='no' masterbias='' median='no'
function='polynomial' order=3 rej_lo=3 rej_hi=3 niter=10
plotover='yes' turbo='no' logfile='salt.log' verbose='yes'
Individual unbinned full frame RSS image files can be 112MB in size. It is recommended to use workstations with a minimum of 512MB RAM. On a linux machine with 2.8 Ghz processor and 2 Gb of RAM, one 2051x2051 image in 1.7 sec.
Currently no error propagaion is performed through the calculations. This can occur once the saltprepare tool writes bad pixel and variance maps to raw data.
Charge can leak into the overscan regions if background counts are large. A future version of this task can combat leakage by either extracting the bias level from a subregion of the overscan, physically removed from the boundary between the overscan and the active chip region, or by fitting an asymptotic function to the overscan rows.
Send feedback and bug reports to salthelp@saao.ac.za