WFIRC -- IR CAMERA -- REDUCTION MANUAL /export/home/persson/iraf/wfirc/manuals/reduction_manual IRAF version: 2.11 frames are in 'fits' format Update: 01may1999 This manual describes the procedures for inspecting incoming wfirc/cirsi data and reducing it. 1. Getting Started Observing 1.1 Description of system 1.2 Disk ownership 1.3 Before Observing 1.4 Directories accessed for observing, reduction, and information 1.5 During Observing 1.6 Saving the data 2. Assumptions and Nomenclature 2.1 Frame naming convention 2.2 Header parameters must be accurate 2.3 Data are already linearized 2.4 Script and working files location 2.5 Filters 3. Observing Scripts 3.1 n1 n2 examples 3.2 Inspecting incoming data 4. Reducing data 4.1 Summary of commands 4.2 List and store raw header parameters 4.3 Combine all the loops 4.4 Twiflats and Darks 4.5 Flatten the data 4.6 Approximately Subtract Sky 4.7 ID fiducial Stars 4.8 Process Standard Stars 4.9 Insert 'zmag' parameter into headers 4.10 Mosaics 4.11 Photometry of stars 4.12 Photometry of faint objects 5. Miscellaneous handy commands 6. Engineering Scripts 6.1 Making mask frames 6.2 Linearity and Gain 6.3 Readnoise 7. Definitions ***************************************************************************** 1. Getting Started 1.1 Description of system Acquisition of IR data with the WFIRC is tightly integrated with the telescope control system, the offfset guider, and a set of catalogs, all under the control of 'apollo', a PC running Windows NT. Data are acquired via 'macros' - automatic procedures that accomplish all telescope moves, frame acquisition, header information attachment and shipment of complete '.fits' files to 'rigel', the reduction computer. A block diagram is shown in figure 1. All data inspection, on-line and further processing, is done with IRAF scripts. 1.2 Disk ownership 'rigel' has a 9 Gbyte home disk, and a 108 Gbyte disk chassis with three 36 Gbyte plugin modules. The raw data frames flow onto /export/data1/, which does not have write/delete permission from 'rigel'. A copy step from /export/data1/ to some other area is required in order to protect against inadvertent erasure of the raw data. 1.3 Before Observing or Reduction ==> Start 'rigel'. Login: persson password: ****** ==> Close any unwanted windows. ==> Open 1 Xterm window. Make a subdirectory for the night: persson@rigel> cd iraf/wfirc ! go to where most information is handy persson@rigel> mkdir 15may1999 ! for example persson@rigel> cd !$ ! go there **** THE FOLLOWING NOT FINISHED **** persson@rigel> get_scripts ! copies the scripts from a write-protected ! directory into a working directory where ! they can be modified. It also copies ! nominal mask frames, standard star values ! and other files needed. ***** **** ==> Open 1 XGterm window - this is for IRAF. In it type persson@rigel> cd iraf persson@rigel> cl ! henceforth the IRAF prompt will be ! will be abbreviated '>'. The unix ! prompt is 'persson@rigel>'. ! home$ is /export/home/persson/iraf > cd wfirc > cd 15may1999 ! go to the nights' directory > wfirc_reduce ! loads IRAF scripts > ready 19990515 ! loads various other files. The argument '19990515' ! is the subdirectory on '/export/data1/' where the ! raw data are put. The 'rigel observer', i.e., you, ! do not have write or delete priveleges on the ! /export/data1, /export/data2, or /export/data3 ! directories. > path ! shows that your working directory is now: rigel!/export/home/persson/iraf/wfirc/15may1999 (= home$wfirc/15may1999) ==> Open 1 Ximtool window ! for picture display ==> Open any other Xterm windows or text editors you may need or want. 1.4 Directories accessed for observing, reduction and information All the observing and reduction directories are on 'rigel' under /export/home/iraf/wfirc/. Information on various aspects of the instrument and system are in these directories: readme/ manuals/ run_log/ DLT_log/ scripts/ scale/ gain/ imfort_sep/ filters/ noise/ script_frames/ linearity/ throughput/ script_files/ tests/ sensitivity/ night_const/ hot_pixels/ std_magnitudes/ iraf/ ! This directory contains old NICMOS3 scripts in various ! sub-directories. 1.5 During Observing The data arrive in the safe directory 'persson@rigel:/export/data1/19990515' (in this example). In your IRAF working dirctory - > get_raw 1 ! this compares contents and copies the ! next batch of '*.fits' and '*.txt' files ! to /export/home/persson/iraf/wfirc/19990515 You can 'get_raw' data any time. It is best done when data are not coming in. 1.6 Saving the data The data consist of '.fits' and associated '.txt' files that are saved on DLT tapes. Put 100 runs (explained below) or one nights' data into each tar archive, whichever is smaller. The files are 16-bit 1024x1024 pixel pictures of length 2105280 bytes. Usually all four chips will be read out, so a single exposure uses 8.4 Mbyte. A single DLT tape holds ~ 50 Gbyte in compressed mode, or about 5800 4-quad pictures. To save raw data, load a tape and in your Xterm window: persson@rigel> cd /export/data1/19990515 persson@rigel> mt -f /dev/rmt/0cn rewind persson@rigel> tar cvf /dev/rmt/0cn * 2. Asumptions and Nomenclature 2.1 Frame naming convention irx_00064_c2_012.fits (for example) irx = wfirc prefix - changes through reduction process _00064 = running number for each loop of frames (5 digits) _c2 = chip 2 (for example) _012 = twelfth image in this loop Raw frame-names with the 'irx' prefix are 21 characters long: irx _ 00064 _ c2 _ 012 . fits | 3 |_| 5 |_| 2 |_| 3 |.| 4 | Frame prefixes within the reduction process mean the following: irx = raw input frames (linearized) icx = loop-combined frames idf = flattened object frames isx = sky-subtracted 'idf' frame sdf = flattened sky frame twi = twilight flat (understood to be normalized) dom = dome flat (understood to be normalized) After the loops have been combined (telescope pointed at the same position) the loop counter is superfluous and the convention for all subsequent frames is 17 characters long: icx_00064_c2.fits (for example) 2.2 Header parameters must be accurate Appendix 1 shows a typical frame header. Most elements are self-explanatory. The header parameters are used for many of the reduction procedures. Most are automatically loaded by 'apollo', but some are entered by the observer. The first procedures extract, check, and correct them. 2.3 Data are NOT linearized. This has not yet been implemented in either the acquisition or reduction reduction processes. 2.4 Script and working files location The scripts you copied using 'persson@rigel> get_scripts' are in home$wfirc/scripts. Various other files and frames needed in the processing have also been copied, but can be superseded, for example if you want to generate a new mask or a better script. 2.5 Filters See home$wfirc/filters for pertinent information. The two-letter abbreviations are: Zc 1.0 micron Jg J - Gemini (1.25 microns) broad-band filter Hs H 'short' (1.62 microns) short half of H-band Hg H - Gemini (1.65 microns) broad-band filter Hl H 'long' (1.72 microns) long half of H-band Ks K 'short' (2.16 microns) broad-band filter 3. Observing Scripts 3.1 n1 n2 examples In the scripts, frames often run from 'n1' tp 'n2', for example: > mfiles irx 11 15 1 (pre) (n1) (n2) (chip) means perform 'mfiles' on frames irx_00011_c1_001.fits through irx_00015_c1_00N.fits; 'mfiles' simply lists the frames. 3.2 Inspecting incoming data Scripts that are useful during observations are listed below. Look at the '.cl' files in home$wfirc/scripts for details. > avgo n1 n2 chip op ! averages over loops of raw 'irx' n1 and n2 ! frames and displays their difference with an ! 'imexam' cursor. To scale the skies to each other ! use op = y > dall n1 loop ! assembles 4 quadrants of a raw frame n1 ! into 1 2048x2048 picture, for a quick look. ! loop = 1 is the first picture for example > dp fr n1 n2 chip ! displays the difference between two frames ! fr = 'irx' or 'r' raw input frames (linearized) ! = 'icx' or 'c' loop-combined frames ! = 'idf' or 'f' flattened frames ! = 'isx' or 's' sky-subtracted 'idf' > fimstat list xl xu yl yu ! does imstat of a list of images in a ! specified region "[xl:xu,yl:yu]" pixels > fmovie list ! displays a sequence of images with arbitrary ! names, in the list 'list' > get_raw 1 ! get raw pictures; discussed above > mfiles pre n1 n2 chip ! generates a list of pictures with prefix ! 'pre' (e.g., 'irx') between 'n1' and 'n2' ! for chip 'chip'. Only does the first frame ! of the loop. Use '>' to redirect to a file. > mimdel pre n1 n2 chip ! deletes frames n1 through n2, skipping ! missing ones. ! 'pre' is 'irx', 'icx', 'idf', or 'isx' ... ! delete raw 'irx' frames with caution ! chip = 5 deletes them all. > movie pre n1 n2 chip ! displays frames; same style as mimdel 4. Reducing data Preparing to reduce data is the same as for observing. It may be efficient to collect all the frames from a run or at least several nights into one directory, suppose you call it 'run_06'. To recap, in the IRAF Xgterm window: > cd 15may1999 ! puts you where the data are > wfirc_reduce ! tasks all the necessary scripts > ready 19990515 ! loads several files and frames **************************** * * * START PROCESSING HERE * * * **************************** ******>> indicates intervention points, where files need creation or editing, or pictures must be examined. 4.1 Summary of commands > chk_headers n1 n2 chip_first chip_std k_min keep > arb_name > combine_loops arb_name ! Now edit arb_name > fix_headers arb_name > tflats arb_name > copy_tflats night_have night_need > flatten arb_name > create_skies arb_name > subtract_skies arb_name > id_star_1 arb_name > id_star_2 arb_name > id_star_2_auto arb_name > id_star_3 arb_name > id_star_4 arb_name > standards arb_name > cat_std_out arb_name > insert_zmags arb_name > mosaic arb_name n_grp > stars_1 star_list > stars_2 star_list > stars_3 star_list 4.2 List and store raw header parameters > chk_headers n1 n2 chip_first chip_std k_min keep > arb_name 'chip_first' is the lowest numbered chip used, i.e., chip 1. 'chip_std' is the chip used for standard stars: use chip 1. 'k_min': If the first one or two frames are consistently bad, they can be bypaseed by setting the k_min parameter to 2 or 3. 'keep' means keep (do not erase) the 'irx' frames after combining loops in step 4.3. This will produce a file named 'arb_name' (any name you choose) which lists the parameters: FRAME OBJECT OBSTYPE FILTER INT_TIME LOOP AIRMASS NIGHT irx_00501_c1_001 DF_002 astro Jg 30.010 1 1.15 28nov1999 for the first frame (in the loop) for pictures n1 through n2 on chip 1 as shown in the example. The chip number ('1' in this case) is the lowest numbered chip actually used. Usually that will be chip '1'. This routine outputs the file 'reduce_parameters' which stores the 'n1 n2 chip_first chip_std k_min keep' parameter set for this reduction sequence. 4.3 Combine all the loops > combine_loops arb_name This general routine combines all frames done in loops, within the range n1 to n2 and in 'arb_name'. The particular imcombine routine used depends on the OBSTYPE header parameter. These are the following: standard average with sigma clipping if n >= 4 astro average with sigma clipping if n >= 4 tflat done in a special way dflat done in a special way test average with sigma clipping if n >= 4 sky no star removal; scaled median tflat no star removal; scaled medians of groups of frames at the beginning and end of the sequence are differenced. dark average with sigma clipping if n >= 4 This results in 'icx_' frames, i.e., irx_00001_c1_001 through irx_0001_c1_010 ==>> icx_00001_c1 (etc) If the 'reduce_parameters' flag 'keep' = 1 (or y, Y, yes, Yes) the input `irx' frames are kept; if 'keep' = 0 (or n, N, no, No) they are erased. ******>> IMPORTANT : NOW FIX HEADER PARAMETERS Edit the file 'arb_name' to be consistent with what was actually observed. This is particularly important for 'OBSTYPE' which can be one of the following: standard ! new IR standard stars astro ! any other astronomical object tflat ! twilight flats done in the recommended way dflat ! dome flats done in the recommended way test ! focus, junk, random frames sky ! specially done sky frames off a large object dark ! darks won't be used except for ! engineering tests of noise. > fix_headers arb_name This will bring the headers up to date for all 4 chips, and for the 'irx' (loop = 1) and 'icx' frames. You can run 'chk_headers' again to check that all are correct. 4.4 Twilight flats and Dome flats ******>> The twiflats will have been obtained in a prescribed fashion and there will be zero or one twiflat at any wavelength on a given night under normal circumstances. It may be possible or desirable to average twiflats from different nights. These grand average twiflats will have relatively high signal-to-noise. > tflats arb_name 'arb_name' is the same filename chosen to check the headers. This produces twilight flats normalized to the mode of the level on the chip used to measure standard stars, i.e., chip_std = chip 1. It also uses the twiflat frames to improve the mask frames. Two additional masks are produced: (1) new pixels that should be set to zero: for example, if new dust particles have fallen on an array, they will will be found and incorporated into the mask frame. (2) hot pixels that will skew medians and modes will be found, set to zero and incorporated into the mask frame. If no flats were obtained for the group of frames in 'arb_name', then these may be copied from another night via > copy_tflats night_have night_need where, for example 'night_have' might be 16oct1999 and 'night_need' is 17oct1999, for which twiflats could not be obtained. It is important that the final mask frames, including new and hot pixels, be used throughout the remaining procedures. It may be better or necessary to use dome flats; perhaps no twiflats were obtained. Dome flats should be obtained in the prescribed way, as described in the observing manual. They are combined by: > dflats arb_name This will produce domeflats normalized to the mode of the level on the chip used to measure standard stars. 4.5 Flatten the data > flatten arb_name This flattens all the non-dark, twiflat, or dflat frames. The 'icx' frames now have counterparts: 'idf' = flattened frames. Twiflats will be the first choice, dflats the backup. This routine also replaces pixels with values equal to zero in the mask frames with values equal to the median value on the frame. This is done to allow more robust estimates of mean and median values of groups of pixel values. 4.6 Approximately Subtract Sky ******>> In order to ID fiducial stars, first-pass sky-subtracted frames are required. First edit a file called 'arb_name_skies' of observation numbers within 'arb_name'; i.e., attach the string '_skies' to your filename 'arb_name'. The format is n1 n2 n3 n4 suffix In addition, add a column to 'arb_name' giving a 'y' or 'n' to include a particular run or not. Then > create_skies arb_name All 'idf' frames between n1 and n2 and with a 'y' in the last column will be divided by their exposure time, then medianed (scaled by the mode) for each filter to produce sky frames. Only 'astro', 'standard', 'test' and 'sky' OBSTYPE frames will be combined, chip-by-chip. The resulting sky frames have the format (for chip 1): sky1_c1_Jg_night_suffix 'sky1' indicates that its the first approximation to the sky '_suffix' separates the skies into groups appropriate to different ranges of airmass or times of the night. It is not necessary to combine more than 30 frames for each filter, as these frames are used MAINLY for locating the fiducial star on each frame. The 'n3' to 'n4' range of 'idf' frames are those from which the 'suffix' sky frames will be subtracted in the next step: > subtract_skies arb_name 4.7 ID fiducial stars These are stars used to register frames for mosaics, or, in the case of the standards, they are one and the same. It is a two-step procedure: 1. > id_star_1 arb_name 'arb_name' is grouped by object (close tel pointings). The resulting file is 'arb_name_id_groups'. 2A. > id_star_2 arb_name ! manual option start point The first frames in 'arb_name_id_groups' are presented for you to 'imex a q' the fiducial star. 2B. > id_star_2_auto arb_name ! automatic option start point The acquisition computer 'apollo' has provided, with each new frame number (NNN in 'irx_00NNN_c1_001.fits) an ascii file called 'irx_00NNN.txt' which contains information on HST guide stars within the projected chip areas. An example '.txt' file looks like: 1 1 08:25:31.8 -39:05:43.7 2000.00 13.20 826 595 1 2 08:25:33.3 -39:05:23.4 2000.00 14.90 736 696 1 3 08:25:36.5 -39:06:51.0 2000.00 14.60 551 259 2 1 08:25:33.1 -39:12:32.0 2000.00 14.20 748 397 3 1 08:26:02.5 -39:11:42.6 2000.00 12.60 882 643 4 1 08:26:00.9 -39:04:56.3 2000.00 13.50 977 832 4 2 08:26:07.1 -39:05:33.8 2000.00 12.60 616 644 4 3 08:26:14.7 -39:04:59.5 2000.00 14.00 172 816 (chip # RA Dec eqx mag X Y ) X and Y ( in pixels) are estimated positions for the stars. If this file exists for a given frame, 'id_star_2_auto' will sort the candidates by distance from chip center and brightness (probably unsaturated, not too faint). As the telescope was moved through the mosaic offsets, differential moves were stored in the headers, and they are now used to locate (via 'daofind') precise XY coordinates. Small regions around the star, as it appears in different locations through the series, are collected into a single picture and presented for verification. If any of the centerings look suspicious in the verification frame they are identified via 'imexam a, a, ... q'. The picture is redone and presented again. XY values for a star for each dithering sequence are then stored automatically. ******>> For really empty fields, there may be no HST/GSC stars found and it will be necessary to interactively find a starting point star for each dither set. 'id_star_2_auto' will warn you and print out a list of 'arb_name_id_groups' for which no suitable stars were found. This file is called 'arb_name_id_groups_fix' The first frames for each of the 4 chips will be presented until you 'imexam a q' a star. The rest of the XY location steps then proceed automatically: > id_star_2 arb_name Both 'id_star_2_auto' and 'id_star_2' call 'id_star_3' and 'id_star_4' which cut out the small regions and present the results. Either can be run standalone; consult the comments in the scripts for details. > id_star_3 arb_name > id_star_4 arb_name checks them again. 4.8 Process Standard Stars > standards arb_name This routine produces files of instrumental constants called std_out_1 through std_out_m where 'm' is the photometric group number in the list 'arb_name//_ph_groups'. The definitions of terms in the photometric reduction process are in section 7. Now consolidate the output with: > cat_std_out arb_name Look at the output files 'std_out_Jg', ..., and 'std_out_all'. A typical segment looks like: (id std filter const avg sigma sigma/sqrt(n) ) Print out the 'std_out_Jg', etc, files and remeasure or eliminate any magnitudes that might be spurious for some reason. Average the constants for each night, and edit the file home$wfirc/night_const which contains the J, H, and Ks sensitivities for each night. Each line of this file should follow this format: 16nov1999 20.000 -0.751 -0.453 -0.934 -0.550 -0.183 ( date X Jg Hs Hg Hl Ks ) If you didn't measure a sensitivity at some wavelength enter a 20.000. Note that the style of the night must be consistent. 4.9 Insert 'zmag' parameter into headers > insert_zmags arb_name 'zmag' is the magnitude corresponding to 1 ADU (above sky) for the particular picture, and takes into account the exposure time, airmass, and the instrumental constant for the night. These constants are referred to an aperture 10 arseconds in diameter - that used for the standard stars. Once this is done, any of several routines can be called to do aperture photometry of any object in any frame or mosaic. If there are transparency variations through the night it may be advisable to apply different constants to particular mosaics. To do this add lines to the file 'wfirc_night_const' breaking the night up into pieces, e.g., 16nov1999a, 16nov1999b, etc. Enter the appropriate constants, and alter the 'night' header parameter by editing 'arb_name' reusing the routine 'fix_headers'. 4.10 Mosaics One of several mosaicing options can be selected: 1 - Relatively shallow exposures, for example of standard stars. These will be archived for future combination and use on Magellan. The approximately sky-subtracted frames done by 'subtract_skies' are adequate. This is also the first step for the other options. 2 - Relatively empty-field frames with deep exposures. For these the sky-subtracted frames done by 'subtract_skies' are NOT adequate, and a running mean sky level is computed from the frames themselves. 3 - Busy-field frames with shallow or deep exposures and for which sky exposures many arcminutes away from the field were obtained. For example, stars cover all four chips and are so numerous, bright, and/or crowded, that skies cannot be computed from the frames themselves. 4 - Busy-field frames in which one of the four arrays can be used to set the sky level of one or more of the others. For example, a large galaxy fills one chip. Edit the file arb_name//_ph_groups by adding a column containing the mosaic option number. For option 3, enter 31 if chip 1 sets the sky level, 32 for chip 2, etc. For no mosaic, enter 0. > mosaic arb_name n_grp The 'n_grp' in this call is the group number in arb_name//_ph_groups for which a mosaic will be created. n_grp = 0 does them all. 4.11 Photometry of stars This is analogous to doing photometry of the standards. > stars_1 star_list ! flattens and does rough sky subtraction > stars_2 star_list ! locate star and contaminating stars > stars_3 star_list ! do photometry in a 10 arcsec diameter aperture This uses the 'phot' routine after cleaning stars off around the star of interest. The 'star_list' in this example is analogous to 'std_list' in section 15. A variant is: > stars_4 star_list ! do photometry with a 6 arcsec diameter aperture 4.12 Photometry of faint objects > mphot 1 Interactive routine cleans objects around the object of interest, does a surface fit to the sky, and creates a growth curve MONGO file called 'gr5'. The '1' in this example is the first line of 'mosaic_list' (see #17.2 for the example format). 5. Miscellaneous Handy Commands 5.1 hselect : selecting image header info > hselect idf*.fits $I "filter ?= 'Hg' && exptime == 50" > pic_list This command selects out all 'idf' prefix frames if the filter was Hg and the exposure time was 50 seconds. Look at an image header to see the various header keywords. The $I refers to the string 'idxxx.imh'. 5.2 imedit : eliminating individual stars from an image > imedit pic_in pic_out interac+ display+ autodis+ typing a 'b' will zap the star under the imex cursor, and will show the result. Edit the imedit parameter file to change the size of the imedit aperture. 6. Engineering Scripts 6.1 Making mask frames Obtain a large number of domeflat frames (in order to reduce readnoise) and after combine_loops you should have a high S/N picture of all 4 chips. > make_masks n1 This will make new versions of the ones stored in home$wfirc/script_frames. Inspect and replace the old ones if desired. 6.2 Linearity and Gain > lin_gain pre n1 n2 n3 6.3 Readnoise 7. Definitions 7.1 Aperture for standard stars All magnitudes for standard stars are referred to an aperture 10 arcseconds in diameter. 7.2 Magnitude system The magnitudes are on the Johnson system. The 7th magnitude A0 stars of Elias et al (1982, AJ 87, 1029) and the extension to 11th magnitude by Persson et al (1998, AJ 116, 2475) define the system. In the scripts 'std_magnitude' values are from the latter reference. 7.3 Exposure times - exptime and int_time Exptime is an approximation to int_time, which is the actual exposure time. For example, if exptime = 10 sec, int_time = 10.067 sec. 7.4 Gain The electronic gain of the system is the conversion factor to convert electrons into the ADC into data numbers (DN). It is expressed in electrons/DN. It is ~ 10 e-/DN. 7.5 Throughput The throughput of the system is in units of electrons out per photon into the entrance pupil of the telescope, at the top of the atmosphere. Losses in throughput thus include: the atmosphere, the two telescope mirrors, the dewar window, the filter tranmission, and the detector quantum efficiency. 7.6 Flatfield pictures Flats are defined to be pictures (normalized to a mode of unity) that include purely multiplicative throughput factors: pixel-to-pixel, and across the whole array. They DO NOT mean pictures of blank sky that are SUBTRACTED from object frames. A good flat contains no residual additive signatures due to the electronics or to fringing of the night sky. They can be derived from pictures of the fading twilight sky, or from the illuminated dome. They must be completely dominated by continuous emission, uniform across the telescope entrance pupil. The sense of the flats is that object pictures are DIVIDED by the flats to yield the corrected, useful pictures. 7.7 Sky pictures Sky pictures are distinct from flats. They may be flattened, but they include all electronic and sky emission features (continuum and fringing due to lines) that ARE to be SUBTRACTED from the object frames. Object frames are never divided by sky frames. 7.8 Chip Orientation Images from all four chips are arranged so that North is UP aand East is to the LEFT, 7.9 NLOOPS and LOOP NLOOPS (in the frame headers) is the total number of frames taken at exactly the same telescope pointing position. LOOP is the particular frame number within the set of NLOOPS frames. 7.10 Run number A number that designatesa set of NLOOPS frames obtained at a certain fixed telescope position. It is incremented by one for each new position in an observation sequence. 7.11 Dither A dither move is a small telescope move, of order 15 arcseconds or less. 7.12 Mosaic and Tile A Mosaic is a picture made from a set of dithered images. It is approximately the size of one chip, i.e., 200 arcsec on a side. A Tile is the area of sky covered when the telescope has been pointed so as to fill in the large square - 4 chips on a side. It is 13 x 13 arcminutes in size. 7.13 Linearity The linearity of CIRSI has not, and can not, be determined presently. As of May 1999, the data will be reduced with no linearity correction, with the caveat that they will be error at the several percent level. 7.14 Zero-point and Night_const The Zero-point of the system in a given passband is the number of electrons per second out for a zeroth magnitude star. The night_const expresses this in magnitudes per DN: night_const(F) = 20 - 2.5*log[STD(DN/sec)] - mag(STD) - corr[airmass] where STD(DN/sec) is the number of DN per second for a given standard star STD is its magnitude in the passband, and corr[airmass] is the airmass correction (to unit airmass) in that passband. The '(F)' in night_const indicates that it is different for each filter. The '20' is just a convenient offset to make the night_const values come out near unity. The standard stars are understood to be measured in a 10 arcsecond diameter aperture. 7.15 zmag and magnitudes The magnitude of an object is given by: mag(OBJ) = 20 - 2.5*log[OBJ(DN/sec)] - corr[airmass] - night_const A value of the 'zmag' parameter applies to each particular frame or mosaic. It is the magnitude corresponding to 1 DN above sky, and automatically includes the filter, airmass correction, and exposure time. It is understood to be the magnitude in a 10 arcsec diameter aperture: zmag = 20 + 2.5*log[int_time] - corr[airmass] - night_const mag(OBJ) = zmag - 2.5*log[OBJ(DN)]