Astrometric calibration

In this tutorial you will astrometrically calibrate the ReducedScienceFrames (i.e., de-biased and flatfielded science frames) from the previous tutorial.

Find ReducedScienceFrames to run astrometry on

  1. In a previous exercise, you reduced some RawScienceFrames, resulting in the creation of ReducedScienceFrames. Construct a list of these frames.

    Instruction: Use information in HOW-TO Query the database from Python to construct a query that contains your and only your ReducedScienceFrames.

    Answer (1):
    awe> t = '2012-06-01T08:51:44'
    awe> q = ReducedScienceFrame.template.start == dateutil.parser.parse(t)
    awe> frames = q.project_only().user_only()
    awe> len(frames)
    <some number of frames>
    Answer (2):
    # Alternatively, you can look for ReducedScienceFrames that you made less
    # than 20 minutes ago:
    # Use current UTC minus datetime.timedelta(days, seconds, microseconds).
    awe> date = datetime.datetime.utcnow() - datetime.timedelta(0, 20*60, 0)
    awe> q = (ReducedScienceFrame.creation_date > date).user_only()

Derive astrometric calibration

  1. Derive astrometry by creating AstrometricParameters objects for the ReducedScienceFrames.

    Instruction: Use information in HOW-TO Derive an astrometric solution to re-derive the AstrometricParameters for your ReducedScienceFrames.

    awe> filenames = [f.filename for f in frames]
    awe>'Astrometry', instrument='OMEGACAM', red_filenames=filenames, C=1)

    or (note that this command selects the most recent, valid ReducedScienceFrames for the specified template and chip, which may be frames made by someone other than yourself)

    awe>'Astrometry', instrument='OMEGACAM', template='2012-06-01T08:51:44',
                 chip='ESO_CCD_#65', C=1)
  2. Examine the attributes of an AstrometricParameters object.

    Instruction: Use the dir() method to see the attributes of interest (usually in all capital letters).

    awe> ap = (AstrometricParameters.reduced == frames[0])[0]
    awe> dir(ap)
    awe> ap.NREF
    awe> ap.RMS
    awe> ap.SEEING

Visually inspect astrometry

  1. Display the quality control plot for the AstrometricParameters object.

    Instruction: Follow the instructions in HOW-TO Inspect an astrometric solution to inspect the astrometric solution for one of your ReducedScienceFrames.

    awe> ap.inspect()