Technical Note 67: Diary about the analysis of TASS disk 15

Jure Skvarc

June 3, 2000

Keywords: astrometry, photometry, asteroids, FITS headers

Following this introduction is the analysis of TASS disk 15. It is wrtitten in a less conventional style: in the form of diary. Of course, only activites related to the analysis are recorded here. Those who are not interested in details can skip to the summary section immediately. Such work is in priciple a never-ending story. I can go on and on and always there are more things that could be done. After covering most of the topics that I initially wanted to, I decided to make a break. In particular, the subject of putting the data into the database is not touched, although I initially wanted to do this, too. But I feel things are quite far from this point yet, so this omission is probably not so important.

May 1 2000 11:10 UT

A decision for writing a detailed diary of all activities related to the processing of TASS disk 15 is made. The purpose of writing such diary is to determine time necessary for preparations, processing and analysis and to identify possible bottlenecks which may be an obstacle for efficient processing. So far, I made a request for the Disk 15. Hopefully, it should arrive by May 8. Much of the data processing pipeline will be taken from the pipeline used for asteroid detections at Crni Vrh observatory.

The plan for now is (in possible, but not obligatory order):

Activities:

May 1 2000 12:05 UT END.

May 3 2000 21:38 UT

Start writing a Python program makebinphot.py which transforms LONEOS (Skiff) and USNO (Henden) photometric standard files into a similar format as is the binary ACT format used by fitsblink.

May 3 2000 22:48 Program for USNO catalog finished - leave testing for tomorrow.

May 4 2000 18:11 UT

Start writing a C program readphot.c which reads files produced by makebinphot.py and output all stars that exists in a given filed of view.

Program is written now, but some testing is required. During the process, several bugs were fixed in makebinphot.py. Also, this program now reads both USNO and LONEOS catalogs and merges them into one catalog. Duplicate entries are also found by makebinphot.py and written into file duplicates.dat. It is interesting to compare magnitudes of the same stars from both catalogs. The following figure show relative errors in magnitudes as a function of magnitude. There are some outliers which will be also shown.

The figure is made using the following gnuplot commands.

May 4 2000 23:02 UT END

May 6 2000 19:00 UT Downloaded IRAF from http://iraf.noao.edu. The easiest way to fo this is follow links from the home page or to go directly to ftp://iraf.noao.edu/iraf/v211/PCIX and visit subdirectories. Then use program called wget to fetch all components of the distribution which is divided into files of 500 kb.

END May 6 2000 19:30 UT

May 7 2000 18:11 UT Start to create Python module for reading star catalogs.

May 7 2000 22:50 UT Interrupted

May 8 2000 17:54 UT Continued work on the Python module.

May 8 2000 22:42 UT Interrupted

May 10 2000 18:45 UT Mostly finished work on the Python module.

May 10 2000 21:38 UT END

How to prepare Python modules to work:

Become root

Go to /usr/lib/python1.5 directory.

Make directory astro (mkdir astro)

Make file astro.pth:

/usr/lib/python1.5$ cat >astro.pth
astro
^D

/usr/lib/python1.5$

May 11 2000 18:45 UT Made new binary version of the ACT catalog - this time include error estimates. Wrote some documentation for the "stars" Python module.

May 11 2000 21:29 UT END

May 16 2000 Received Disk 15.

May 16 2000 END

May 17 2000 15:00 UT Brought home a new computer: Athlon 600 MHz, 128 MB RAM, 17 GB disk, CD-ROM writer, 100 MBit/s network. CD-ROM device does not want to read certain CD-ROMs, so I replace with the one from the old computer. Installed Mandrake 7.0 Linux distribution, which is available from ???? in a form of ISO image. After the change of CD-ROM the process of installation took 2 hours, together with changing the original /etc/lilo.conf file what needed to tell LInux kernel the amount of memory in the computer.

May 17 2000 00:00 END

May 18 2000 18:90 UT Started to copy files from the old computer to the new one. At the same time, took first look at the images. First notes: FITS header is incomplete: CTYPE1 and CTYPE2 keywords should have values 'DEC--TAN' and 'RA---TAN', respectively. DATE-OBS keyword has incomplete value. Missing are CDELTn keywords. It would be useful to have CCD-TEMP keyword with the CCD temperature at the time of exposure in degrees Celsius. Also, a keyword IMAGETYP with possible values 'object', 'dark', 'flat' and 'bias' is useful for processing images with IRAF. Missing is EXPOSURE keyword with the exposure time in seconds.ls

May 18 2000 00:00 END

May 20 2000 16:20 UT Moved V and I filter files into two different directories. This was done by the following commands:

 mkdir I-FILTER V-FILTER 
for a in H*; do b=`buffers $a | grep FILTER | grep V | wc | awk '{print $1}'`;
 if test $b -eq 1; then mv $a V-FILTER/ ; else mv $a I-FILTER; fi ; done 
Dark files in the I-FILTER directory:
H4R1659.818
H4R1659.821
H4R1659.822
H4R1659.824
H4R1659.858
H4R1659.860
H4R1659.862
H4R1659.864
Dark files in the V-FILTER directory:
H3R1659.818
H3R1659.821
H3R1659.822
H3R1659.824
H3R1659.858
H3R1659.860
H3R1659.862
H3R1659.864
In both, I-FILTER/ and V-FILTER/ directories created darks/ directory and moved the dark files there.

Wrote a Python script insert_keywords.py which renames files and inserts the missing or incomplete keywords.

May 20 2000 22:00 UT END

May 21 2000 7:30 UT Wrote a script center_median.py, which outputs the median pixel value in the central regions of given images. The purpose of this is to find exposure duration for the dark images. Results are the following:

I-FILTER
H4R1659.818 7200
H4R1659.821 7209
H4R1659.822 7164
H4R1659.824 7205
H4R1659.858 7200
H4R1659.860 7207
H4R1659.862 7164
H4R1659.864 7205
V-FILTER
H3R1659.818 6848
H3R1659.821 6856
H3R1659.822 6829
H3R1659.824 6857
H3R1659.858 6850
H3R1659.860 6857
H3R1659.862 6829
H3R1659.864 6859

Now, assuming that temperature did not change significantly (and log file makes me believe so), I conclude that H[34]1659.822 and H[34]1659.862 are 15 second exposures. Avrerage values of other images are 7204 and 6855 for H4* and H3* images, respectively. This would give us dark current of 0.30 ADU/s and 0.17 ADU/s, or, assuming 3 e/ADU, as is specified in the Technical note 62, 0.9 e-/s and 0.5 e-/s for I and V filters, respectively. This even makes some sense, if we know that the CCD temperatures were -16 C (I camera) and -24 C (V camera).

May 21 2000 10:00 UT END

May 22 2000 18:00 UT Production the master flat file for one filter is done by the following steps:

  1. In directory V_FILTER create directory flats/.
  2. Copy fts files from this directory to directory flats.
  3. Run program insert_flat_keywords.py. This program will prepare all of the critical keywords for insertion into the image headers including, most important, IMAGETYP='flat'. Also pixel sizes (CDELT1 and CDELT2) of all images must match.
  4. Start IRAF by typing cl. (If you haven't installed IRAF by now, you should probably do it. The process is pretty well documented in the IRAF install documentation (pciraf.ps) and you follow it, the job should not take more than 2 hours or even less if you make no mistakes).
  5. Change directory (inside cl) to V-FILTER/flats. Run flatcombine. The computer will start to munch data for quite few minutes. Eventually if will produce file Flat.fts
  6. Copy Flat.fts to V-FILTER.
  7. In cl shell, cd to V-FILTER.
  8. Run imreplace Flat 1 lower=0 upper=1 to prevent division by zero
  9. Make flatfielding by using ccdproc. First run epar ccdproc and set "yes" only for flat field correction. Specify flat file. Argument of ccdproc is H*.fts
  10. You will get 32-bit, floating point images. To be read by fitsblink, convert them by running chpixtype H*.fts H*.fts ushort.

Processing of files into star lists is done by using script writewcs.pl. This scripts uses fitsblink in noninteractive mode to detect stars and measure their positions and intensities and to make a match with GSC and ACT catalogs. It also writes exact WCS values into FITS headers.

Processing is done by (in V-FILTER directory):

../scripts/writewcs.pl H*.fts

All stars, identified in the ACT catalog are joined together by

awk '$7=="a"{print}' H3R1659-*.dat >act.dat
Now divide the stars from 15 s images from those from 150 s images using the program sort_by_time.py
../scripts/sort_by_time.py

May 22 2000 22:30 UT

May 23 2000 18:15 UT

The next step is to calculate zero (bias) images and darks from the existing dark files. These files are needed by the IRAF processing routines. Best way to get zero images is to take exposures of zero duration, but we don't have them. What we have are (apparently) 4 darks of 150 s and two darks of 15 s. Comparing median values of the middle 100x100 region we see that two images have these values substantially smaller. So,

darkpixel = zeropixel + darkcurrent texp

In this equation we don't know zeropixel and darkcurrent but we have two different texp. So we solve system of equations and get

zeropixel = (darkpixel1texp2- darkpixel2texp1)/ (texp2-texp1)

In our case texp2>>exp1 and for other reasons (see the scatter ofmedian values of assumingly 150 s exposures), so we declare 15 s exposures are actually zero. So manually rename H3R1659-822.fts and H3R1659-862.fts to zero1.fts and zero2.fts, respectively, modify file keywords.fits to write IMAGETYP of 'zero' and exposure time of 15 s.

After running zerocombine zero*.fts in cl we get Zero.fts.

After running darkcombine H*.fts in cl we get Dark.fts.

May 23 2000 21:13 UT END

May 24 2000 19:00 UT Using of Dark.fts for processing images caused problems. So I left it out and use only Zero.fts and Flat.fts. This is set in with epar ccdproc (see settings). Then run ccdproc H*.fts and all files will be flat-processed. Now running writewcs.pl H*.fts should make somewhat different results.

To check reproducibility of measurements, we make a small program compare_stars.py which puts together duplicate measurements of ACT stars. Then run

python ../scripts/compare_stars.py act15s.dat

May 24 2000 21:15 UT END

May 25 2000 18:45 UT

Results of reproducibility tests are the following:

15 second exposures, V-FILTER
Error No. of meas. Percentage
< 0.002 47 3.7
< 0.005 125 9.9
< 0.010 241 19.1
< 0.020 451 35.7
< 0.050 824 65.2
< 0.100 1060 83.9
All 1263 100.0
150 second exposures, V-FILTER
Error No. of meas. Percentage
< 0.002 134 9.9
< 0.005 34325.3
< 0.010 60844.9
< 0.020 96271.0
< 0.050 127293.9
< 0.100 131597.0
All 1355 100.0

We see that consistency of measurements is significantly better for 150 second exposures what is not really surprising.

May 25 2000 UT END

May 28 2000 8:30 UT

Processing of I filter images goes the same way as processing of V ones. After doing the flatfielding and bias subtraction with IRAF, we just run processanalyze.sh and get as a result files act15s.dat, act15s-compare.dat, act150s.dat, and act150s-compare.dat which contain measurements of all ACT (TYCHO) stars and comparison of the same star measurements in different images. Consistency of measurements is verified again and summarized in the following two tables:

15 second exposures, I-FILTER
Error No. of meas. Percentage
< 0.002 493.6
< 0.005 153 11.1
< 0.010 288 21.0
< 0.020 544 39.6
< 0.050 1009 73.4
< 0.100 1201 87.4
All 1374 100.0
150 second exposures, I-FILTER
Error No. of meas. Percentage
< 0.002 846.5
< 0.005 19815.4
< 0.010 37128.9
< 0.020 66551.8
< 0.050 95274.1
< 0.100 101178.7
All 1285 100.0

Quite clearly, consistency of measurements from 15 second exposures is very similar to that of V filter. This is not the case for 150 second exposures. If we draw a graph where point coordinates are the measured intensities on two images, we can see a set of outlier measurements which probably mean that one exposure was significantly shorter than the other:

Consistency of 
measurements for 150s exposures in I filter
Running the program get_wrong-meas.py in I-FILTER I found out that the images have the following number of measurements which disagree for more than 10% (others have none except maybe for saturated stars):
H4R1659-848.dat 4
H4R1659-852.dat 5
H4R1659-896.dat 10
H4R1659-884.dat 7
H4R1659-828.dat 5
H4R1659-880.dat 9
H4R1659-836.dat 53
H4R1659-856.dat 2
H4R1659-840.dat 3
H4R1659-876.dat 47
H4R1659-892.dat 38
H4R1659-844.dat 31
H4R1659-872.dat 3

We see that there are 4 images with a larger number of disagreements:

H4R1659-836.dat 53
H4R1659-876.dat 47
H4R1659-892.dat 38
H4R1659-844.dat 31
For these four files, I extracted ACT stars which have these disagreements. First
awk '$4>0.1{print $1, $2}' act150s-compare.dat >wrong-meas.dat

Then

awk 'BEGIN{while (getline <"wrong-meas.dat"){s[$1]=$2}}NR>1{id=$8;if (id in s && s[id]==$4)print}' H4R1659-836.dat >failed.dat 
awk 'BEGIN{while (getline <"wrong-meas.dat"){s[$1]=$2}}NR>1{id=$8;if (id in s && s[id]==$4)print}' H4R1659-876.dat >>failed.dat
awk 'BEGIN{while (getline <"wrong-meas.dat"){s[$1]=$2}}NR>1{id=$8;if (id in s && s[id]==$4)print}' H4R1659-892.dat >>failed.dat
awk 'BEGIN{while (getline <"wrong-meas.dat"){s[$1]=$2}}NR>1{id=$8;if (id in s && s[id]==$4)print}' H4R1659-844.dat >>failed.dat

Plotting positions of suspicious stars reveals that the majority of them come from the top of the images (if assume low-y coordinates are up). See the graph:

Positions of stars with
non-matching magnitudes
No such thing is observed in V filter exposures so we can exclude appearance of clouds or any other external cause. It looks like exposure time is not under control for I camera at least. Maybe shutter sticks for some time?
Consistency of 
measurements for 150s exposures in V filter
Images above were made by gnuplot with commands ../I-FILTER/act150s-compare.gpt and ../V-FILTER/act150s-compare.gpt. respectively.

May 28 2000 12:00 UT END

May 28 2000 18:00 UT

Astrometric properties of the images

Wide field images of Mark IV cameras are likely to have distortions. This can be repaired by applying polynomial corrections to positions of detected stars. These, corrected positions are projected to the sky. Efficiency of this method is verified in the next image. I took 150 s exposures and measured stars. Star lists were matched to ACT catalog, once with higher-order plare corrections, once without. A strip in x direction, 100 pixels high and centered around the central (y=1024) row of images is taken for reference. Command to do this is:
awk '$3>974&&$3<1074{print}' act150s.dat >act150s-central.dat
This is necessary to see distortion in x-direction only. Improvement of positions is rather strong, as one can see in the image below.
Residuals with
 and without higher order corrections
This analysis was made using previously obtained star lists (with higher order corrections). These star lists were copied to directory astrometry. Program catalog (actually fitsblink called with another name) requires original image files, too. To avoid copying all those big files, I just made soft links:
for a in H*.fts; do ln -s ../$a astrometry/$a; done

The program above is called from V-FILTER directory. Then a program tanproj.pl is used to use star lists for another matching, this time without corrections. Script tanproj.pl is nothing but a cut-down version of writewcs.pl.

May 28 2000 12:00 UT END

May 29 2000 8:00 UT A comparative overview of astrometric residusls is given in the next table. Separately there are values for 15 s and 150 s exposures, for I and V filter and for catalog matching with tangent projection only and with 5th order plate constants.

Tangent projection only 5th order plate constants
I filter V filter I filter V filter
15 s 1.40 1.58 0.62 0.84
150 s 1.45 1.37 0.62 0.44
It is interesting to note that I filter astrometric measurements do not benefit with increased exposure time, in contrast to V filter measurements. The reason is apparently that even in 15 s exposures the 11 magnitude stars have enough signal that centroiding is not affected by background and statistical noise while additional exposure does not improve centroiding significantly. On the other side, many brighter stars become saturated.

May 29 2000 12:00 UT END

May 31 2000 16:00 UT

Comparison with photometric catalogs

The whole purpose of the writing of Python stars module in the early days of this diary was to allow comparison of instrumental magnitudes with magnitudes from the photometric catalogs. The time for this has come. In spite of very large images of Mark IV, apparently not so many stars from the catalogs appear in the TASS images. Nevertheless, the program get_photometricI.py finds those stars that are within 2 arc-seconds from the measured stars and creates a list of matched stars. In the second column of each data line there is the measured intensity and in the third column there is the catalog magnitude. For I filter, image H4R1659-844.fts has enough stars to make some sort of comparison. The difference between the catalog and instrumental magnitude as a function of magnitude is shown in the next image.

Difference between the
 catalog and the instrumental I magnitudes
Instrumental magnitude is defined as

mi=22-2.5 log10(I)

where I is the measured intensity (AD count).

If we dare to make any conclusions based on a rather limited number of points there is a substantial magnitude-dependent bias in the determinations of instrumental magnitudes. Due to apparent linear nature of the bias, we can correct for this deficiency by fitting straight line through the data points (except through the outlier points at mag 10) and by subtracting the trend. The slope is as much as -0.12 mag/mag what really looks a lot. However, the corrected magnitudes agree within 0.05 magnitude (see next figure).

Difference between the
 catalog and the corrected instrumental I magnitudes
Similar analysis is made for the V filter image of the same field. Here is the star list and the graph:
Difference between the
 catalog and the instrumental V magnitudes
Slope (including all stars from the set) is now -0.046 mag/mag.
Difference between the
 catalog and the instrumental V magnitudes
So, it looks that the filters used with Mark IV do not match very well the color system from the catalog. The reason could also be a deficiency in the way fitsblink determines intensities or maybe in the background determination.

Astrometry with GSC stars

Astrometry of relatively bright stars from the ACT catalog gives better results than astrometry of practically all stars detectable in Mark IV images. A test was made which compares astrometric quality for images of different exposures, filters and order of fitting. The astrometric catalog used here is GSC. The results are summarized in the tables below.

May 31 2000 22:45 UT END

June 1 2000 16:40 UT

Average residuals in arcseconds for GSC stars in I filter images for different orders of fit
Fit order
Exposure12345
15 s 1.851.721.401.391.39
150 s 1.841.711.371.361.36

Average residuals in arcseconds for GSC stars in V filter images for different orders of fit
Fit order
Exposure12345
15 s 1.781.601.341.331.31
150 s 1.761.571.281.281.27
On the basis of the results above one could conclude that 3 order plate constants should be enough to correct image distortion. This is somewhat in disagreement with the image above which shows residuals as a function of x coordinate. From this image I would say the correction should even be of 6th order. Probably it was not a good idea to use very faint stars for the calculation of distortions.

June 1 2000 16:55 UT END

June 2 2000 16:30 UT

Asteroids

After the correct WCS were inserted, it was easy to check for presence of asteroids in the images. Using the program showasteroids.pl I verified all images. The command for doing this is

showasteroids.pl localhost Jure 15.5 H*.fts  

This implies that asteroid_server is installed locally. I do not distribute this program, but it is possible to use its services remotely, check the link above.

Findings were the following:

For the curious, here is how the output from showasteroids.pl localhost Jure 15.5 H*.fts looks like:
H4R1659-826.fts
     943  Begonia            14:59:27.37 +00:46:39.4  593.51 1671.14 14.36
    1926  Demiddelaer        14:59:49.53 +02:56:35.9 1610.88 1632.46 14.87
H4R1659-828.fts
     943  Begonia            14:59:27.24 +00:46:40.0  594.40 1671.65 14.36
    1926  Demiddelaer        14:59:49.37 +02:56:36.1 1611.74 1632.86 14.87
H4R1659-830.fts
     943  Begonia            14:59:27.20 +00:46:40.1  595.45 1671.67 14.36
    1926  Demiddelaer        14:59:49.33 +02:56:36.2 1612.78 1632.71 14.87
H4R1659-832.fts
     943  Begonia            14:59:27.07 +00:46:40.7  595.79 1671.57 14.36
    1926  Demiddelaer        14:59:49.17 +02:56:36.4 1613.05 1632.55 14.87
H4R1659-834.fts:: WARNING No hits!
H4R1659-836.fts:: WARNING No hits!
H4R1659-838.fts:: WARNING No hits!
H4R1659-840.fts:: WARNING No hits!
H4R1659-842.fts
    4790  Petrpravec         15:28:08.41 +03:11:05.9 1728.11  932.39 15.18
H4R1659-844.fts
    4790  Petrpravec         15:28:08.28 +03:11:06.9 1728.88  932.82 15.18
H4R1659-846.fts
    4790  Petrpravec         15:28:08.25 +03:11:07.1 1729.96  932.37 15.18
H4R1659-848.fts
    4790  Petrpravec         15:28:08.12 +03:11:08.1 1730.05  932.41 15.18
H4R1659-850.fts
    1196  Sheba              15:43:29.26 +02:18:06.6 1316.00  466.23 14.75
H4R1659-852.fts
    1196  Sheba              15:43:29.13 +02:18:07.2 1316.65  466.50 14.75
H4R1659-854.fts
    1196  Sheba              15:43:29.09 +02:18:07.3 1317.27  466.48 14.75
H4R1659-856.fts
    1196  Sheba              15:43:28.95 +02:18:07.9 1317.55  466.44 14.75
H4R1659-866.fts
    2672  Pisek              15:54:37.60 +03:47:31.8 2009.49 1874.64 15.07
H4R1659-868.fts
    2672  Pisek              15:54:37.50 +03:47:32.8 2010.38 1875.14 15.07
H4R1659-870.fts
    2672  Pisek              15:54:37.47 +03:47:33.1 2011.54 1874.72 15.07
H4R1659-872.fts
    2672  Pisek              15:54:37.37 +03:47:34.2 2012.02 1874.49 15.07
H4R1659-874.fts:: WARNING No hits!
H4R1659-876.fts:: WARNING No hits!
H4R1659-878.fts:: WARNING No hits!
H4R1659-880.fts:: WARNING No hits!
H4R1659-882.fts:: WARNING No hits!
H4R1659-884.fts:: WARNING No hits!
H4R1659-886.fts:: WARNING No hits!
H4R1659-888.fts:: WARNING No hits!
H4R1659-890.fts:: WARNING No hits!
H4R1659-892.fts:: WARNING No hits!
H4R1659-894.fts:: WARNING No hits!
H4R1659-896.fts:: WARNING No hits!

June 2 2000 22:40 UT END

Software used in the analysis

Configuration and plotting files

Conclusions

Recommendations:

Pipeline

  1. Files belonging to different filters should be directed to different directories, eg. I-FILTER and V-FILTER.
  2. For processing with IRAF, bias, dark and flat files should have appropriate values of FITS keyword IMAGETYP: 'zero', 'dark' and 'flat', respectively.
  3. Image correction is performed.
  4. Star lists are made (script processanalyze.sh).
  5. The required information (positions and instrumental magnitudes) is extracted.
  6. Not performed here: color corrections are made.
  7. Not performed here: Stars go into the database.