|
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
- Create a directory (folder) for the processing and "change" to that directory, e.g.
mkdir yy_mm_dd
cd yy_mm_dd
Create a file for the automatic identification of the target.
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.
-
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
- 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.
- Copy "
/mnt/64bin/auto_astrom/automag_driver "
to the current directory and amend as required.
- 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.
- Sit back and be impressed, very impressed...
- When the script finishes check whether the processing failed
on any images by examining the FAILURE.OBS
and SATURATED_STARS files (if they exist).
|