phase folds server data on a specified period.

folder reads frames from the server and allocates them into a regular series of bins folded on a specified period. Optionally it can shift the frame to align reference targets before adding the frames in. It also multiplies the data by the sine and cosine of the phase and produces summed versions of these which can be used to see what is varying strongly on the given period. At the end of the program, the data files will be dumped to disk in the form of 'root_01', 'root_02', 'root_03', ... 'root_nbin', 'root_constant', 'root_cosine', 'root_sine', 'root_amplitude' and 'root_phase'. These can be plotted with plot. The first set are the phase binned files (zero-padded to make it easier to display them in order). Then come the sum of the files, the sum of the files times cosine, the sum times sine, and the equivalent amplitudes and phases. The phase, phi0, is defined in terms of cos(2*Pi*(phi-phi0)) and ranges from -0.5 to 0.5. The amplitude file is probably most useful if you just want to see if you are detecting something.

It is possible to add the results of multiple runs together by loading in old frames. The only condition is that you must use the same ephemeris (which will be checked). As a by-product of this program you get a shifted & summed file, but no cosmic ray checking is done I'm afraid.

If you try shifting, you have to specify an aperture file with reference stars marked. Any CCD without a reference star will be added with 0 shift. If a CCD has reference stars but they are lost because of porr conditions, all the CCDs for that exposure will be skipped.

Invocation

folder [source] ((url)/(file) first trim [(ncol nrow) twait tmax])/(flist) fussy nsave bias (biasframe) flat (flatframe) tzero period etype position (telescope) nbins root new shift (aperture [xshift yshift] smethod [fwhm1d hwidth1d])

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.
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.
fussy---If set true, frames with times flagged 'unreliable' (which may not be that bad) are booted out
nsave---Intermediate results can be saved every nsave frames. These are sent to files of the form "temp_root_" etc, following the convention above. Do not set this too small (e.g. 1) or you will slow the program down considerably, in addition to possibly encountering a singular matrix warning early on (although this is not serious). Enter 0 to not bother saving at all until the program terminates.
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
tzero---Zero point of ephemeris (days). NB It should be a Modified Julian Day, i.e. JD - 2400000.5. There are two choices of timescale; see 'etype'
period---Period of ephemeris (days)
etype---Type of ephemeris: 'BJD' for TDB corrected to the barycentre in terms of JD, 'BMJD' for the same in terms of MJD, 'HJD' and 'HMJD' the equivalents in terms of UTC corrected to the heliocentre,
position---The celestial position of the target, as required for light-travel time corrections. Should be in the form RA Dec Epoch. FK5 coordinates are assumed. The sign of the declination, whether positive or negative, must be given.
telescope---Telescope name (only if barycentric ephemeris because then it is assumed that greater accuracy is wanted). If you enter an invalid name, you will get a list of possibilities.
nbins---Number of phase bins. Can be zero in which case only the sine/cosine stuff will be carried out. The main consideration here is that for speed, all frames are kept in memory. This implies the raw data, bias and flat, the 5 frames associated with the sine/cosine stuff, and then the 'nbins' phase bins. Internally the pipeline stores data as floats, so a full frame requires ~ 12 Mbytes. Thus in full frame mode, more than 50 bins might be pushing it, depending upon the available memory.
root---Root name for storage of data files at end. See above for the names that they will have.
new---True/false according to whether the data files are new or to be read from some previously stored on disk. This option allows you to add multiple runs-worth of data. Be careful not to corrupt the files by Ctrl-C-ing during the final save. If you have accumulated a huge store of files, you may want to save a copy of them for safety every so often to avoid this possibility.
shift---True/false according to whether you want to try shifting the frame before ading them. This option requires the specification of an aperture file that must have been set up from data equivalent to that which you want to shift. The frames will all be shifted to match whichever file you set the apertures up on in the first place.
aperture---The file of apertures if shift = true. 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, no shift will be made. If you define reference stars but they get lost, a warning will be issued and the entire set of CCDs will be skipped. 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.

Classes

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

Author: T.R. Marsh
Created: 20 Aug 2002
Revised: 06 Jul 2007


Page generated Fri Jul 5 12:23:42 2013