DATA REDUCTION PROGRAMS FOR TASS STARLISTS Arne A. Henden May 16, 1997 This Note describes the data reduction programs that I use following the star extraction process for TASS frames. The suite of programs will take raw extracted files that have accurate astrometry, collate data from all three cameras, transform the data into the standard VI system using Landolt standards, build a master star list, and create a file of differential magnitudes for all objects in the master star list. I consider this suite a good template for photometric reduction of TASS star lists, and offer it to the community to modify as they see fit. Each program is described below in the order that the program is used in the data reduction pipeline. All programs are written in Fortran-77, and are available from either the NOFS anonymous ftp site (192.68.148.67, /pub/outgoing/aah/tass/sources) or from Michael Richmond's homepage. COLLATE This program takes data for a single field from up to 3 cameras and does list matching to produce a single output file. The input extracted star lists can be generated by MG's Star, GG's version of Sextractor, or MR's program. Up to 3 files/camera can be used and up to 10,000 total stars can be collated. These limitations are easily removed. The program only writes to the output file those objects seen in more than one camera. This restriction will delete many real objects (for example, if one camera covers a portion of sky not seen by the other cameras, or for faint objects that, because of their color, are only seen in the V bandpass camera, or are highly variable, etc.). However, this restriction guarantees that very few false detections make it into the collated list, and I feel that is a reasonable tradeoff. The coordinates of two objects from separate cameras are considered to be 'matched' if they lie within a user-specified radius of each other. I usually use an error radius of 15arcsec, chosen based on the nominal astrometric transformation accuracy reported by the TASS sites of +-3arcsec, and on the assumption that two objects cannot be resolved if they are within one pixel of each other, since the nominal fwhm is several pixels. Some objects will be missed (for example, if clouds prevent a good astrometric transformation for one camera), but again, the restriction eliminates most false detections. The program first reads in all 3 sets of data. It assumes the tm3get format of FITS files were used to create the star lists, so that each list has a y-coordinate that runs from 0-895 with a 20-row overlap. Stars that fall within the overlap region are split between images so that they only appear in the output list once. The program then creates a list of camera0 objects that are matched with camera1 and/or camera2 objects, then adds in those camera1 objects that are only matched with camera2 objects. The output file consists of 3 lines/object. The first line contains: f9.4 ramean mean RA f9.4 decmean mean DEC f9.4 dra RA error f9.4 ddec DEC error f11.4 hjd Julian Date, camera1 f7.3 fwhmx full width half maximum in x, camera1 f7.3 fwhmy full width half maximum in y, camera1 f7.3 mag magnitude, camera1 f7.3 dmag magnitude error, camera1 The second and third lines have identical formats, the first line for camera0 and the second line for camera2: 5x to indent the line f11.4 hjd Julian Date f7.3 fwhmx full width half maximum in x f7.3 fwhmy full width half maximum in y f7.3 mag magnitude f7.3 dmag magnitude error This file format is straightforward, but takes up more space than necessary when two or less cameras see the object. I will modify the format in version 2 (June) to remove unwanted lines. Also, all parameters that are missing are given values of 99.999 or 9.999. The Julian Date is either taken from the extracted star list, or from the filename. Note: while called 'hjd', this Julian Date is NOT heliocentric-corrected at this time. I will include this feature in version 2. TRANSFORM This program compares a collated list with a list of standard stars, computes the V and (V-I) transformations using all matched standards, and finally writes an output file of transformed magnitudes. The program requires a list of standard stars in the format: 20x Skipping over some extraneous junk for TASS f11.5 RA J2000, degrees f11.5 dec J2000, degrees 2x f7.3 b f7.3 v f7.3 r f7.3 i and a file containing two lines of mean transformation coefficients: f7.3 a1 slope for V fit f7.3 b1 zeropoint for V fit f7.3 a2 slope for (V-I) fit f7.3 b2 zeropoint for (V-I) fit (note: there are two lines, because the first line uses the relationship between camera1 and camera0; the second line uses camera1 and camera2). In addition, a collated raw star list in the COLLATE output format is needed. The program parses the star list until it finds a star that has both V and I magnitudes. It then compares that star against the standard stars, and if there is a coordinate match (15arcsec radius), the star is added to an intermediate list. After all stars are processed in this fashion, the user is given the option of three transformations: full, where V and (V-I) zero points and slopes are determined; zero, where the slopes are assumed known, and only the zero points are determined; and mean, where mean slopes and zero points are used. Each transformation is of the form: V-v = a(v-i) + b (V-I) = a(v-i) + b where v,(v-i) refer to the instrumental magnitudes, and V,(V-I) refer to the standardized magnitudes. I usually take a set of good, clear nights from one site, and determine full transformations for those extracted star lists. This is possible because the slopes of the transformations change very slowly (weeks to months, depending on how filters age and lenses get crudded up). Then I average the output coefficients, create a mean coefficient file, and go back to reduce all nights. On the second pass, the good nights are reduced using the 'Zero' option. Poor nights, or those nights without any measured standards, are reduced using the 'Mean' option, as no accurate zero point can be determined. The output file looks identical in format to a collated file, with two new header lines that indicate what kind of transformations have been applied. MASTER This program takes a set of transformed, collated star lists, and finds all objects with 3 or more observations in each filter. For each object, collate determines mean positions and mean magnitudes. It then does a second pass and removes observations that fall more than 2 sigma from the mean for each object. Finally, all stars that still have 3 or more observations are written to a master output file, in the format: f8.4 ra J2000, degrees 1x f9.4 dec J2000, degrees f8.4 rasig ra error, degrees f8.4 decsig dec error, degrees f7.3 Vmag mean from all observations f7.3 Verror i4 numV number of observations used in mean 2x f7.3 Imag mean from all observations f7.3 Ierror i4 numI number of observations used in mean A second output file, hardcoded to the name 'sigma.txt', is written that contains two tables: (1) a histogrammed list of magnitude bin, mean error in that bin, and number of stars in that bin; and (2) those objects whose magnitude variation is greater than 'average'. In order to find the suspected variables, the program uses an input sigma vs. magnitude file on the second pass. The sigma.txt histogrammed list has the form f5.2 starting magnitude i5 number of stars in this bin f7.3 mean photometric errors for stars of this magnitude The list of possible variable stars is in the form: f8.4 ramean mean RA, degrees 1x f9.4 decmean mean DEC, degrees f7.3 V f7.3 Verr f7.3 I f7.3 Ierr And the input sigma list is identical in format to the output sigma.txt. Master is actually two programs kludged together: One determines mean magnitudes and coordinates for stars, the other program finds variables and histograms the results. This means you have to feed it a known magnitude vs. sigma table. A better technique might be to make a third pass in the program. DIFCAL This program takes the master photometry star list created by MASTER, along with a list of transformed,collated files to process. It first reads in the master photometry list and saves those objects with three or more observations. It then reads the list of files to process, one file at a time, where the filename is pure ascii. For each file, each star is read and compared with a 15arcsec radius to all stars in the master photometry file. When a match is found, differential photometry is performed with respect to nearby stars, and the result is written to a file in the form: i5 i Star index in the master photometry list 1x f8.4 ra J2000, degrees 2x f9.4 dec J2000, degrees f11.4 hjd mean for observation f7.3 V mean magnitude wrt comparison stars f7.3 I mean magnitude wrt comparison stars The differential photometry is performed by searching the input file for the 100 stars closest in RA to the object. Then the magnitudes of these 100 stars are sorted, and the brightest 10 stars are used as comparisons. (Note: this resolves time differences between the objects, but does not prevent clouds from covering the top half of the field and affecting the photometry). For each of the comparisons, the transformed magnitude is compared with the magnitude in the master photometry file. A mean zero point correction for the ensemble is determined, and this correction is applied to the unknown star. Version 2 of this program will include an error estimate for both magnitudes, and possibly a better cut on determining the best set of comparison stars. Note that only stars that appear in the master photometry file will have their differential magnitudes calculated. This means stars with few observations will be bypassed, and possibly highly variable stars will also be overlooked. Note added May 25, 1997: It has been cloudy at the 4m, so I've taken the time to revise (yet again) the difcal program, and upload new versions of fieldx.dif to our ftp server. The source for the new difcal is under /pub/outgoing/aah/tass/sources/difcal.f4. This version uses more comparison stars and has a header line for column identification. Each line contains a few new fields: sigV and sigI are the photometric errors based on the comparison stars (does not include the program object's photometric error); nc is the number of comparison stars used. A single iteration to reject discrepant comparison stars is performed. Note added May 28, 1997: I've posted on /pub/outgoing/aah/tass/sources the program tassplot.f, which reads the .dif files and plots star magnitude vs. date, selectable by star number, limiting magnitude, or plotting all stars in order. This program works on my Unix workstation with the SuperMongo plotting package, and so is not very useful to most people. I've posted it as an example of what logic is necessary for this kind of plotting, and with a small amount of effort another plotting package could be inserted.