Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-18036: Switch to HTM reference #29

Merged
merged 2 commits into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.fits binary
11 changes: 0 additions & 11 deletions astrometry_net_data/andConfig.py

This file was deleted.

36,016 changes: 0 additions & 36,016 deletions astrometry_net_data/index-120830000.fits

This file was deleted.

32,536 changes: 0 additions & 32,536 deletions astrometry_net_data/index-120830001.fits

This file was deleted.

29,636 changes: 0 additions & 29,636 deletions astrometry_net_data/index-120830002.fits

This file was deleted.

28,249 changes: 0 additions & 28,249 deletions astrometry_net_data/index-120830003.fits

This file was deleted.

27,502 changes: 0 additions & 27,502 deletions astrometry_net_data/index-120830004.fits

This file was deleted.

Empty file.
5 changes: 1 addition & 4 deletions bin/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,11 @@ done
eups list --setup obs_sdss >/dev/null 2>&1 || ( echo "obs_sdss does not appear to be setup, or eups is not configured correctly."; exit 1; )
type processCcd.py >/dev/null 2>&1 || { echo "Could not find processCcd.py on your path. It is supposed to be in obs_sdss."; exit 1; }
test -d input || { echo "Could not find the 'input' directory. Run this script from the directory where the 'input' subdirectory resides."; exit 1; }
test -d astrometry_net_data || { echo "Could not find the 'astrometry_net_data' directory."; exit 1; }
set -e

# Tell the stack where to find astrometric reference catalogs
setup --nolocks -v -k -r ./astrometry_net_data astrometry_net_data

rm -rf output detected-sources.txt output_small detected-sources_small.txt
# Reconfigure to use the a.net reference catalog
# Reconfigure to use the included reference catalog
CONFIG=config/processCcd.py
# The following config overrides are necessary for the demo to run, until new 'truth' values are computed
# based on the new stack default of growing footprints and running the deblender. See issue 4801
Expand Down
20 changes: 14 additions & 6 deletions config/processCcd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Configure astrometry.net reference loader, now that it is no longer the default.
# This file can be removed as part of DM-18036.
from lsst.meas.extensions.astrometryNet import LoadAstrometryNetObjectsTask
config.calibrate.astromRefObjLoader.retarget(LoadAstrometryNetObjectsTask)
config.calibrate.photoRefObjLoader.retarget(LoadAstrometryNetObjectsTask)
config.charImage.refObjLoader.retarget(LoadAstrometryNetObjectsTask)
# This sets the reference catalog name for Gen2.
for refObjLoader in (config.calibrate.astromRefObjLoader,
config.calibrate.photoRefObjLoader,
config.charImage.refObjLoader,
):
refObjLoader.ref_dataset_name = "sdss_demo_ref_cat"

# This sets up the reference catalog for Gen3.
# Note that in Gen3, we've stopped pretending (which is what Gen2 does,
# for backwards compatibility) that charImage uses a reference catalog.
config.calibrate.connections.astromRefCat = "sdss_demo_ref_cat"
config.calibrate.connections.photoRefCat = "sdss_demo_ref_cat"

config.calibrate.photoCal.photoCatName = "sdss_demo_ref_cat"
93 changes: 93 additions & 0 deletions input/config/IngestIndexedReferenceTask.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import lsst.meas.algorithms.ingestIndexReferenceTask
assert type(config)==lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceConfig, 'config is of type %s.%s instead of lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceConfig' % (type(config).__module__, type(config).__name__)
import lsst.meas.algorithms.readFitsCatalogTask
import lsst.meas.algorithms.indexerRegistry
# Version number of the persisted on-disk storage format.
# Version 0 had Jy as flux units (default 0 for unversioned catalogs).
# Version 1 had nJy as flux units.
config.dataset_config.format_version=1

# String to pass to the butler to retrieve persisted files.
config.dataset_config.ref_dataset_name='sdss_demo_ref_cat'

# Depth of the HTM tree to make. Default is depth=7 which gives ~ 0.3 sq. deg. per trixel.
config.dataset_config.indexer['HTM'].depth=7

config.dataset_config.indexer.name='HTM'
# Number of python processes to use when ingesting.
config.n_processes=1

config.file_reader.retarget(target=lsst.meas.algorithms.readFitsCatalogTask.ReadFitsCatalogTask, ConfigClass=lsst.meas.algorithms.readFitsCatalogTask.ReadFitsCatalogConfig)

# HDU containing the desired binary table, 0-based but a binary table never occurs in HDU 0
config.file_reader.hdu=1

# Mapping of input column name: output column name; each specified column must exist, but additional columns in the input data are written using their original name.
config.file_reader.column_map={}

# Name of RA column
config.ra_name='ra'

# Name of Dec column
config.dec_name='dec'

# Name of RA error column
config.ra_err_name=None

# Name of Dec error column
config.dec_err_name=None

# 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=['u', 'g', 'r', 'i', 'z']

# A map of magnitude column name (key) to magnitude error column (value).
config.mag_err_column_map={'u': 'u_err', 'g': 'g_err', 'r': 'r_err', 'i': 'i_err', 'z': 'z_err'}

# Name of column stating if satisfactory for photometric calibration (optional).
config.is_photometric_name=None

# Name of column stating if the object is resolved (optional).
config.is_resolved_name=None

# Name of column stating if the object is measured to be variable (optional).
config.is_variable_name=None

# Name of column to use as an identifier (optional).
config.id_name='sdssid'

# Name of proper motion RA column
config.pm_ra_name=None

# Name of proper motion Dec column
config.pm_dec_name=None

# Name of proper motion RA error column
config.pm_ra_err_name=None

# Name of proper motion Dec error column
config.pm_dec_err_name=None

# Scale factor by which to multiply proper motion values to obtain units of milliarcsec/year
config.pm_scale=1.0

# Name of parallax column
config.parallax_name=None

# Name of parallax error column
config.parallax_err_name=None

# Scale factor by which to multiply parallax values to obtain units of milliarcsec
config.parallax_scale=1.0

# Name of epoch column
config.epoch_name=None

# Format of epoch column: any value accepted by astropy.time.Time, e.g. 'iso' or 'unix'
config.epoch_format=None

# Scale of epoch column: any value accepted by astropy.time.Time, e.g. 'utc'
config.epoch_scale=None

# Extra columns to add to the reference catalog.
config.extra_col_names=['starnotgal']