Updated 2020.0826 1. Look at frames, identify good PSF stars, identify any major issues (cosmic rays, etc.), get FWHM. Mark PSF stars on frame in ds9 with circles (different colors for different bands), so you can find them later. 2. epar daofind: fix FWHM. 3. run daofind. Adjust sigma and re-run if necessary. 4. Clean *.coo.1 files for things on bad columns. Use awk to exclude bad columns and things near the edges, for example: awk '{ if (($1 > 135) && ($2 < 880) && ($2 > 220) && (($1-307.0)*($1-307.0) > 16)) print $0 }' 20090329.09.106.o.coo.1 Then display frames and tvmark simultaneously, and blink between the two to identify things that are not consistently tagged in all bands. KEEP INCONSISTENT TAGS if they are on stars identified as good for PSF fitting. 5. psf, nstar, substar, allstar. 6. Aperture correction: make new *.coo files with just the apercorr stars in them. Call these *.coo.9, to be safe. They MUST HAVE a number on the end (*.coo.aper and list input won't work). 7. apercorr option 1: turn off interactive mode, and don't forget to set all the apertures. 8. apercorr option 2, as usual. 9. cp standard.coeff and science.cfg to this directory (from the science directory above). 10. mkimsets, mknobsfile. Give mknobsfile the *.als files instead of the *.o.mag.1 files. 11. CHECK OBS FILE to make sure the A and B components are labeled consistently (i.e., that star N is always A and N+1 is always B, and they never flip. Look at the coordinates). IF NEEDING A SECOND PASS (to get B, for example): 1. After subtraction of A (leaving B behind), copy the subtracted files to something that looks like our starting point: cp 20150122.09.087.o.sub.2.fits 20150122.09.087.s.fits i.e., to *.s.fits instead of *.o.fits. 2. Run daofind again on the *.s.fits files to get the position of the newly-revealed B. The best method is to run it as usual, then awk $1 and $2 to keep only a small square around B. Then identifying the B point should be easier. 3. Make a list of the coords from Step 2: listcoords.forB. 4. Run phot on the ORIGINAL frames, but with the coords keyword pointing to listcoords.forB. This will give photometry for B (used as the zero-point later), using the original sky background. Running phot on the subtracted frames will get a lot of the messy residuals in the sky, ruining the sky values and thus the B phot values. 5. Concatenate the mag files so the A and B mags are in one file: cat 20150122.09.087.o.mag.1 20150122.09.087.o.mag.2 > 20150122.09.087.o.mag.3 No need to delete the extra headers/comments in *.o.mag.3. 4. Do not run psf again! 5. Put the *.psf.fits file names into a list: listpsf. 6. Then run allstar, giving it that list of psfs. The idea here is to use the analytical models from the previous psf run (don't re-fit them). The final *.o.als.? file here should have the fits for both A and B now. IDENTIFYING SCIENCE STARS FROM *.obs FILE: 1. display V frame and imexam it. 2. Use contour plot on science star to get its coordinates. 3. Use awk to extract a small box around those coordinates, e.g.: awk '{ if ( (($6-496)*($6-496) < 9) && (($5-524)*($5-524) < 9) ) print $0 }' gj0680x.obs COLORS for tvmark: 0 = sunview background color (normally white) 1-200 = frame buffer data values, windowed 201 = cursor color (white) 202 = black 203 = white 204 = red 205 = green 206 = blue 207 = yellow 208 = cyan 209 = magenta 210 = coral 211 = maroon 212 = orange 213 = khaki 214 = orchid 215 = turquoise 216 = violet 217 = wheat