setwin is an interactive program for defining the format of multiple windows of multiple CCDs including the overall dimensions and binning factors as well as the size and locations of the windows. It can accept a window format as input and display a data frame as a guide. At its end it dumps the window format defined. If a data frame is not displayed then only terminal input is accepted. If a data frame is displayed, then the windows are forced to be compatible with the data if possible. In the case of binned data this means ensuring that the windows are 'in step'. This may be accomplished by subtracting/adding a small amount to the starting X and Y value (less than one binned pixel). This can occasionally lead to an invalid window, in which case you should re-define it. If the exact position is critical, you should re-display the windows to check that they are OK, and possibly edit the file by hand to shift the windows back a pixel or whatever. setwin does not force the new windows to be enclosed by the data windows and thus you may end up making windows that can be used by window but not crop.
setwin is little more than a front-end to the window handling classes but it is designed to only generate valid objects. Although it is possible to edit the file produced, be aware that you may put into an invalid state. It is certainly worth running setwin at least once to generate a template for editing. If you do manage to corrupt the file later you will be told about when trying to load the file.
Whatever file name you supply, a standard extension will be added if you have not already specified it. This is to distinguish the window files from others without you having to worry about it.
setwin data newfile window (numccd ncset xbin ybin nxtot nytot [device] xleft xright ylow yhigh iset ilow ihigh plow phigh)
data | --- | Name of data file to set from. This will be used for plotting and also to ensure that the windows are compatible. Enter NONE if you don't want to specify one. |
newfile | --- | true/false to determine whether the window file is to be new or not |
window | --- | Name of window file. Will be overwritten if it already exists. |
numccd | --- | If new, nccd = Number of CCDs. |
ncset | --- | Number of CCD to set |
xbin | --- | Binning factor in X, only prompted if not already set |
ybin | --- | Binning factor in Y, only prompted if not already set |
nxtot | --- | Unbinned chip X dimension, only prompted if not already set |
nytot | --- | Unbinned chip Y dimension, only prompted if not already set |
device | --- | If plot, device = plot device. |
xleft xright | --- | X range for plot |
ylow yhigh | --- | Y range for plot |
iset | --- | 'A', 'D' or 'P' for automatic, direct or percentile setting of intensity |
ilow ihigh | --- | Display range if iset='d' |
plow phigh | --- | Percentile range if iset='p' |
See also: crop, bcrop and window
This command is a member of the classes: Programs, Setup, Testing.
Author: T.R. Marsh
Created: 21 February 2001
Revised: 02 December 2006