Background
With the adoption of RFC-257
and the implementation of DM-8232
it is now possible to feed two different reference catalogs to the single frame measurement task (processCcd.py
). Because of the way a.net index files are located, it is not possible to use this feature with them. Instead, you will need to use the new HTM indexed file format.
Creating HTM catalogs
Since the ingestion script is a command line task, you will need a data repository to ingest into. This means that you will need, at a minimum, a directory and a _mapper
. I tend to use the mapper in obs_test
, but if you have specific ingest overrides, you can use a particular obs
package.
$> mkdir my_ref_repo
$> echo "lsst.obs.test.TestMapper" > my_ref_repo/_mapper
For the purpose of demonstration, I’ve made a fake reference catalog called simple_ref.txt
.
mra, mdec, my_id, a, a_err, b_err, b
1., 2., 1, 20., .2, .3, 21.
2., 3., 2, 19., .1, .25, 22.
The required columns are RA
, Dec
, at least one magnitude, and id
. Since these are required, but no naming convention is enforced, you need a minimal config to do the ingestion. Following is an example config for this reference catalog. Note that this is slightly more than minimal.
# String to pass to the butler to retrieve persisted files.
config.dataset_config.ref_dataset_name='my_super_special_reference_catalog'
# Name of RA column
config.ra_name='mra'
# Name of Dec column
config.dec_name='mdec'
# Name of column to use as an identifier (optional).
config.id_name='my_id'
# The values in the reference catalog are assumed to be in AB magnitudes. List of column names to use for
# photometric information. At least one entry is required.
config.mag_column_list=['a', 'b']
# A map of magnitude column name (key) to magnitude error column (value).
config.mag_err_column_map={'a':'a_err', 'b':'b_err'}
At this point ingestion is as simple as:
$> ingestReferenceCatalog.py my_ref_repo/ simple_ref.txt --configfile my_ref.cfg
###Using HTM ref catalogs
If you ingested into a data repository with your data in it, you need do nothing more than specify the name of the catalog on the command line. I.e.
$> processCcd.py my_repo --id --config calibrate.photoRefObjLoader.ref_dataset_name='catalog_1' calibrate.astromRefObjLoader.ref_dataset_name='catalog_2'
Where catalog_1
and catalog_2
are the names of the catalogs specified in the config at ingest time. There is also a standard set of reference catalogs available from /datasets/refcats/htm/htm_baseline
. You can link that directory into your data repo and have access to any of the baseline reference catalogs available there.
$> ln -s /datasets/refcats/htm/htm_baseline path_to_my_repo/ref_cats
The directory in the data repo must be called ref_cats
unless this template is overridden in a policy file.
See RFC-257
for a fully worked example using DM-8232
.