grab grabs an ultracam run from the server or local disk and splits it up into ".ucm" files, as needed for flat field preparation etc. The files will be dumped in whichever disk this is run. One '.dat' file can generate many .ucm files. These will have names consisting of the server file name + "_001" etc. The server must be running for this program to get data from the server of course. You may experience problems defining the directory path. It is helpful to look at the messages the server produces to see where it is trying to find the files in this case. Note that grab will skip over junk data in the case of drift mode, so your first file might be number 5 say even though you asked for number 1.
Very often one ctrl-C's grab to exit it. This may well lead to the last file being corrupted. This is especially the case if it is not listed as having been written to disk and yet exists. You need to make sure that such files do not creep into file lists for using combine or whatever.
Note that you should use grab for bias subtraction when making darks because it stores the exposure time of the bias frame in the result which is needed for bias subtraction.
grab [source] (url)/(file) ndigit first (last) trim [(ncol nrow) twait tmax] skip bias (biasframe) bregion (biasregion brsigma) (threshold (photon) naccum)
|source||---||Data source, either 'l' for local or 's' for server. 'Local' means the usual .xml and .dat files accessed directly. Do not add either .xml or .dat to the file name; these are assumed.|
|url/file||---||If source='S', this should be 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', this should just be a plain file name.|
|ndigit||---||The minimum number of digits to use on output to tack on the frame number. If ndigit=0, then just enough will be used for each frame, however specifying a number > 0 has the advantage that it is then much easier to get a listing of the files in temporal order since this is also alphabetical. e.g. you will end up with files of the form run0012_001, run0012_002, etc if you set ndigit=3.|
|first||---||The first file, starting from 1. Negative numbers just grab one specific file, e.g. -10 grabs the 10th. 0 grabs the last.|
|last||---||The last file, if first > 0. last=0 will just try to grab as many as possible, otherwise it should be >= first|
|trim||---||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||---||Time to wait between attempts to find a new exposure (seconds).|
|tmax||---||Maximum time to wait before giving up (seconds). Set = 0 to quit as soon as a frame is not found.|
|skip||---||true to skip junk data at start of drift mode runs|
|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. The exposure time of the bias will be inserted into the headers of the output frames as it is needed for later dark subtraction.|
|biasframe||---||If bias, then you need to specify the name of the bias frame.|
|bregion||---||true/false depending on whether you want to subtract a constant determined from a pre-defined region of the frame (e.g. under- or over-scan) to account for drifting bias levels.|
|biasregion||---||the name of a windows file defining the region (e.g. as created with setwin)|
|brsigma||---||the rejection threshold in terms of RMS for kicking out cosmic rays.|
|threshold||---||If you are applying a bias to ULTRASPEC L3CCD data, you have the option of converting to photon counts (0 or 1 whether above or below a certain threshold).|
|photon||---||The threshold level if threshold = true|
|naccum||---||Accumulate data into the sum of naccum frames before writing to disk. If some are still accumulating at the end, they will be written out even if they have not reach 'naccum'.|
This command is a member of the classes: IO, Observing, Reduction.
Author: T.R. Marsh
Created: 06 May 2002
Revised: 07 Oct 2009