diff --git a/python/desc/skycatalogs/_version.py b/python/desc/skycatalogs/_version.py index 4f191369..99b3f985 100644 --- a/python/desc/skycatalogs/_version.py +++ b/python/desc/skycatalogs/_version.py @@ -1 +1 @@ -__version__ = "1.5.0-rc1" +__version__ = "1.5.0-rc2" diff --git a/python/desc/skycatalogs/objects/gaia_object.py b/python/desc/skycatalogs/objects/gaia_object.py index 59610eed..5a5ffc5a 100644 --- a/python/desc/skycatalogs/objects/gaia_object.py +++ b/python/desc/skycatalogs/objects/gaia_object.py @@ -2,6 +2,7 @@ import sys import warnings import itertools +from pathlib import PurePath import numpy as np import erfa import astropy.modeling @@ -13,18 +14,23 @@ from desc.skycatalogs.utils.shapes import Disk, PolygonalRegion from desc.skycatalogs.objects.base_object import BaseObject, ObjectCollection + __all__ = ['GaiaObject', 'GaiaCollection'] + +_FILE_PATH = str(PurePath(__file__)) +_SKYCATALOGS_DIR = _FILE_PATH[:_FILE_PATH.rindex('/python')] + + # Read in function for stellar temperature estimation given bp and rp # fluxes -_TEMP_EST_DATA_FILE = os.path.join(os.environ['SKYCATALOGS_DIR'], - 'data', 'gaia_dr2', +_TEMP_EST_DATA_FILE = os.path.join(_SKYCATALOGS_DIR, 'data', 'gaia_dr2', 'gaia_dr2_temp_from_bp-rp_ratio.txt') _TEMP_FUNC = galsim.LookupTable(*np.genfromtxt(_TEMP_EST_DATA_FILE)) # Read in the Gaia DR2 passband for the bp flux to use for setting the # SED normalizations. -_GAIA_PB_FILE = os.path.join(os.environ['SKYCATALOGS_DIR'], 'data', 'gaia_dr2', +_GAIA_PB_FILE = os.path.join(_SKYCATALOGS_DIR, 'data', 'gaia_dr2', 'GaiaDR2_RevisedPassbands.dat') _GAIA_PBS = np.genfromtxt(_GAIA_PB_FILE, names=['wl', 'g', 'g_err', 'bp', 'bp_err', 'rp', 'rp_err'])