Department of Physics AstroLab

aphot.py


This python script is used to perform aperture photometry (hence "aphot") on a set of images and is an updated version of   photom_ad.py . This script operates on astrometrically calibrated and dark-subtracted images, i.e.  adxxxx.fits  images.

The script can be found at: /mnt/64bin/auto_astrom/aphot.py
Examine this python script (and others called) in order to understand the general principles of the processing.

To process a set of images with   aphot.py  

  1. Create a directory (folder) for the processing and "change" to that directory, e.g.
    
     mkdir yy_mm_dd 
     cd yy_mm_dd    
    
  2. Create a file for the automatic identification of the target.

    • Asteroid(Minor Planet). We need to know the (RA, Dec) position of the asteroid at the time of the observation. This is calculated from the minor planet's known orbital elements. A file containing the orbital properties is obtained via running
      
      python /mnt/64bin/get_jpl_eph.py 
      
      This creates a file called "jpl_ephemeris".

    • Variable Star. Create a file called "var_sky_position" containing the (RA, Dec) position of the target variable star. Thus this file has one row with two numbers (RA, Dec in decimal degrees), e.g.
      123.4567  12.3456
      The position needs have an uncertainty of one arcsec or better, i.e ~0.0003 deg.

    The script examines whether a "jpl_ephemeris" or "var_sky_position" file exists in the current directory and runs the appropriate section of the code.

  3. Select two suitable calibration stars (i.e. sufficently bright, not saturated and near the target object) that will be used for the relative photometry. This can be acheived by inspecting one of the  adxxxx.fits  images with GAIA with the "pick object" option to find an (RA, Dec) position; use the degree flag to get the position returned in decimal degrees. Copy/paste these positions into a file called "cal_sky_positions". Thus a typical file would contain two rows of two numbers (RA, Dec), e.g.

    
    129.00953  20.91387
    129.00139  20.88821
    

  4. If necessary make a flat field image, see Flat Fielding. Alternatively, the flat field image may already exist in /mnt/share/flatfields/. A new flat field is made each term for each telescope and filter.

    If the script finds a file called "master_flat.fits" in the processing directory this is applied.


  5. Copy "/mnt/64bin/auto_astrom/automag_driver" to the current directory and amend as required.

  6. Now process the images via
    
     python /mnt/64bin/auto_astrom/aphot.py draco2 23_11_13 196 252
    
    where the first parameter is the telescope name, the second is the observing date, the third and fourth are first image and last to be processed. The script copies the images from the archive and then processes these in the current directory.

    For each image successfully processed a "measurement line" is appended to the "summary.obs" file.

    Images where the processing fails because one or more of the selected objects are saturated are listed in two files (FAILURE.OBS and SATURATED_STARS).

    Note: older images in the archive (i.e. those named xxxx.fits, dxxxx.fits, xxxx.ST9") will required some special initial processing before the "aphot.py" can be run.

  7. Sit back and be impressed, very impressed...

  8. When the script finishes check whether the processing failed on any images by examining the FAILURE.OBS and SATURATED_STARS files (if they exist).

Back to the AstroLab Home Page jrl 2020-Jun-17 12:51:27 UTC