The photometric pipeline distinguishes between two types of photometric
bands: key bands, and user bands. The key bands are the
Sloan u'g'r'i'
Processing data that has been observed in one of the key bands is easy in
the photometric pipeline: all the necessary data is present in the system.
However, an extra data item is required to process data that has been observed
in a user band. This extra data item is a transformation table. For every
filter of which the photometric band is a user band, a transformation
table should be present in the system. These transformation tables are
represented in the photometric pipeline by the PhotTransformation class.
The PhotTransformation class represents a table of parameters used to
transform magnitudes of standard stars from one photometric system to another
(color terms). The equation used to calculate this `transformed' magnitude
M(T)
with CT
The various components of Eqn. all map to their own
attribute of a PhotTransformation object. The
M(prm)
The transformation table is used in deriving a photometric catalog, where it is
an extra dependency that should be set. The transformation is applied to
the magnitudes of the standard stars as recorded in the standard star
catalog. As is the case for making a photometric catalog without a
transformation table, there are two ways in which catalogs can be produced from
the awe-prompt with a transformation table.
Deriving a photometric catalog with a transformation table using a pre-cooked
recipe from the awe-prompt is done thus:
The more elaborate way of making a photometric catalog is extended by a few
extra `moves':
A transformation table for a given filter can be retrieved from the database as
shown in the example below:
To insert a transformation table for a certain filter and instrument into the
database, a simple tool is available. This tool is located in the ./awe/astro/toolbox/photometry/ directory and is called ingest_transformation. To get information about how to use the tool
just type:
1.1.1 The data structure of a transformation table
1.1.2 Using a transformation table
1.1.2.1 Using a pre-cooked recipe
1. awe> from astro.recipes.PhotCalExtractResulttable import PhotcatTask
2. awe> raw = 'r336604.fits'
3. awe> task = PhotcatTask(instrument='WFC', raw=raw, chip='A5506-4',
transform=1)
4. awe> task.execute()
where the extra transform boolean switch tells the system to use a
transformation table.
1.1.2.2 Using the basic building blocks
1. awe> from astro.main.PhotTransformation import PhotTransformation
2. awe> from astro.main.PhotSrcCatalog import PhotSrcCatalog
3. awe> from astro.main.PhotRefCatalog import PhotRefCatalog
4. awe> from astro.main.AstrometricParameters import AstrometricParameters
5. awe> from astro.main.ReducedScienceFrame import ReducedScienceFrame
6. awe> frame = (ReducedScienceFrame.filename == 'r336603_4.reduced.fits')[0]
7. awe> query = (AstrometricParameters.reduced == frame) &
... (AstrometricParameters.is_valid == 1)
8. awe> astrom_params = query.max('creation_date')
9. awe> refcat = PhotRefCatalog.get()
10. awe> transform = PhotTransformation.get('2003-02-11', '#844',
... instrument='WFI')
11. awe> photcat = PhotSrcCatalog()
12. awe> photcat.refcat = refcat
13. awe> photcat.transform = transform
14. awe> photcat.frame = frame
15. awe> photcat.astrom_params = astrom_params
16. awe> photcat.refcat.retrieve()
17. awe> photcat.frame.retrieve()
18. awe> photcat.frame.weight.retrieve()
19. awe> photcat.make()
20. awe> photcat.commit()
In lines (1)-(5), the PhotTransformation class is imported together with
the usual suspects. In lines (6)-(10), the necessary dependencies are
retrieved from the database. In lines (11)-(19), a PhotSrcCatalog object
is instantiated, its dependencies are set, and the make method is called.
Please note step (13), where the extra dependency is set with the
transformation table. The photometric catalog is committed to the database in
step (20).
1.1.3 Retrieving a transformation table from the database
awe> from astro.main.PhotTransformation import PhotTransformation
awe> transform = PhotTransformation.get('2003-02-11', '#844',
... instrument='WFI')
which will return the transformation table for filter #844 that is valid for
the given date.
1.1.4 Inserting a transformation table into the system
awe $AWEPIPE/astro/toolbox/photometry/ingest_transformation.py
and a doc-string will appear on screen. The tool only accepts input for filters
and instruments that are actually present in the database. If a certain filter
or instrument is not present, the tool refuses to comply.