Department of Physics AstroLab

Astrolab Local Data Reduction/Analysis Tools

In order to allow the efficient reduction and analysis of data we have put together a simple set of programmes and scripts under Linux.

The source code can be found at: /mnt/64bin or /mnt/64bin/auto_astrom. (Suggestions for improvements and bug reports are always welcome.)

  • aphot.py
  • A script to measure aperture photometry on a sequence of images. Appends a one line summary of the measurements to a file called summary.obs. Further details can be found here.

  • average_lines     N  MAX_DELTA_TIME
  • Averages every N data lines in an summary.obs file. Usually values for N of 3 or 5 should be sufficient. MAX_DELTA_TIME is the maximum time (in seconds) permitted between the 1st and last line in the averaging process. A typical value to use for MAX_DELTA_TIME is 600 seconds. Reads summary.obs and outputs aver_summary.obs.

  • auto_pos_pro.py
  • Compares the position of an asteroid in your images to the predicted positions by JPL.
    Finds stars in images and compares to star catalogue to fit astrometry. Out of the remaining sources that are not in the star catalogue, it finds which is closest to the predicted position of the named asteroid. Plots the differences in measured vs predicted position of the asteroid. Syntax:

      > python /mnt/64bin/auto_pos_pro.py asteroid telescope date start end

    e.g.   > python /mnt/64bin/auto_pos_pro.py Aethra east-14 14_12_05 54 85

  • cal_rc2.py
  • cor2gmt
  • corrects the observational times in a data file for British Summer Time. Assumes that the recorded observations are in local civil time.

  • cor2hjd
  • corrects the times in a data file to Heliocentric Modified Julian Day using the Starlink subroutine sla_ecor (see the SLALIB - Positional astronomy library) and the position of the target variable to calculate the light travel time difference.

  • dfstack.py3
  • Script to stack images. Use only if stackX2.py does not work.
    First looks for flat_field.fits (NOT master_flat.fits) and divides if file exists, then stacks and attempts to fit astronometry. Syntax:

      > python /mnt/64bin/dfstack.py3 telescope date start end

  • fast_solve
  • effectively uses phase dispersion minimisation to both find the period and determine run-to-run zero-point magnitude offsets. An essential tool for asteroid light curve determination. Full details can be found here.

  • fastsolve.py / cfastsolve.py
  • Uses phase dispersion minimisation to find the period, essential for asteroid light curve determination. This is an updated version of fast_solve.

    cfastsolve.py is for calibrated light curves, while fastsolve.py does not need the light curves to be calibrated and will shift observations from different nights in magnitude to 'line up'. Full details here.

  • find_xyz2.py3
  • Returns the Earth-centric coordinates of an asteroid for a given date and time. Reads the orbital_elements file produced using get_elements.

      e.g.    > python /mnt/64bin/find_xyz2.py3 2022-10-10T20:58:22.383

    Returns the RA, dec and x,y,z earth-centric position of the asteroid. Also returns the earth-centric position of the Sun, to allow for conversion to sun-centric coordinates.

  • find_zeropoint.py3
  • Returns the zeropoint of an image. Syntax:

      > python /mnt/64bin/find_zeropoint.py3 filename

    If master_flat.fits exists then the flatfield will be applied. Writes results into zpts.log.

  • fit_ellipse.py
  • Script to fit an ellipse to data. Fits the coefficents a, b, c, d, e, f, representing an ellipse described by the formula F(x,y) = ax2 + bxy + cy2 + dx + ey + f = 0 to the provided arrays of data points x=[x1, x2, ..., xn] and y=[y1, y2, ..., yn].

  • get_elements
  • Returns orbital elements for an asteroid, and saves results in orbital_elements. Syntax:

      > /mnt/64bin/get_elements asteroid_name year month day

  • getrot.py
  • Returns the angle required east-of-north to rotate image to align north up and east left. Syntax:

      > python /mnt/64bin/getrot.py filename

  • makeflat.py
  • Use this to create a master flat by combining a number of flats. The syntax is:

      > python /mnt/64bin/makeflat.py telescope date start end upper_limit

    e.g.   > python /mnt/64bin/makeflat.py draco2 24_01_16 1 15 45000

  • mjday
  • calculates the Modified Julian Day (MJD) number for a given calendar date and time. MJD is defined in terms of the Julian day (JD) as MJD = JD - 2400000.5.

  • plot_xy.py
  • Simple script to read data from a text file and create a scatter plot of the data. Looks for a text file named 'your_data.txt'.

  • raw2dif.py
  • Takes the raw data file summary.obs and calculates the difference of columns to produce a list of magnitudes for the variable. The input file is assumed to have lines of the form:

    modified_julian_day    variable_mag   error    calib_1_mag   error    calib_2_mag   error    ...

    If the magnitudes of the calibration stars are known, then a zero-point magnitude constant can be added to the observed magnitude difference to place the magnitudes onto the standard system (further details are provided here). The output file has lines of the form:


    modified_julian_day   variable_mag   error
  • stackX2.py
  • Script to stack images. To stack data in current directory, use:

      > python /mnt/64bin/stackX2.py PSFlimit

    e.g.    > python /mnt/64bin/stackX2.py 5.0

    will attempt to stack all d*.fits files in current directory where PSF has FWHM<5.0. If master_flat.fits is included in the current directory, each frame will first be flatfielded.

    To stack directly from archive:

      > python /mnt/64bin/stackX2.py telescope date start end PSFlimit

    e.g.    > python /mnt/64bin/stackX2.py draco2 24_01_31 1 9 5.0

    will attempt to stack frame numbers [a]d000[1-7].fits on 24_01_31 with seeing FWHM<5.0. Returns a stacked image mosaic.fits.

    Alternatively, try dfstack.py3.


    Back to the AstroLab Home Page jrl 2020-Jun-17 12:41:02 UTC