shifter -- shifts and combines data frames allowing selection of good frames

shifter adds frames correcting for shifts and selecting by fwhm. It ignores junk blue data from the NBLUE option. The final file contains the count RATES, i.e. counts/sec not the total counts. Exposure times are in the header so you can switch back to counts if you prefer.

Invocation

shifter [source] ((url)/(file) first trim [(ncol nrow) twait tmax])/(flist) nsave bias (biasframe) flat (flatframe) aperture [xshift yshift] smethod [fwhm1d hwidth1d] profit ([method symm (beta) fwhm hwidth readout gain sigrej] plo phi) output

Arguments

source---Data source, either 'l' for local, 's' for server or 'u' for ucm files. 'Local' means the usual .xml and .dat files accessed directly. Do not add either .xml or .dat to the file name; these are assumed. 'u' means you will need to specify a list of files which should all be .ucm files (either with or without the extension)
url/file---If source='S', 'url' is the complete URL of the file, e.g. 'http://127.0.0.1:8007/run00000012', or just the file part in which case the program will try to find a default part to add from the environment variable ULTRACAM_DEFAULT_URL. Failing this it will add http://127.0.0.1:8007/, i.e. the local host. If source='L' then this should be plain file name without .xml or .dat
first---If source = 'S' or 'L', this is the number of the first file, starting from 1.
last---If source = 'S' or 'L', this is the number of the last file, 0 for the whole lot
trim---If source = 'S' or 'L', set trim=true to enable trimming of potential junk rows and columns of each window
ncol---If trim, then this specifies the number of columns nearest the readouts of each window to be snipped off as these can be corrupted.
nrow---If trim, then this specifies the number of rows to snip off the bottom of each window as these can be corrupted.
twait---If source = 'S' or 'L', time to wait between attempts to find a new exposure (seconds).
tmax---If source == 'S' or 'L', maximum time to wait before giving up (seconds). Set = 0 to quit as soon as a frame is not found.
flist---If source = 'U', this is the name of a list of .ucm files to read.
bias---true/false according to whether you want to subtract a bias frame. You can specify a full-frame bias because it will be cropped to match whatever your format is. This is useful for ultracam because of the different bias levels of the 6 readouts.
biasframe---If bias, then you need to specify the name of the bias frame
flat---true/false according to whether you want to flat field the data. You can specify a full-frame flat because it will be cropped to match whatever your format is. The flat will be divided into your data.
flatframe---If flat, then you need to specify the name of the flatfield
aperture---The file of apertures. You must mark the stars you want to use for determination of the shifts as 'reference' stars using the 'S' option in setaper. If any CCD has no reference stars marked, a warning will be issued and no shift applied. If you are combining data from a number of runs, this file must be the same every time. To minimise edge effects, you should try to define the aperture from a frame that represents the median position.
xshift---Initial shift in X. This is useful if the targets have shifted grossly with respect to their position when you set up the aperture file.
yshift---Initial shift in Y. This is useful if the targets have shifted grossly with respect to their position when you set up the aperture file.
smethod---Shift method. 'N' for nearest pixel, 'L' for linear interpolation in both X and Y from 4 nearest pixels. NB only simple translations are supported, no rotations or other distortions. 'N' is faster than, but not as good as 'L'. Linear interpolation is recommended unless speed is critical.
fwhm1d---FWHM for 1D search used to re-position apertures. Unbinned pixels
hwidth1d---Half-width in unbinned pixels for 1D search used to re-position apertures.
profit---yes/no for profile fits or not
method---There are two options for profile fitting: 2D Gaussian or a Moffat profile. The latter is a much better representation of seeing broadened profiles. The Gaussian can be symmetric or elliptical. The Moffat profile is of the form h/(1+(r/R)**2)**beta where r is the distance from the centre of the profile, R is a scale length and beta is a parameter that you will be prompted for an intial value. As beta gets large, the Moffat profile tends to Gaussian. The intial value of R is computed from a FWHM value. The routine plots a line at 2 times the measured FWHM on the image (not yet for the asymmetric gaussian).
symm---Yes/no for symmetric versus elliptical gaussians in the case of gaussian fits. I have not fully tested this option.
fwhm---fwhm is the initial FWHM to use for the profile fits.
hwidth---The half-width of the region to be used when fitting a target. Should be larger than the fwhm, but not so large as to include multiple targets if possible. This is also the region used to compute the maximum value that the program will report.
readout---Readout noise, RMS ADU in order for the program to come back with an uncertainty. NB It is important in this case to carry out bias subtraction if you want half-way decent error estimates.
gain---Gain, electrons/ADU, again for uncertainty estimates
sigrej---The fits can include rejection of poor pixels. This is the threshold, measured in sigma. Should not be too small as this may cause rejection of many points which can slow the routine down a fair bit as well as leading to calamity in some cases.
fdevice---Plot device for fits, specify as fdevice="" if you don't want any plots.
plo---If you fit profilesin then frames are accepted according to whether their FWHM lies in a given percentile range or not. This is the lower limit in percent.
phi---If you fit profilesin then frames are accepted according to whether their FWHM lies in a given percentile range or not. This is the upperlimit in percent
output---Name of the output frame

Classes

This command is a member of the classes: Manipulation, Reduction.

Author: T.R. Marsh
Created: 01 July 2004
Revised: 08 November 2007


Page generated Fri Jul 5 12:23:42 2013