PBT scripts

Preprocessing

In order to manage the data, two "cron" jobs run every morning on arpc55.

15 07 * * * ~/polar\_bear/pbt\_imgname >> ~/polar\_bear/pbt\_cronjobs.log

This job reads the file creation time for each image and creates a new filename in the form:

ccc\_yyyymmdd\_hhmmss.fit

where ccc = camera number, yyyy = year, mm = month, dd = day, hh = hour, mm = minutes, ss = seconds.

pbt_imgname could be made redundant by modifying runstarlight.py to name images as they are recorded

30 07 * * * ~/polar\_bear/pbt\_clean >> ~/polar\_bear/pbt_cronjobs.log

This job reads through every file and identifies the number of stars visible on each image. The following files are deleted. All files taken during "daylight" hours (the script currently has to be told when these change). All files with fewer than c. 100 stars are deleted. All files with more than c. 15000 stars are deleted - these are files with a fixed pattern noise obtained either when the cameras were switched off or when they were exposed in daylight and hence completely saturated.

The remaining files are moved to a folder called /starlight/yyyymmdd_ccc

deleted files are currently not deleted, but moved to a folder /starlight/spocn/bucket/ until pbt_clean is proven to be working optimally.

BUG pbt_clean currently puts all frames from the same calendar date into the same folder. This applies to dates since sometime in May. The original design was to put all frames from the same night into the same folder, with the calendar date corresponding to the date on which the night started ** Needs fixing **

Evaluation

Data may be easily inspected using any image viewing programme which recognises FITS file formats. The most useful are those designed for working with astronomical images including

gaia (Starlink)

ds9 (SAOImage)

It is worth checking random images through the night to check that the pre-processing was successful. It is also worth updating the observing log ''regularly'', including any helpful comments about observing conditions and so on. This provides an extremely valuable record when it comes to process the data and assess photometry extracted many months subsequently.

The observing log is at /starlight/pbt_data_checklist.ods

This can be saved as xhtml and viewed online
-- eg PBT Observing Log

To Be Done The observing log should be updated automatically by the various tasks it reports The xhtml version needs to be automatically updated from the base version

Reduction

Output from these procedures is placed in

The contents of a typical ''.phot'' file are as follows, with the contents of each column described in the file header.

<code>
# NUMBER                 Running object number                                     
# X_WORLD                Barycenter position along world x axis                     [deg]
# Y_WORLD                Barycenter position along world y axis                     [deg]
# X_IMAGE                Object position along x                                    [pixel]
# Y_IMAGE                Object position along y                                    [pixel]
# FLUX_ISO               Isophotal flux                                             [count]
# FLUXERR_ISO            RMS error for isophotal flux                               [count]
# MAG_ISO                Isophotal magnitude                                        [mag]
# MAGERR_ISO             RMS error for isophotal magnitude                          [mag]
# ISOAREA_IMAGE          Isophotal area above Analysis threshold                    [pixel**2]
# THETA_IMAGE            Position angle (CCW/x)                                     [deg]
# FLAGS                  Extraction flags                                          
# FWHM_IMAGE             FWHM assuming a gaussian core                              [pixel]
# ELONGATION             A_IMAGE/B_IMAGE                                           
# ELLIPTICITY            1 - B_IMAGE/A_IMAGE                                       
     1 2.6088554331e+02 8.4757096415e+01     71.732      2.193     26932.68     1568.236 -11.0757   0.0632        25   9.0  10     7.23    2.212    0.548
     2 6.9714854344e+01 8.5533229347e+01   1955.691      1.421     60127.55     2060.075 -11.9477   0.0372        43   2.9  10    12.06    4.703    0.787
     3 2.9235591789e+02 8.9215386720e+01    968.514      2.352     7620.165       829.88  -9.7049   0.1183         7  82.5   8     4.63    2.699    0.629
     4 5.5533041071e+01 8.8652372113e+01   1336.880      2.609     8140.638     830.1935  -9.7766   0.1108         7 -74.6   8     4.21    4.078    0.755
     5 2.7727718642e+02 8.8804697414e+01    874.732      8.085     6000.606     767.9739  -9.4455   0.1390         6  25.1   0     3.51    1.421    0.296
     6 1.7168476705e+01 8.9484622646e+01   1143.247      7.747     5302.679     701.2766  -9.3112   0.1436         5 -12.7   0     2.47    1.204    0.169
</code>

Thus each file contains one photometric measurement for each star identified on one image. The star may potentially be identified from the image position in world coordinates (columns 2 and 3). The user should be aware of the ''extraction flags'' column (12), the magnitude error column (9) and the FWHM column (13).