setreg for setting up spectroscopic extraction regions

setreg is an interactive program for defining spectroscopic extraction regions. It requires a data frame to exist. It assumes that the dispersion direction is more or less horizontal and allows the user to define Y ranges to select objects and associated sky. It does so by collapsing in the X direction and plotting the resulting profiles.

To fully specify an object you need to mark the region over which to extract it and the region which can be searched for it when re-positioning. Sky regions can only be defined with respect to an object so at least one object must have been defined. If you define more than one then you must place the cursor near whichever object you wish to attach a sky region to when adding sky regions. During extraction, to determine whether a pixel is in the sky, the sky regions are gone through in turn, so whichever one is defined last has precedence. Thus if a pixel is include in the sky in the first region defined but excluded in the third, it will be excluded unless there is a later region which includes it once more. This allows you to define a sloppy all inclusive sky and then to exclude parts of it that are no good.

Invocation

setreg [device] data newfile region nccd xleft xright ylow yhigh iset (ilow ihigh)/(plow phigh) hwidth fwhm readout gain]

Command line arguments

device---The image display device.
data---Ultracam data file.
newfile---flag to indicate that the aperture file is new.
region---Region file (new or old).
nccd---The number of the CCD to set the regions for.
xleft xright---X range to use when collapsing to make profiles
ylow yhigh---Range in Y of the frame which will be considered
iset---How to set intendity limits (i.e. the Y axis of the plots): 'a' for automatic, min to max, 'd' for direct input of range, 'p' for percentiles, probably the most useful option.
ilow ihigh---the intensity range is i1 to i2 if iset='d'
plow phigh---p1 to p2 are percentiles to set the intensity if iset = 'p'
hwidth---The half-width of the median filter applied when collapsing to make the mean profile. 0 for no median filter. Measured in binned X pixels.
fwhm---This is the fwhm of the gaussian to be used to cross-correlate with an object to measure its position. Units of binned pixels.
readout---Readout noise, RMS ADU in order for the program to come back with an uncertainty.
gain---Gain, electrons/ADU, again for uncertainty estimates

Interactive options

There are several interactive options, all single letters, which are as follows:
O(bject)---Define a new object region. You will be asked to define the region over which the object is extracted and then the region over which to search for the object when re-positioning. The latter region must enclose the former. You will be asked whether you want to measure the object's position. This will be done with gaussian cross-correlation (see fwhm etc above). It there is no object, you can elect not to attempt to measure a position, but you should realise that this may affect any later attempt to reposition the extraction apertures using the position of the object since this is carried out relative to the position measured at this stage. (This is equivalent to the use of 'skymov' for those familiar with 'pamela'.)
S(ky)---Define a new sky region which moves with an object which must be attached to an existing object region. You must have defined an object first. If you have defined more than one you will have to select the one you wish to associate the sky region with.
A(ntisky)---Define a new non-sky region which moves with an object and must be attached to an existing object region. You must have defined an object first. If you have defined more than one you will have to select the one you wish to associate the sky region with.
B(ad)---Define a region of bad sky which does not move with an object but must be attached to an existing object region. This can be used to mark out the edges of a dekker for example.
Q(uit)---Quit the program.

Classes

This command is a member of the classes: Programs, Setup, Spectra.

Author: T.R. Marsh
Created: 26 May 2006
Revised: 02 Dec 2006


Page generated Fri Jul 5 12:23:42 2013