Astrometric solutions are created as a result of the AstrometricParametersTask and the GAstromTask. To determine the quality of the astrometric solution, several methods can be used. The primary method is to inspect the astrometric solution with the AstrometricParameters inspect() method. An alternate qualitative method is to view a calibrated catalog overlayed on the image.
Please Note, not all inspection methods are currently available in the AWBASE checkout, but are in the current checkout. These methods have been noted. To use them, see the Getting Started section in the http://www.astro-wise.org/portal/howtos/man_howto_faq/man_howto_faq.shtmlFAQ for details on using a different checkout.
An AstrometricParameters object can be inspected by plotting the residuals of the solution versus themselves and versus position. This is exactly what the inspect() method does. For a single chip (AstrometricParameters), one figure is created with 5 panels. These five panels plot (from top down):
where DRA is
RAreference - RAextracted
Also included at the top of the figure is the DATE_OBS of the source
ReducedScienceFrame; the mean RA (<RA>) and mean Dec
(<DEC>), both calculated from the distribution plotted; the number of
pairs plotted-the same as the number of pairs used in the astrometric solution
(N); the chip name of the source ReducedScienceFrame
(CHIP:); the mean RA residual (<DRA>), mean Dec residual
(<DDEC>), and sample standard deviation of each distribution (values
following the +-), all based on the distribution plotted; the
RMS (root-mean-square) value of the distance of the residual pairs
with respect to the DDEC/DRA origin (0,0); and the maximum distance of any
residual pair from the DDEC/DRA origin (Max). There are also RMS and
N values within the first panel. Their significance will be clear when seen in
the context of the multi-chip solution.
The multi-chip case (GAstrometric) plots exactly the same information,
but with multiple pointings per chip, one figure per chip. Each pointing has a
different color to distinguish it from the other pointings. Also, the first
panel includes the RMS and N values for each pointing individually. The values
above the first panel are all calculated with respect to ALL the data
plotted.
In addition to the multi-chip reference residuals, an entire set of overlap
residuals figures is created. Instead of DRA being
RAreference - RAextracted
Lastly, two more figures are created: all reference residuals and all overlap
residuls. These figures simply show all the data from all the chips of their
respective data set. Each pointing is color-coded identically to the
individual chip figures. The reference figure in this multi-chip,
multi-pointing case is directly equivalent to the single-chip figure.
There are currently two ways to run the inspect method for either case. The
most straight-forward of these is to simply set the inspect switch in
either the AstrometericParametersTask or in the GAstromTask
when either is run:
In the other method, an AstrometricParameters or GAstrometric
object is instantiated from the database, and its inspect() invoked:
The inspection figures described above are displayed to the screen and written
to PNG files. This behavior can be modified, but explaination of these
techniques is beyond the scope of this HOW-TO. For the latest documentation
for attempting these modifications, simply view the online help (docstrings) of
the inspect method(s) and plot class(es) used to create these figures:
The previous sections described the built-in inspection methods showing predicted results of the derived solutions in AstrometricParameters and
GAstrometric objects. This section describes extended inspection methods
of the derived solutions applied to RegriddedFrames and CoaddedRegriddedFrames. All these inspection methods deliver a plot in the
same 5-panel form as the built-in inspect() methods, but using different source
catalogs for the residuals. Also, the details and latest usage information can
be found in the methods' docstrings accessed via the help() command.
This plot displays source position residuals between the corrected catalog
positions performed by LDAC or sources positions extracted from a
RegriddedFrame corrected with the same parameters and the USNO-A2.0 reference
catalog. Setting the source parameter to `solution' or `applied' selects
either the catalog used in the solution or a catalog extracted from a
RegriddedFrame to which the solution parameters have been applied,
respectively.
This plot displays source position residuals between the corrected catalog
positions performed by either LDAC or SExtractor and sources extracted from a
RegriddedFrame corrected with the same parameters. Setting the derived_type parameter to `solution' or `sextractor' selects either the
catalog used in the solution or a catalog extracted from a ReducedScienceFrame by SExtractor to which the solution parameters have
been applied to the header, respectively.
This plot displays source position residuals between a given RegriddedFrame and
all other overlapping frames, all that participate in a CoaddedRegriddedFrame.
Setting the use_coadd switch (use_coadd=True) displays source position
residuals between the CoaddedRegriddedFrame and all RegriddedFrames that went
into its creation. It plots a given RegriddedFrame source position against the
average source position from the CoaddedRegriddedFrame.
The multi-purpose inspect() method used by all frames inheriting from BaseFrame can create a plot that can be used to display the qualitative
residuals on the pixel level by using either difference images or multi-color
images using the same mechanism for inspecting individual frames. The detailed
usage of this method can be found in the http://www.astro-wise.org/portal/howtos/man_howto_inspect/man_howto_inspect.shtmlInspection HOW-TO. The general idea for this purpose is to inspect one RegriddedFrame, setting the compare parameter (compare=True) and
specifying the other RegriddedFrame with the other parameter. The
routine automatically compares only the overlapping region of the two frames.
This method requires a RegriddedFrame obtained from the
RegridTask. It needs to be first loaded into SkyCat:
First, set the desired cut level via the ``Auto Set Cut Levels'' button, or
with ``View:Cut Levels...''. Next, overlay the catalog by choosing
``Data-Servers'', then ``Catalogs'', then ``USNO at ESO''1. In the dialog that comes up, choose ``Search''
and all the sources known to the USNO survey will be plotted in circled
cross-hairs. They can now be compared directly with the sources on the
underlying frame. When inspecting the corellation, remember that the USNO
catalog is accurate only to about 0.3 arc-sec.
If the RegriddedFrame was not created from the
ReducedScienceFrame, it will need to be regridded with the
RegridTask before the inspection above can be carried out. This is
because there exist projection effects (distortions) in the
ReducedScienceFrame. The RegridTask can be run via the DPU or locally as shown in the example below:
To look at the AstrometricParameters for a given
ReducedScienceFrame, the AstrometricParameters objects of
interest must first be located in the database:
The first example shows the a query for an AstromtricParameters object
by its source ReducedScienceFrame's filename. The second shows a more
general search based on instrument, filter, chip, and date.
1.1.1.2 The Methods
awe> task = AstrometricParametersTask(red_filenames=['Sci-USER-WFI-#877-red-536
64.5.fits'],
... inspect=1, commit=0)
awe> task.execute()
or
awe> task = GAstromTask(instrument='WFI', object='2df_I_5, filter='#879',
... inspect=1, commit=0)
awe> task.execute()
awe> ap = (AstrometricParameters.reduced.filename == 'Sci-USER-WFI-#877-red-536
64.5.fits')[0]
awe> DataObject(pathname=ap.residuals).retrieve()
awe> ap.inspect()
or
awe> gas = (GAstrometric.gasslist.filename == 'GAS-2df_I_5-53760.5784035')[0]
awe> DataObject(pathname=gas.residuals).retrieve()
awe> gas.inspect()
1.1.1.3 Modifying the Default Output
awe> help(AstrometricParameters.inspect)
awe> from astro.plot.AstrometryPlot import AstromResidualsPlot
awe> help(AstromResidualsPlot)
1.1.2 Applied inspection methods
1.1.2.1 AstrometricParameters plot_residuals_to_usno() method
1.1.2.2 AstrometricParameters plot_residuals_to_regrid() method
1.1.2.3 CoaddedRegriddedFrame plot_regrid_residuals() method
1.1.3 Image inspection method
awe> reg0 = RegriddedFrame(pathname=filename0)
awe> reg1 = RegriddedFrame(pathname=filename1)
awe> reg0.inspect(compare=True, other=reg1) # common region of reg0-reg1
1.1.4 Overlaying a calibrated catalog
awe> q = RegriddedFrame.reduced.filename == 'filename.reduced.fits'
awe> os.system('skycat %s' % (q[0].filename))
awe> dpu.run('Regrid', i='WFI', d='2001-01-01', f='#845', o='Science2', C=0)
awe> regrid = RegridTask(date='2000-01-01', chip='ccd50', filter='#845',
... object='Science2', commit=0)
awe> regrid.execute()
1.1.5 Examine the AstrometricParameters values
awe> q = AstrometricParameters.reduced.filename == 'WFI.2001-02-16T01:42:31.289
_1.calibrated.fits'
awe> len(q)
1
awe> dt = datetime.datetime(2005,1,1)
awe> q = (AstrometricParameters.instrument.name == 'WFI')
awe> q &= (AstrometricParameters.filter.name == '#845')
awe> q &= (AstrometricParameters.chip.name == 'ccd50')
awe> q &= (AstrometricParameters.creation_date > dt)
awe> len(q)
1199
NOTE: Dates and times in the Astro-WISE database environment are generally in the
form of datetime objects. Therefore, when querying for them, a datetime object
must be used. The main exception is the select() method, but this
method is not universally implemented at this time.
Footnotes