nuMin = ((camCol - 1) * 2 + (strip == 'n' ? 1 : 0) - 6) *
at_scanSeparation;
nuMax = nuMin + at_scanSeparation;
"at_scanSeparation" is defined in the "astrotools" product, and has the
value 0.20977443333 deg.
We define the OK_SCANLINE area of a field as that portion of
the OK_RUN area which intersects the scanline.
Lines of constant great circle longitude are to high accuracy parallel to
field columns. Thus, the OK_SCANLINE region can be considered to high
approximation as a rectangle delimited by lines of constant great circle
longitude on the left and right (though in reality they are lines of constant
row number) and lines of constant great circle latitude on the bottom and
top. The approximate lines of constant great circle longitude delimiting
the left and right boundaries ("startMu" and "endMu" in the sample code
below, both in degrees) of the region may be determined using the
r' TRANS structure ("trans" in the sample code below):
double nu, startMu, endMu;
atTransApply(&trans, 'r', 64., 0., 1024., 0., NULL, NULL,
&startMu, NULL, &nu, NULL);
atTransApply(&trans, 'r', 1361.+64., 0., 1024., 0., NULL, NULL,
&endMu, NULL, &nu, NULL);
All objects within this region have their
OK_SCANLINE bit set. If doing science with single frames pipeline runs
independent of the survey as a whole, this is usually the best sample to
use. The area of this region is stored for each field in the SX.
Within context of the survey, there is one complication. Each field belongs to one or two segments. Each segment has a bounding lower and upper line of constant great circle longitude. If one of the segment ends goes through a field, then the OK_SCANLINE region of that field must be adjusted accordingly. Thus, if the segment mu limits are specified in degrees by the variables "segmentStartMu" and "segmentEndMu", one can determine the field boundaries as:
startMu = (startMu > segmentStartMu ? startMu : segmentStartMu);
endMu = (endMu < segmentEndMu ? endMu : segmentEndMu);
etaMin = eta - 1.25;
etaMax = eta + 1.25;
The primary survey area is specified as a group of such stripes, where the
area of each stripe is further bounded by lines of constant survey
longitude ("lambdaMin" and "lambdaMax"). The intersection of the OK_SCANLINE
region of a field with the survey area of its associated stripe is the
PRIMARY region. All PRIMARY regions are non-overlapping, and uniquely
define the survey. All objects in a field that lie within its stripe's
eta limits have their OK_STRIPE bit set. If they also lie within the lambda
limits, they have their PRIMARY bit set; this set of PRIMARY objects comprises
the primary survey sample.
The PRIMARY region boundary for a field is difficult to define, as it can consist of as few as 4 and as many as 6 line segments, each constant in a different variable (mu, nu, lamdba, or eta). Lets stick with great circle coordinates (mu, nu). The upper constant-eta stripe boundary can be expressed in great circle coordinates as:
nu = tan(at_stripeSeparation * at_deg2Rad / 2.) *
sin((mu - 95.) * at_deg2Rad) * at_rad2Deg;
where "at_stripeSeparation" is defined by the "astrotools" product and has
the value 2.5 deg. The lower boundary is the negative of the upper.
The constant-lambda stripe boundaries can be expressed in great circle
coordinates as:
nu = acos(cos((lambda + 90) * at_deg2Rad) / (cos((mu - 95) + at_deg2Rad)))
* at_rad2Deg;
One way to determine the PRIMARY region boundaries is then simply to step
along in mu from the OK_SCANLINE region start to end mu boundaries, calculating
the nu coordinate of the stripe eta and lambda boundaries, comparing them to
the OK_SCANLINE nu boundaries, and using the most limiting of the three.
The area of the PRIMARY region for each field is stored in the SX.