SPHOTOM is a set of python scripts for a reduction of CCD images, astrometry solution, photometry, and calibration of the brightness of all detected stars on the CCD images. It was created for the processing of CCD observations from our instruments. But it can be used for any other CCD data with standard FITS headers.

With this package, you can perform the basic reduction of CCD images (bias, dark, flat-field, clean image from cosmic hits) using CCDPROC package, astrometry of images (also with a field deformation) using astrometry.net, photometry with python library SEP based on widely used Source Extractor code (Bertin & Arnouts 1996), a photometric calibration based on APASS or SDSS magnitudes. SPHOTOM also includes a simple script for visualization of obtained light-curves as well as the export of data to our virtual observatory.

The latest version: sphotom-0.11.tar.gz

If you want to use the older version, please contact us for scripts.

New features:

version 0.11

– corrected error in the calculation of standard deviation in calibration
– display calibration zero-point and its standard deviation and insert them into fits header of the result file

version 0.10:
It is a quite a trimmed version. The only script for photometry is working!

– background determination
– source extraction
– optimal kron apertures determination
– sextractor type MAG_AUTO magnitude determination
– cross-identification of detected sources with USNOB1.0, APASS and VSX catalogs
– photometric calibration based on APSSS BVgri magnitudes
– saving results as a table into FITS file with image
– storing data into a local sqlite database

How to install:
We strongly recommend using a python virtual environment. It is the easiest and the safest way to install all requirements needed for these scripts. Install a virtual environment by command:

pip3 install virtualenv

Create a directory where you want to have your virtual environment (e.g. SPHOTOM) and run following command:

virtualenv SPHOTOM/ --python=python3.6

In the terminal window, activate the virtual environment by command:

source SPTOMOM/bin/activate

and you can use it. Then install with pip all requirements:

pip install numpy astropy ccdproc matplotlib sep astroquery scipy

Unpack downloaded file with scripts to a directory you want and you can use it !!

For astrometry, we recommend installing a local version of astrometry.net. You can build it from source as described on the web page of package, or if you use Ubuntu type systems, it can be simply done by:

sudo apt install astrometry.net astrometry-data-tycho2

If you have enough space on your HDD (cca 33.8 GB)  you can also install 2mass catalog (it is necessary if you have a small field of view or image with faint stars):

sudo apt install astrometry-data-2mass

How to use SPHOTOM:
Particular script from SPHOTOM package can be started in virtual enviroment:

python photometry.py directory.with.fits.files  -c parameter.file

A detailed manual can be found here.