diff --git a/config/.ruff.toml b/config/.ruff.toml
index e67679e02..dbfc69145 100644
--- a/config/.ruff.toml
+++ b/config/.ruff.toml
@@ -1,3 +1,5 @@
extend = "../pyproject.toml"
+# Use this line when config moves inside python tree.
+# extend = "../../../../../../pyproject.toml"
# Ignore undefined "config", as config files are loaded with `eval`.
builtins = ["config"]
diff --git a/config/bias.py b/config/bias.py
index 6cde08506..107429716 100644
--- a/config/bias.py
+++ b/config/bias.py
@@ -20,7 +20,5 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "lsstCamCommon.py"))
-config.isr.load(os.path.join(os.path.dirname(__file__), "isr.py"))
+config.load("lsstCamCommon.py")
+config.isr.load("isr.py")
diff --git a/config/calibrate.py b/config/calibrate.py
index 7a6d4fb71..b1023aabe 100644
--- a/config/calibrate.py
+++ b/config/calibrate.py
@@ -23,18 +23,15 @@
"""
LSST Cam-specific overrides for CalibrateTask
"""
-import os.path
-
-obsConfigDir = os.path.dirname(__file__)
# TODO: Turn color terms back on when they are available
config.photoCal.applyColorTerms = False
config.photoCal.photoCatName = "the_monster_20250219"
# Activate calibration of measurements: required for aperture corrections
-config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
-config.measurement.load(os.path.join(obsConfigDir, "kron.py"))
-config.measurement.load(os.path.join(obsConfigDir, "hsm.py"))
+config.measurement.load("apertures.py")
+config.measurement.load("kron.py")
+config.measurement.load("hsm.py")
config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"]
diff --git a/config/characterizeImage.py b/config/characterizeImage.py
index 36d16e317..236dadb51 100644
--- a/config/characterizeImage.py
+++ b/config/characterizeImage.py
@@ -23,15 +23,12 @@
"""
LSST Cam-specific overrides for CharacterizeImageTask
"""
-import os.path
-
-obsConfigDir = os.path.join(os.path.dirname(__file__))
# PSF determination
config.measurePsf.reserve.fraction = 0.2
# Activate calibration of measurements: required for aperture corrections
-config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
+config.measurement.load("apertures.py")
config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"]
config.measurement.plugins["base_Jacobian"].pixelScale = 0.2
diff --git a/config/comCam/analysisToolsPhotometricCatalogMatch.py b/config/comCam/analysisToolsPhotometricCatalogMatch.py
index d5f3b3d58..930b37076 100644
--- a/config/comCam/analysisToolsPhotometricCatalogMatch.py
+++ b/config/comCam/analysisToolsPhotometricCatalogMatch.py
@@ -1,5 +1,2 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
diff --git a/config/comCam/analysisToolsPhotometricCatalogMatchVisit.py b/config/comCam/analysisToolsPhotometricCatalogMatchVisit.py
index d5f3b3d58..930b37076 100644
--- a/config/comCam/analysisToolsPhotometricCatalogMatchVisit.py
+++ b/config/comCam/analysisToolsPhotometricCatalogMatchVisit.py
@@ -1,5 +1,2 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
diff --git a/config/comCam/calibrate.py b/config/comCam/calibrate.py
index 33cb3e1bf..89ca6c237 100644
--- a/config/comCam/calibrate.py
+++ b/config/comCam/calibrate.py
@@ -1,7 +1,4 @@
-import os
-
-obsConfigDir = os.path.join(os.path.dirname(__file__))
-config.photoRefObjLoader.load(os.path.join(obsConfigDir, "filterMap.py"))
+config.photoRefObjLoader.load("filterMap.py")
config.connections.astromRefCat = "the_monster_20250219"
# Loosen maxOffset to account for early pointing model inaccuracy.
@@ -17,10 +14,10 @@
# Overrides to improved astrometry matching.
config.astrometry.doFiducialZeroPointCull = True
-config.astrometry.load(os.path.join(obsConfigDir, "fiducialZeroPoint.py"))
+config.astrometry.load("fiducialZeroPoint.py")
# Loosened for early ComCam with large PSFs.
config.photoCal.match.sourceSelection.doUnresolved = False
# Exposure summary stats.
-config.computeSummaryStats.load(os.path.join(obsConfigDir, "computeExposureSummaryStats.py"))
+config.computeSummaryStats.load("computeExposureSummaryStats.py")
diff --git a/config/comCam/calibrateImage.py b/config/comCam/calibrateImage.py
index 3d55d0bfc..54f6454da 100644
--- a/config/comCam/calibrateImage.py
+++ b/config/comCam/calibrateImage.py
@@ -1,10 +1,6 @@
-import os
-
from lsst.meas.algorithms import ColorLimit # Configure the photometry to use the_monster.
# Configure the photometry to use atlas_refcat2.
-config_dir = os.path.dirname(__file__)
-
config.connections.photometry_ref_cat = "the_monster_20250219"
config.connections.astrometry_ref_cat = "the_monster_20250219"
@@ -15,8 +11,8 @@
config.star_background.doApplyFlatBackgroundRatio = True
config.star_detection.doApplyFlatBackgroundRatio = True
-config.astrometry.load(os.path.join(config_dir, "filterMap.py"))
-config.photometry_ref_loader.load(os.path.join(config_dir, "filterMap.py"))
+config.astrometry.load("filterMap.py")
+config.photometry_ref_loader.load("filterMap.py")
config.photometry.match.referenceSelection.magLimit.fluxField = "monster_ComCam_r_flux"
colors = config.photometry.match.referenceSelection.colorLimits
@@ -30,7 +26,7 @@
config.photometry.applyColorTerms = False
config.photometry.photoCatName = "the_monster_20250219"
-config.compute_summary_stats.load(os.path.join(config_dir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
# Loosen maxOffset to account for early pointing model inaccuracy.
config.astrometry.matcher.maxOffsetPix=1500
@@ -45,7 +41,7 @@
# Overrides to improved astrometry matching.
config.astrometry.doFiducialZeroPointCull = True
-config.astrometry.load(os.path.join(config_dir, "fiducialZeroPoint.py"))
+config.astrometry.load("fiducialZeroPoint.py")
# Loosened for early ComCam with large PSFs.
config.photometry.match.sourceSelection.doUnresolved = False
diff --git a/config/comCam/computeExposureSummaryStats.py b/config/comCam/computeExposureSummaryStats.py
index 06f799fe4..80a397f84 100644
--- a/config/comCam/computeExposureSummaryStats.py
+++ b/config/comCam/computeExposureSummaryStats.py
@@ -1,7 +1,4 @@
-import os.path
-config_dir = os.path.dirname(__file__)
-
-config.load(os.path.join(config_dir, "fiducialPsfSigma.py"))
-config.load(os.path.join(config_dir, "fiducialSkyBackground.py"))
-config.load(os.path.join(config_dir, "fiducialZeroPoint.py"))
+config.load("fiducialPsfSigma.py")
+config.load("fiducialSkyBackground.py")
+config.load("fiducialZeroPoint.py")
diff --git a/config/comCam/fgcmBuildFromIsolatedStars.py b/config/comCam/fgcmBuildFromIsolatedStars.py
index acd834f01..905ae3c8e 100644
--- a/config/comCam/fgcmBuildFromIsolatedStars.py
+++ b/config/comCam/fgcmBuildFromIsolatedStars.py
@@ -1,5 +1,3 @@
-import os
-
physical_to_band = {
"u_02": "u",
"g_01": "g",
@@ -17,10 +15,8 @@
config.minPerBand = 2
config.connections.ref_cat = "the_monster_20250219"
-configDir = os.path.join(os.path.dirname(__file__))
config.physicalFilterMap = physical_to_band
-obsConfigDir = os.path.join(os.path.dirname(__file__))
-config.fgcmLoadReferenceCatalog.load(os.path.join(obsConfigDir, "filterMap.py"))
+config.fgcmLoadReferenceCatalog.load("filterMap.py")
config.fgcmLoadReferenceCatalog.applyColorTerms = False
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = "monster_ComCam_i_flux"
diff --git a/config/comCam/finalize_characterization_detector.py b/config/comCam/finalize_characterization_detector.py
index 9943467d7..b853923a3 100644
--- a/config/comCam/finalize_characterization_detector.py
+++ b/config/comCam/finalize_characterization_detector.py
@@ -1,3 +1 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "finalize_characterization.py"))
+config.load("finalize_characterization.py")
diff --git a/config/comCam/reprocessVisitImage.py b/config/comCam/reprocessVisitImage.py
index 59d7cad1e..4fe782da4 100644
--- a/config/comCam/reprocessVisitImage.py
+++ b/config/comCam/reprocessVisitImage.py
@@ -1,8 +1,5 @@
#!/usr/bin/env python
-import os.path
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
config.do_apply_flat_background_ratio = True
diff --git a/config/comCam/updateVisitSummary.py b/config/comCam/updateVisitSummary.py
index c5273542c..6ccc2a9c3 100644
--- a/config/comCam/updateVisitSummary.py
+++ b/config/comCam/updateVisitSummary.py
@@ -1,6 +1,3 @@
#!/usr/bin/env python
-import os.path
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
diff --git a/config/comCamSim/analysisToolsPhotometricCatalogMatch.py b/config/comCamSim/analysisToolsPhotometricCatalogMatch.py
index 52ff0d9c1..20e57b7c4 100644
--- a/config/comCamSim/analysisToolsPhotometricCatalogMatch.py
+++ b/config/comCamSim/analysisToolsPhotometricCatalogMatch.py
@@ -1,7 +1,4 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
config.connections.refCatalog = "uw_stars_20240524"
diff --git a/config/comCamSim/analysisToolsPhotometricCatalogMatchVisit.py b/config/comCamSim/analysisToolsPhotometricCatalogMatchVisit.py
index 6f223cbf2..e08e45767 100644
--- a/config/comCamSim/analysisToolsPhotometricCatalogMatchVisit.py
+++ b/config/comCamSim/analysisToolsPhotometricCatalogMatchVisit.py
@@ -1,7 +1,4 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
config.connections.refCatalog = "uw_stars_20240524"
diff --git a/config/comCamSim/calibrate.py b/config/comCamSim/calibrate.py
index aa9b0bd20..86506bb97 100644
--- a/config/comCamSim/calibrate.py
+++ b/config/comCamSim/calibrate.py
@@ -20,16 +20,12 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-configDir = os.path.dirname(__file__)
-
config.connections.astromRefCat = "uw_stars_20240524"
config.connections.photoRefCat = "uw_stars_20240524"
config.photoCal.photoCatName = "uw_stars_20240524"
-config.astromRefObjLoader.load(os.path.join(configDir, "filterMap.py"))
-config.photoRefObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.astromRefObjLoader.load("filterMap.py")
+config.photoRefObjLoader.load("filterMap.py")
config.astromRefObjLoader.anyFilterMapsToThis = None
config.photoRefObjLoader.anyFilterMapsToThis = None
@@ -52,4 +48,4 @@
config.photoCal.match.referenceSelection.magLimit.maximum = 22.0
# Exposure summary stats
-config.computeSummaryStats.load(os.path.join(configDir, "computeExposureSummaryStats.py"))
+config.computeSummaryStats.load("computeExposureSummaryStats.py")
diff --git a/config/comCamSim/calibrateImage.py b/config/comCamSim/calibrateImage.py
index 8e6b03a9d..35f207e0b 100644
--- a/config/comCamSim/calibrateImage.py
+++ b/config/comCamSim/calibrateImage.py
@@ -1,13 +1,10 @@
# ComCamSim-specialized configuration for CalibrateImageTask.
-import os.path
-
-configDir = os.path.dirname(__file__)
config.connections.astrometry_ref_cat = "uw_stars_20240524"
config.connections.photometry_ref_cat = "uw_stars_20240524"
-config.astrometry_ref_loader.load(os.path.join(configDir, "filterMap.py"))
-config.photometry_ref_loader.load(os.path.join(configDir, "filterMap.py"))
+config.astrometry_ref_loader.load("filterMap.py")
+config.photometry_ref_loader.load("filterMap.py")
config.astrometry_ref_loader.anyFilterMapsToThis = None
config.photometry_ref_loader.anyFilterMapsToThis = None
@@ -30,4 +27,4 @@
config.photometry.match.referenceSelection.magLimit.maximum = 22.0
# Exposure summary stats
-config.compute_summary_stats.load(os.path.join(configDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
diff --git a/config/comCamSim/computeExposureSummaryStats.py b/config/comCamSim/computeExposureSummaryStats.py
index 06f799fe4..ed2c648d7 100644
--- a/config/comCamSim/computeExposureSummaryStats.py
+++ b/config/comCamSim/computeExposureSummaryStats.py
@@ -1,7 +1,3 @@
-import os.path
-
-config_dir = os.path.dirname(__file__)
-
-config.load(os.path.join(config_dir, "fiducialPsfSigma.py"))
-config.load(os.path.join(config_dir, "fiducialSkyBackground.py"))
-config.load(os.path.join(config_dir, "fiducialZeroPoint.py"))
+config.load("fiducialPsfSigma.py")
+config.load("fiducialSkyBackground.py")
+config.load("fiducialZeroPoint.py")
diff --git a/config/comCamSim/fgcmBuildFromIsolatedStars.py b/config/comCamSim/fgcmBuildFromIsolatedStars.py
index 0edda9e30..f34b5eb17 100644
--- a/config/comCamSim/fgcmBuildFromIsolatedStars.py
+++ b/config/comCamSim/fgcmBuildFromIsolatedStars.py
@@ -1,5 +1,3 @@
-import os
-
physical_to_band = {
"g_01": "g",
"r_03": "r",
@@ -14,7 +12,6 @@
config.minPerBand = 2
config.connections.ref_cat = "uw_stars_20240524"
-configDir = os.path.join(os.path.dirname(__file__))
config.physicalFilterMap = physical_to_band
config.fgcmLoadReferenceCatalog.filterMap = {
"g": "lsst_g",
diff --git a/config/comCamSim/reprocessVisitImage.py b/config/comCamSim/reprocessVisitImage.py
index c5273542c..715d8b46b 100644
--- a/config/comCamSim/reprocessVisitImage.py
+++ b/config/comCamSim/reprocessVisitImage.py
@@ -1,6 +1,2 @@
#!/usr/bin/env python
-import os.path
-
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
diff --git a/config/comCamSim/updateVisitSummary.py b/config/comCamSim/updateVisitSummary.py
index c5273542c..715d8b46b 100644
--- a/config/comCamSim/updateVisitSummary.py
+++ b/config/comCamSim/updateVisitSummary.py
@@ -1,6 +1,2 @@
#!/usr/bin/env python
-import os.path
-
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
diff --git a/config/compareWarpAssembleCoadd.py b/config/compareWarpAssembleCoadd.py
index a56469f05..0ad1ec212 100644
--- a/config/compareWarpAssembleCoadd.py
+++ b/config/compareWarpAssembleCoadd.py
@@ -20,10 +20,8 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
# Load configs from base assembleCoadd
-config.load(os.path.join(os.path.dirname(__file__), "assembleCoadd.py"))
+config.load("assembleCoadd.py")
# 200 rows (since patch width is typically < 10k pixels
config.assembleStaticSkyModel.subregionSize = (10000, 200)
diff --git a/config/dark.py b/config/dark.py
index d0f6e94f2..a88dbadbe 100644
--- a/config/dark.py
+++ b/config/dark.py
@@ -20,9 +20,7 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "lsstCamCommon.py"))
-config.isr.load(os.path.join(os.path.dirname(__file__), "isr.py"))
+config.load("lsstCamCommon.py")
+config.isr.load("isr.py")
config.repair.cosmicray.nCrPixelMax = 100000
diff --git a/config/findDefects.py b/config/findDefects.py
index 9f353360c..925efaa96 100644
--- a/config/findDefects.py
+++ b/config/findDefects.py
@@ -1,4 +1,2 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "lsstCamCommon.py"))
+config.load("lsstCamCommon.py")
config.ccdKey = "detector"
diff --git a/config/flat.py b/config/flat.py
index 6cde08506..107429716 100644
--- a/config/flat.py
+++ b/config/flat.py
@@ -20,7 +20,5 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "lsstCamCommon.py"))
-config.isr.load(os.path.join(os.path.dirname(__file__), "isr.py"))
+config.load("lsstCamCommon.py")
+config.isr.load("isr.py")
diff --git a/config/forcedPhotCcd.py b/config/forcedPhotCcd.py
index 6996ea08a..18e9903d7 100644
--- a/config/forcedPhotCcd.py
+++ b/config/forcedPhotCcd.py
@@ -20,9 +20,7 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.measurement.load(os.path.join(os.path.dirname(__file__), "apertures.py"))
+config.measurement.load("apertures.py")
# We only need the 12 pixel aperture for subsequent measurements.
config.measurement.plugins["base_CircularApertureFlux"].radii = [12.0]
diff --git a/config/forcedPhotCoadd.py b/config/forcedPhotCoadd.py
index 4572f62d2..c50da6ce0 100644
--- a/config/forcedPhotCoadd.py
+++ b/config/forcedPhotCoadd.py
@@ -20,13 +20,11 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.measurement.load(os.path.join(os.path.dirname(__file__), "apertures.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "kron.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "convolvedFluxes.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "gaap.py"))
-config.load(os.path.join(os.path.dirname(__file__), "cmodel.py"))
+config.measurement.load("apertures.py")
+config.measurement.load("kron.py")
+config.measurement.load("convolvedFluxes.py")
+config.measurement.load("gaap.py")
+config.load("cmodel.py")
config.measurement.slots.gaussianFlux = None
diff --git a/config/hsm.py b/config/hsm.py
index b4f065577..00f8ed75f 100644
--- a/config/hsm.py
+++ b/config/hsm.py
@@ -23,11 +23,8 @@
# Enable HSM shapes (unsetup meas_extensions_shapeHSM to disable)
# 'config' is a SourceMeasurementConfig.
-import os.path
-from lsst.utils import getPackageDir
-
try:
- config.load(os.path.join(getPackageDir("meas_extensions_shapeHSM"), "config", "enable.py"))
+ config.load("eups://meas_extensions_shapeHSM/config/enable.py")
config.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendNChild = "deblend_nChild"
# Enable debiased moments
config.plugins.names |= ["ext_shapeHSM_HsmPsfMomentsDebiased"]
diff --git a/config/imsim/analysisToolsPhotometricCatalogMatch.py b/config/imsim/analysisToolsPhotometricCatalogMatch.py
index 109c4190d..de650bb87 100644
--- a/config/imsim/analysisToolsPhotometricCatalogMatch.py
+++ b/config/imsim/analysisToolsPhotometricCatalogMatch.py
@@ -1,6 +1,3 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
config.connections.refCatalog = "cal_ref_cat_2_2"
diff --git a/config/imsim/analysisToolsPhotometricCatalogMatchVisit.py b/config/imsim/analysisToolsPhotometricCatalogMatchVisit.py
index 109c4190d..de650bb87 100644
--- a/config/imsim/analysisToolsPhotometricCatalogMatchVisit.py
+++ b/config/imsim/analysisToolsPhotometricCatalogMatchVisit.py
@@ -1,6 +1,3 @@
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
config.connections.refCatalog = "cal_ref_cat_2_2"
diff --git a/config/imsim/calibrate.py b/config/imsim/calibrate.py
index fc1aa9424..032eab3ba 100644
--- a/config/imsim/calibrate.py
+++ b/config/imsim/calibrate.py
@@ -22,15 +22,12 @@
"""
imsim-specific overrides for CalibrateTask
"""
-import os.path
-
-configDir = os.path.dirname(__file__)
# imSim-specifc reference catalog configuration.
config.connections.astromRefCat = "cal_ref_cat"
config.connections.photoRefCat = "cal_ref_cat"
-config.astromRefObjLoader.load(os.path.join(configDir, "filterMap.py"))
-config.photoRefObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.astromRefObjLoader.load("filterMap.py")
+config.photoRefObjLoader.load("filterMap.py")
config.astromRefObjLoader.anyFilterMapsToThis = None
# Reduce Chebyshev polynomial order for background fitting (DM-30820)
diff --git a/config/imsim/calibrateImage.py b/config/imsim/calibrateImage.py
index 1ac28ab0e..1396ce7e9 100644
--- a/config/imsim/calibrateImage.py
+++ b/config/imsim/calibrateImage.py
@@ -1,9 +1,6 @@
"""
ImSim-specific overrides for CalibrateImageTask
"""
-import os
-
-config_dir = os.path.join(os.path.dirname(__file__))
# imsim background model is a single value per detector.
config.psf_subtract_background.approxOrderX = 1
@@ -20,9 +17,9 @@
config.connections.astrometry_ref_cat = "cal_ref_cat_2_2"
config.connections.photometry_ref_cat = "cal_ref_cat_2_2"
# Use the ImSim filterMap ("lsst_X_smeared" reference fluxes).
-config.astrometry_ref_loader.load(os.path.join(config_dir, "filterMap.py"))
+config.astrometry_ref_loader.load("filterMap.py")
config.astrometry_ref_loader.anyFilterMapsToThis = None
-config.photometry_ref_loader.load(os.path.join(config_dir, "filterMap.py"))
+config.photometry_ref_loader.load("filterMap.py")
# Make sure galaxies from truth catalog are not used for calibration.
config.astrometry.referenceSelector.doUnresolved = True
diff --git a/config/imsim/characterizeImage.py b/config/imsim/characterizeImage.py
index fac611d33..d682f7105 100644
--- a/config/imsim/characterizeImage.py
+++ b/config/imsim/characterizeImage.py
@@ -23,15 +23,11 @@
imsim-specific overrides for CharacterizeImageTask
"""
-import os.path
-
-obsConfigDir = os.path.join(os.path.dirname(__file__))
-
-config.load(os.path.join(obsConfigDir, "..", "cmodel.py"))
-config.measurement.load(os.path.join(obsConfigDir, "..", "kron.py"))
-config.measurement.load(os.path.join(obsConfigDir, "..", "convolvedFluxes.py"))
-config.measurement.load(os.path.join(obsConfigDir, "..", "gaap.py"))
-config.measurement.load(os.path.join(obsConfigDir, "..", "hsm.py"))
+config.load("../cmodel.py")
+config.measurement.load("../kron.py")
+config.measurement.load("../convolvedFluxes.py")
+config.measurement.load("../gaap.py")
+config.measurement.load("../hsm.py")
if "ext_shapeHSM_HsmShapeRegauss" in config.measurement.plugins:
# no deblending has been done
diff --git a/config/imsim/convertRepo.py b/config/imsim/convertRepo.py
index 4335238a4..59e1e3cc3 100644
--- a/config/imsim/convertRepo.py
+++ b/config/imsim/convertRepo.py
@@ -1,9 +1,7 @@
-import os.path
-
from lsst.obs.base.gen2to3 import ConvertRepoSkyMapConfig
config.skyMaps["DC2"] = ConvertRepoSkyMapConfig()
-config.skyMaps["DC2"].load(os.path.join(os.path.dirname(__file__), "..", "makeSkyMap.py"))
+config.skyMaps["DC2"].load("../makeSkyMap.py")
# If there's no skymap in the root repo, but some dataset defined on
# tracts/patches is present there (i.e. brightObjectMask), assume this
# skymap.
diff --git a/config/imsim/jointcal.py b/config/imsim/jointcal.py
index 1f53ceb59..daa3c393a 100644
--- a/config/imsim/jointcal.py
+++ b/config/imsim/jointcal.py
@@ -20,11 +20,9 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
# existing synthetic refcat does not have coordinate errors
config.astrometryReferenceErr = 1
-filterMapFile = os.path.join(os.path.dirname(__file__), "filterMap.py")
+filterMapFile = "filterMap.py"
config.astrometryRefObjLoader.load(filterMapFile)
config.photometryRefObjLoader.load(filterMapFile)
diff --git a/config/latiss/analysisToolsAstrometricCatalogMatch.py b/config/latiss/analysisToolsAstrometricCatalogMatch.py
index 7cd22e90b..df30d3bfb 100644
--- a/config/latiss/analysisToolsAstrometricCatalogMatch.py
+++ b/config/latiss/analysisToolsAstrometricCatalogMatch.py
@@ -1,7 +1,6 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
diff --git a/config/latiss/analysisToolsPhotometricCatalogMatch.py b/config/latiss/analysisToolsPhotometricCatalogMatch.py
index 9a3168698..6673adeaa 100644
--- a/config/latiss/analysisToolsPhotometricCatalogMatch.py
+++ b/config/latiss/analysisToolsPhotometricCatalogMatch.py
@@ -1,10 +1,6 @@
-import os.path
-
-OBS_CONFIG_DIR = os.path.dirname(__file__)
-
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(OBS_CONFIG_DIR, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = True
-config.referenceCatalogLoader.colorterms.load(os.path.join(OBS_CONFIG_DIR, "colorterms.py"))
+config.referenceCatalogLoader.colorterms.load("colorterms.py")
config.connections.refCatalog = "atlas_refcat2_20220201"
config.filterNames = ["SDSSg_65mm~empty",
diff --git a/config/latiss/analysisToolsPhotometricCatalogMatchVisit.py b/config/latiss/analysisToolsPhotometricCatalogMatchVisit.py
index 1ac7543d9..ce08532bb 100644
--- a/config/latiss/analysisToolsPhotometricCatalogMatchVisit.py
+++ b/config/latiss/analysisToolsPhotometricCatalogMatchVisit.py
@@ -1,9 +1,5 @@
-import os.path
-
-OBS_CONFIG_DIR = os.path.dirname(__file__)
-
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(OBS_CONFIG_DIR, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = True
-config.referenceCatalogLoader.colorterms.load(os.path.join(OBS_CONFIG_DIR, "colorterms.py"))
+config.referenceCatalogLoader.colorterms.load("colorterms.py")
config.connections.refCatalog = "atlas_refcat2_20220201"
diff --git a/config/latiss/associatedSourcesTractAnalysis.py b/config/latiss/associatedSourcesTractAnalysis.py
index 243d0d5d0..0992a3a55 100644
--- a/config/latiss/associatedSourcesTractAnalysis.py
+++ b/config/latiss/associatedSourcesTractAnalysis.py
@@ -1,9 +1,8 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
# gbdesAstrometricFitTask is not run for latiss, so there is no proper motion
# catalog to use here.
diff --git a/config/latiss/bias.py b/config/latiss/bias.py
index d1e7719db..f8d9c4c69 100644
--- a/config/latiss/bias.py
+++ b/config/latiss/bias.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "latiss.py"))
+config.load("latiss.py")
diff --git a/config/latiss/calibrate.py b/config/latiss/calibrate.py
index 81775b775..af717d2fd 100644
--- a/config/latiss/calibrate.py
+++ b/config/latiss/calibrate.py
@@ -1,20 +1,16 @@
-import os.path
-
from lsst.meas.algorithms import ColorLimit
from lsst.meas.astrom import FitAffineWcsTask
-obsConfigDir = os.path.dirname(__file__)
-
config.photoCal.match.referenceSelection.magLimit.fluxField = "r_flux"
colors = config.photoCal.match.referenceSelection.colorLimits
colors["g-r"] = ColorLimit(primary="g_flux", secondary="r_flux", minimum=0.4, maximum=2.0)
config.photoCal.applyColorTerms = True
config.photoCal.photoCatName = "atlas_refcat2_20220201"
config.connections.photoRefCat = "atlas_refcat2_20220201"
-config.photoCal.colorterms.load(os.path.join(obsConfigDir, "colorterms.py"))
+config.photoCal.colorterms.load("colorterms.py")
# Configure the photometry to use atlas_refcat2.
-config.photoRefObjLoader.load(os.path.join(obsConfigDir, "filterMap.py"))
+config.photoRefObjLoader.load("filterMap.py")
# We often have very few sources due to smaller aperture so use affine task.
config.astrometry.wcsFitter.retarget(FitAffineWcsTask)
diff --git a/config/latiss/calibrateImage.py b/config/latiss/calibrateImage.py
index c9beed4b4..eba13f54b 100644
--- a/config/latiss/calibrateImage.py
+++ b/config/latiss/calibrateImage.py
@@ -1,9 +1,5 @@
-import os.path
-
from lsst.meas.algorithms import ColorLimit
-config_dir = os.path.dirname(__file__)
-
# Some modifications to the objectSize selector for PSF estimation optimized
# for LATISS data.
config.psf_measure_psf.starSelector["objectSize"].signalToNoiseMin = 10
@@ -46,7 +42,7 @@
# Configure the photometry to use atlas_refcat2.
config.connections.photometry_ref_cat = "atlas_refcat2_20220201"
-config.photometry_ref_loader.load(os.path.join(config_dir, "filterMap.py"))
+config.photometry_ref_loader.load("filterMap.py")
config.photometry.match.referenceSelection.magLimit.fluxField = "r_flux"
colors = config.photometry.match.referenceSelection.colorLimits
@@ -54,7 +50,7 @@
config.photometry.applyColorTerms = True
config.photometry.photoCatName = "atlas_refcat2_20220201"
-config.photometry.colorterms.load(os.path.join(config_dir, "colorterms.py"))
+config.photometry.colorterms.load("colorterms.py")
# Note that the following two config values were validated on data taken in
# 2022-11 and 2022-12, which is after some major improvements were made to
diff --git a/config/latiss/compareWarpAssembleCoadd.py b/config/latiss/compareWarpAssembleCoadd.py
index aea99f279..26edd5d22 100644
--- a/config/latiss/compareWarpAssembleCoadd.py
+++ b/config/latiss/compareWarpAssembleCoadd.py
@@ -20,7 +20,5 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
# Load configs from base assembleCoadd
-config.load(os.path.join(os.path.dirname(__file__), "assembleCoadd.py"))
+config.load("assembleCoadd.py")
diff --git a/config/latiss/dark.py b/config/latiss/dark.py
index d1e7719db..f8d9c4c69 100644
--- a/config/latiss/dark.py
+++ b/config/latiss/dark.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "latiss.py"))
+config.load("latiss.py")
diff --git a/config/latiss/fgcmBuildFromIsolatedStars.py b/config/latiss/fgcmBuildFromIsolatedStars.py
index aff7e590b..2354cafd3 100644
--- a/config/latiss/fgcmBuildFromIsolatedStars.py
+++ b/config/latiss/fgcmBuildFromIsolatedStars.py
@@ -1,4 +1,3 @@
-import os
from lsst.obs.lsst.filters import LATISS_FILTER_DEFINITIONS
@@ -13,12 +12,11 @@
config.apertureInnerInstFluxField = "apFlux_35_0_instFlux"
config.apertureOuterInstFluxField = "apFlux_50_0_instFlux"
-configDir = os.path.join(os.path.dirname(__file__))
config.physicalFilterMap = LATISS_FILTER_DEFINITIONS.physical_to_band
config.doSubtractLocalBackground = False
-config.fgcmLoadReferenceCatalog.load(os.path.join(configDir, "filterMap.py"))
+config.fgcmLoadReferenceCatalog.load("filterMap.py")
config.fgcmLoadReferenceCatalog.applyColorTerms = True
-config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(configDir, "colorterms.py"))
+config.fgcmLoadReferenceCatalog.colorterms.load("colorterms.py")
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = "i_flux"
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.errField = "i_fluxErr"
diff --git a/config/latiss/flat.py b/config/latiss/flat.py
index d1e7719db..f8d9c4c69 100644
--- a/config/latiss/flat.py
+++ b/config/latiss/flat.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "latiss.py"))
+config.load("latiss.py")
diff --git a/config/latiss/fringe.py b/config/latiss/fringe.py
index d1e7719db..f8d9c4c69 100644
--- a/config/latiss/fringe.py
+++ b/config/latiss/fringe.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "latiss.py"))
+config.load("latiss.py")
diff --git a/config/latiss/measureCoaddSources.py b/config/latiss/measureCoaddSources.py
index 14c8d208c..8b9096a50 100644
--- a/config/latiss/measureCoaddSources.py
+++ b/config/latiss/measureCoaddSources.py
@@ -22,10 +22,8 @@
"""LATISS-specific overrides for MeasureMergedCoaddSourcesTask"""
-import os.path
-
-config.measurement.load(os.path.join(os.path.dirname(__file__), "..", "apertures.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "..", "kron.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "..", "convolvedFluxes.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "..", "hsm.py"))
-config.load(os.path.join(os.path.dirname(__file__), "..", "cmodel.py"))
+config.measurement.load("../apertures.py")
+config.measurement.load("../kron.py")
+config.measurement.load("../convolvedFluxes.py")
+config.measurement.load("../hsm.py")
+config.load("../cmodel.py")
diff --git a/config/latiss/objectTableTractAnalysis.py b/config/latiss/objectTableTractAnalysis.py
index 7cd22e90b..df30d3bfb 100644
--- a/config/latiss/objectTableTractAnalysis.py
+++ b/config/latiss/objectTableTractAnalysis.py
@@ -1,7 +1,6 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
diff --git a/config/latiss/processStar.py b/config/latiss/processStar.py
index dd6c45b55..287ffe1a4 100644
--- a/config/latiss/processStar.py
+++ b/config/latiss/processStar.py
@@ -1,6 +1,4 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "latiss.py"))
+config.load("latiss.py")
# Configuration for processStarTask
diff --git a/config/latiss/refCatObjectAnalysisTask.py b/config/latiss/refCatObjectAnalysisTask.py
index 7cd22e90b..df30d3bfb 100644
--- a/config/latiss/refCatObjectAnalysisTask.py
+++ b/config/latiss/refCatObjectAnalysisTask.py
@@ -1,7 +1,6 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
diff --git a/config/latiss/refCatObjectPhotometricAnalysisTask.py b/config/latiss/refCatObjectPhotometricAnalysisTask.py
index b5638f8a0..3e795b881 100644
--- a/config/latiss/refCatObjectPhotometricAnalysisTask.py
+++ b/config/latiss/refCatObjectPhotometricAnalysisTask.py
@@ -1,9 +1,8 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
config.connections.refCatalog = "atlas_refcat2_20220201"
diff --git a/config/latiss/refCatSourcePhotometricAnalysisTask.py b/config/latiss/refCatSourcePhotometricAnalysisTask.py
index d4e6946b8..c16f83fd3 100644
--- a/config/latiss/refCatSourcePhotometricAnalysisTask.py
+++ b/config/latiss/refCatSourcePhotometricAnalysisTask.py
@@ -1,9 +1,8 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
config.connections.refCatalog = "atlas_refcat2_20220201"
diff --git a/config/lsstCam/analysisToolsPhotometricCatalogMatch.py b/config/lsstCam/analysisToolsPhotometricCatalogMatch.py
index 7c5e59389..79b398d9d 100644
--- a/config/lsstCam/analysisToolsPhotometricCatalogMatch.py
+++ b/config/lsstCam/analysisToolsPhotometricCatalogMatch.py
@@ -1,7 +1,4 @@
"""Overrides for PhotometricCatalogMatchTask"""
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
diff --git a/config/lsstCam/analysisToolsPhotometricCatalogMatchVisit.py b/config/lsstCam/analysisToolsPhotometricCatalogMatchVisit.py
index 7c5e59389..79b398d9d 100644
--- a/config/lsstCam/analysisToolsPhotometricCatalogMatchVisit.py
+++ b/config/lsstCam/analysisToolsPhotometricCatalogMatchVisit.py
@@ -1,7 +1,4 @@
"""Overrides for PhotometricCatalogMatchTask"""
-import os.path
-
-configDir = os.path.dirname(__file__)
-config.referenceCatalogLoader.refObjLoader.load(os.path.join(configDir, "filterMap.py"))
+config.referenceCatalogLoader.refObjLoader.load("filterMap.py")
config.referenceCatalogLoader.doApplyColorTerms = False
diff --git a/config/lsstCam/calibrate.py b/config/lsstCam/calibrate.py
index 755759513..1bc4b2f0b 100644
--- a/config/lsstCam/calibrate.py
+++ b/config/lsstCam/calibrate.py
@@ -1,8 +1,6 @@
-import os
from lsst.meas.algorithms import ColorLimit # Configure the photometry to use the_monster.
-obsConfigDir = os.path.join(os.path.dirname(__file__))
-config.photoRefObjLoader.load(os.path.join(obsConfigDir, "filterMap.py"))
+config.photoRefObjLoader.load("filterMap.py")
config.connections.astromRefCat = "the_monster_20250219"
# photometric reference catalog defaults to the_monster_20250219 one level up
# photoCal.applyColorTerms = False one level up
@@ -27,10 +25,10 @@
# Overrides to improved astrometry matching.
config.astrometry.doFiducialZeroPointCull = True
-config.astrometry.load(os.path.join(obsConfigDir, "fiducialZeroPoint.py"))
+config.astrometry.load("fiducialZeroPoint.py")
# Loosened for early ComCam with large PSFs.
config.photoCal.match.sourceSelection.doUnresolved = False
# Exposure summary stats.
-config.computeSummaryStats.load(os.path.join(obsConfigDir, "computeExposureSummaryStats.py"))
+config.computeSummaryStats.load("computeExposureSummaryStats.py")
diff --git a/config/lsstCam/calibrateImage.py b/config/lsstCam/calibrateImage.py
index 33d05d396..04614874f 100644
--- a/config/lsstCam/calibrateImage.py
+++ b/config/lsstCam/calibrateImage.py
@@ -1,14 +1,10 @@
-import os.path
-
from lsst.meas.algorithms import ColorLimit # Configure the photometry to use the_monster.
-config_dir = os.path.dirname(__file__)
-
config.connections.photometry_ref_cat = "the_monster_20250219"
config.connections.astrometry_ref_cat = "the_monster_20250219"
-config.astrometry.load(os.path.join(config_dir, "filterMap.py"))
-config.photometry_ref_loader.load(os.path.join(config_dir, "filterMap.py"))
+config.astrometry.load("filterMap.py")
+config.photometry_ref_loader.load("filterMap.py")
config.photometry.match.referenceSelection.magLimit.fluxField = "monster_ComCam_r_flux"
colors = config.photometry.match.referenceSelection.colorLimits
@@ -22,7 +18,7 @@
config.photometry.applyColorTerms = False
config.photometry.photoCatName = "the_monster_20250219"
-config.compute_summary_stats.load(os.path.join(config_dir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
# Decrease maximum number of reference sources
config.astrometry.matcher.maxRefObjects = 4096
@@ -41,7 +37,7 @@
# Overrides to improved astrometry matching.
config.astrometry.doFiducialZeroPointCull = True
-config.astrometry.load(os.path.join(config_dir, "fiducialZeroPoint.py"))
+config.astrometry.load("fiducialZeroPoint.py")
# Loosened for early LSSTCam with large PSFs.
config.photometry.match.sourceSelection.doUnresolved = False
diff --git a/config/lsstCam/compareWarpAssembleCoadd.py b/config/lsstCam/compareWarpAssembleCoadd.py
index 2bd4cc116..1d7f9e345 100644
--- a/config/lsstCam/compareWarpAssembleCoadd.py
+++ b/config/lsstCam/compareWarpAssembleCoadd.py
@@ -1,10 +1,9 @@
"""
lsstCam-specific overrides of CompareWarpAssembleCoaddTask
"""
-import os.path
# Load configs from base assembleCoadd
-config.load(os.path.join(os.path.dirname(__file__), "assembleCoadd.py"))
+config.load("assembleCoadd.py")
# Preliminary aggressive adjustment to accomodate early commissioning
# deep-drilling-style cadence with many observations
diff --git a/config/lsstCam/computeExposureSummaryStats.py b/config/lsstCam/computeExposureSummaryStats.py
index 06f799fe4..ed2c648d7 100644
--- a/config/lsstCam/computeExposureSummaryStats.py
+++ b/config/lsstCam/computeExposureSummaryStats.py
@@ -1,7 +1,3 @@
-import os.path
-
-config_dir = os.path.dirname(__file__)
-
-config.load(os.path.join(config_dir, "fiducialPsfSigma.py"))
-config.load(os.path.join(config_dir, "fiducialSkyBackground.py"))
-config.load(os.path.join(config_dir, "fiducialZeroPoint.py"))
+config.load("fiducialPsfSigma.py")
+config.load("fiducialSkyBackground.py")
+config.load("fiducialZeroPoint.py")
diff --git a/config/lsstCam/fgcmBuildFromIsolatedStars.py b/config/lsstCam/fgcmBuildFromIsolatedStars.py
index f2ae2f5de..32bd4f7c8 100644
--- a/config/lsstCam/fgcmBuildFromIsolatedStars.py
+++ b/config/lsstCam/fgcmBuildFromIsolatedStars.py
@@ -1,5 +1,3 @@
-import os
-
physical_to_band = {
"u_24": "u",
"g_6": "g",
@@ -16,10 +14,8 @@
config.connections.ref_cat = "the_monster_20250219"
-configDir = os.path.join(os.path.dirname(__file__))
config.physicalFilterMap = physical_to_band
-obsConfigDir = os.path.join(os.path.dirname(__file__))
-config.fgcmLoadReferenceCatalog.load(os.path.join(obsConfigDir, "filterMap.py"))
+config.fgcmLoadReferenceCatalog.load("filterMap.py")
config.fgcmLoadReferenceCatalog.applyColorTerms = False
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = "monster_ComCam_i_flux"
diff --git a/config/lsstCam/finalize_characterization_detector.py b/config/lsstCam/finalize_characterization_detector.py
index 9943467d7..b853923a3 100644
--- a/config/lsstCam/finalize_characterization_detector.py
+++ b/config/lsstCam/finalize_characterization_detector.py
@@ -1,3 +1 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "finalize_characterization.py"))
+config.load("finalize_characterization.py")
diff --git a/config/lsstCam/reprocessVisitImage.py b/config/lsstCam/reprocessVisitImage.py
index c5273542c..715d8b46b 100644
--- a/config/lsstCam/reprocessVisitImage.py
+++ b/config/lsstCam/reprocessVisitImage.py
@@ -1,6 +1,2 @@
#!/usr/bin/env python
-import os.path
-
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
diff --git a/config/lsstCam/updateVisitSummary.py b/config/lsstCam/updateVisitSummary.py
index 4cb12e009..678d3fb4a 100644
--- a/config/lsstCam/updateVisitSummary.py
+++ b/config/lsstCam/updateVisitSummary.py
@@ -1,8 +1,5 @@
#!/usr/bin/env python
-import os.path
-ObsConfigDir = os.path.dirname(__file__)
-
-config.compute_summary_stats.load(os.path.join(ObsConfigDir, "computeExposureSummaryStats.py"))
+config.compute_summary_stats.load("computeExposureSummaryStats.py")
config.connections.wcs_overrides_skypix = "turbulenceCorrectedSkyWcsCatalog"
diff --git a/config/measureCoaddSources.py b/config/measureCoaddSources.py
index f769f0e5e..08425036e 100644
--- a/config/measureCoaddSources.py
+++ b/config/measureCoaddSources.py
@@ -20,12 +20,10 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.measurement.load(os.path.join(os.path.dirname(__file__), "apertures.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "kron.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "convolvedFluxes.py"))
-config.measurement.load(os.path.join(os.path.dirname(__file__), "hsm.py"))
-config.load(os.path.join(os.path.dirname(__file__), "cmodel.py"))
+config.measurement.load("apertures.py")
+config.measurement.load("kron.py")
+config.measurement.load("convolvedFluxes.py")
+config.measurement.load("hsm.py")
+config.load("cmodel.py")
config.measurement.plugins.names |= ["base_InputCount"]
diff --git a/config/measurePhotonTransferCurve.py b/config/measurePhotonTransferCurve.py
index 9f353360c..925efaa96 100644
--- a/config/measurePhotonTransferCurve.py
+++ b/config/measurePhotonTransferCurve.py
@@ -1,4 +1,2 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "lsstCamCommon.py"))
+config.load("lsstCamCommon.py")
config.ccdKey = "detector"
diff --git a/config/mergeCoaddDetections.py b/config/mergeCoaddDetections.py
index 869c8e37c..1241f0970 100644
--- a/config/mergeCoaddDetections.py
+++ b/config/mergeCoaddDetections.py
@@ -1,5 +1,3 @@
-import os.path
-
# Gen3 mergeDetections will supersede mergeCoaddDetections
# Keep in sync in the meantime
-config.load(os.path.join(os.path.dirname(__file__), "mergeDetections.py"))
+config.load("mergeDetections.py")
diff --git a/config/mergeCoaddMeasurements.py b/config/mergeCoaddMeasurements.py
index d5bac5426..2c2a79276 100644
--- a/config/mergeCoaddMeasurements.py
+++ b/config/mergeCoaddMeasurements.py
@@ -1,5 +1,3 @@
-import os.path
-
# Gen3 mergeMeasurements will supersede mergeCoaddMeasurements
# Keep in sync in the meantime
-config.load(os.path.join(os.path.dirname(__file__), "mergeMeasurements.py"))
+config.load("mergeMeasurements.py")
diff --git a/config/objectTableTractAnalysis.py b/config/objectTableTractAnalysis.py
index 7cd22e90b..df30d3bfb 100644
--- a/config/objectTableTractAnalysis.py
+++ b/config/objectTableTractAnalysis.py
@@ -1,7 +1,6 @@
-import os.path
from lsst.pipe.tasks.postprocess import TransformObjectCatalogConfig
# By default loop over all the same bands that are present in the Object Table
objectConfig = TransformObjectCatalogConfig()
-objectConfig.load(os.path.join(os.path.dirname(__file__), "transformObjectCatalog.py"))
+objectConfig.load("transformObjectCatalog.py")
config.bands = objectConfig.outputBands
diff --git a/config/safeClipAssembleCoadd.py b/config/safeClipAssembleCoadd.py
index aea99f279..26edd5d22 100644
--- a/config/safeClipAssembleCoadd.py
+++ b/config/safeClipAssembleCoadd.py
@@ -20,7 +20,5 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
# Load configs from base assembleCoadd
-config.load(os.path.join(os.path.dirname(__file__), "assembleCoadd.py"))
+config.load("assembleCoadd.py")
diff --git a/config/sky.py b/config/sky.py
index cc2f297bc..6ba6d1552 100644
--- a/config/sky.py
+++ b/config/sky.py
@@ -20,15 +20,8 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-configDir = os.path.dirname(__file__)
-
-config.load(os.path.join(configDir, "lsstCamCommon.py"))
-config.isr.load(os.path.join(configDir, "isr.py"))
-
-fpBgFile = os.path.join(configDir, "focalPlaneBackground.py")
-
-config.largeScaleBackground.load(fpBgFile)
+config.load("lsstCamCommon.py")
+config.isr.load("isr.py")
+config.largeScaleBackground.load("focalPlaneBackground.py")
config.isr.doBrighterFatter = False
diff --git a/config/skyCorr.py b/config/skyCorr.py
index 704430681..eba63e01d 100644
--- a/config/skyCorr.py
+++ b/config/skyCorr.py
@@ -20,7 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-
-import os.path
-
-config.bgModel1.load(os.path.join(os.path.dirname(__file__), "focalPlaneBackground.py"))
+config.bgModel1.load("focalPlaneBackground.py")
diff --git a/config/ts3/bias.py b/config/ts3/bias.py
index 46a417179..d84e675ed 100644
--- a/config/ts3/bias.py
+++ b/config/ts3/bias.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts3.py"))
+config.load("ts3.py")
diff --git a/config/ts3/dark.py b/config/ts3/dark.py
index 218d3f247..72556f765 100644
--- a/config/ts3/dark.py
+++ b/config/ts3/dark.py
@@ -20,8 +20,6 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts3.py"))
+config.load("ts3.py")
config.repair.cosmicray.nCrPixelMax = 1000000
diff --git a/config/ts3/flat.py b/config/ts3/flat.py
index 46a417179..d84e675ed 100644
--- a/config/ts3/flat.py
+++ b/config/ts3/flat.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts3.py"))
+config.load("ts3.py")
diff --git a/config/ts8/bias.py b/config/ts8/bias.py
index 06b6c6ec3..464df6a64 100644
--- a/config/ts8/bias.py
+++ b/config/ts8/bias.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts8.py"))
+config.load("ts8.py")
diff --git a/config/ts8/dark.py b/config/ts8/dark.py
index e9b325024..b6960145d 100644
--- a/config/ts8/dark.py
+++ b/config/ts8/dark.py
@@ -20,8 +20,6 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts8.py"))
+config.load("ts8.py")
config.repair.cosmicray.nCrPixelMax = 1000000
diff --git a/config/ts8/flat.py b/config/ts8/flat.py
index 06b6c6ec3..464df6a64 100644
--- a/config/ts8/flat.py
+++ b/config/ts8/flat.py
@@ -20,6 +20,4 @@
# the GNU General Public License along with this program. If not,
# see .
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ts8.py"))
+config.load("ts8.py")
diff --git a/config/ucd/bias.py b/config/ucd/bias.py
index 6c1006b21..ad44d22c9 100644
--- a/config/ucd/bias.py
+++ b/config/ucd/bias.py
@@ -1,3 +1 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ucd.py"))
+config.load("ucd.py")
diff --git a/config/ucd/dark.py b/config/ucd/dark.py
index 8b6a8f3a9..432631aef 100644
--- a/config/ucd/dark.py
+++ b/config/ucd/dark.py
@@ -1,5 +1,3 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ucd.py"))
+config.load("ucd.py")
config.repair.cosmicray.nCrPixelMax = 1000000
diff --git a/config/ucd/flat.py b/config/ucd/flat.py
index 6c1006b21..ad44d22c9 100644
--- a/config/ucd/flat.py
+++ b/config/ucd/flat.py
@@ -1,3 +1 @@
-import os.path
-
-config.load(os.path.join(os.path.dirname(__file__), "ucd.py"))
+config.load("ucd.py")
diff --git a/doc/lsst.obs.lsst/testing.rst b/doc/lsst.obs.lsst/testing.rst
index 3b730433e..832463c1e 100644
--- a/doc/lsst.obs.lsst/testing.rst
+++ b/doc/lsst.obs.lsst/testing.rst
@@ -39,13 +39,13 @@ New data can be added as follow:
template strings to work to be able to locate the file.
- This file or files
- should be added to the test butler repository in ``data/input``. Create
- directory ``data/input/fooCam``, if required, and then run ``butler create`` for that directory to initialize a butler repository.
+ should be added to the test butler repository in ``tests/data/input``. Create
+ directory ``tests/data/input/fooCam``, if required, and then run ``butler create`` for that directory to initialize a butler repository.
Then ingest your test raw file(s) with:
.. code-block:: bash
- butler ingest-raws data/input/fooCam --transfer copy fooCamtest.fits
+ butler ingest-raws tests/data/input/fooCam --transfer copy fooCamtest.fits
specifying the path to the test files. This will store them in the butler
repository.
diff --git a/policy/SConscript b/policy/SConscript
index 2744f600b..9bbe16530 100644
--- a/policy/SConscript
+++ b/policy/SConscript
@@ -18,11 +18,14 @@ libpathstr = lsst.sconsUtils.utils.libraryLoaderEnvironment()
# the shebang
python = "{} python".format(libpathstr)
+output_dir = "../python/lsst/obs/lsst/resources/policy/"
+
for camera in ["latiss", "lsstCam", "imsim", "phosim", "ts8", "ucd", "ts3", "comCam", "comCamSim", "lsstCamSim"]:
# Invoke the bin.src variant so that we do not depend on the shebang
- # target having been run
- commandInst = env.Command(f"{camera}.yaml", "",
- f"{python} bin.src/generateCamera.py --path {camera}:lsstCam:. $TARGET")
+ # target having been run. The output file must be within the real
+ # policy directory for SCons to see it.
+ commandInst = env.Command(f"{camera}.yaml", [],
+ f"{python} bin.src/generateCamera.py --copy-to {os.path.abspath(output_dir)} --path {camera}:lsstCam:. $TARGET")
env.Depends(commandInst, lsst.sconsUtils.targets["version"])
env.Depends(commandInst, lsst.sconsUtils.targets["python"])
diff --git a/python/lsst/obs/lsst/_instrument.py b/python/lsst/obs/lsst/_instrument.py
index 16d479bce..bf07757de 100644
--- a/python/lsst/obs/lsst/_instrument.py
+++ b/python/lsst/obs/lsst/_instrument.py
@@ -25,11 +25,10 @@
import datetime
import hashlib
-import os.path
+import importlib.resources
import lsst.obs.base.yamlCamera as yamlCamera
from lsst.utils.introspection import get_full_type_name
-from lsst.utils import getPackageDir
from lsst.obs.base import Instrument, VisitSystem
from .filters import (LSSTCAM_FILTER_DEFINITIONS, LATISS_FILTER_DEFINITIONS,
LSSTCAM_IMSIM_FILTER_DEFINITIONS, TS3_FILTER_DEFINITIONS,
@@ -44,8 +43,6 @@
from .translators.lsst import GROUP_RE, TZERO_DATETIME
-PACKAGE_DIR = getPackageDir("obs_lsst")
-
class LsstCam(Instrument):
"""Gen3 Butler specialization for the LSST Main Camera.
@@ -92,8 +89,8 @@ class LsstCam(Instrument):
@property
def configPaths(self):
- return [os.path.join(PACKAGE_DIR, "config"),
- os.path.join(PACKAGE_DIR, "config", self.policyName)]
+ return ["resource://lsst.obs.lsst/resources/config",
+ f"resource://lsst.obs.lsst/resources/config/{self.policyName}"]
@classmethod
def getName(cls):
@@ -104,8 +101,10 @@ def getName(cls):
def getCamera(cls):
# Constructing a YAML camera takes a long time but we rely on
# yamlCamera to cache for us.
- cameraYamlFile = os.path.join(PACKAGE_DIR, "policy", f"{cls.policyName}.yaml")
- camera = yamlCamera.makeCamera(cameraYamlFile)
+ with importlib.resources.path(
+ "lsst.obs.lsst", f"resources/policy/{cls.policyName}.yaml"
+ ) as cameraYamlFile:
+ camera = yamlCamera.makeCamera(cameraYamlFile)
if camera.getName() != cls.getName():
raise RuntimeError(f"Expected to read camera geometry for {cls.instrument}"
f" but instead got geometry for {camera.getName()}")
diff --git a/python/lsst/obs/lsst/resources/config b/python/lsst/obs/lsst/resources/config
new file mode 120000
index 000000000..066f9511b
--- /dev/null
+++ b/python/lsst/obs/lsst/resources/config
@@ -0,0 +1 @@
+../../../../../config/
\ No newline at end of file
diff --git a/python/lsst/obs/lsst/resources/corrections b/python/lsst/obs/lsst/resources/corrections
new file mode 120000
index 000000000..efe58ab1f
--- /dev/null
+++ b/python/lsst/obs/lsst/resources/corrections
@@ -0,0 +1 @@
+../../../../../corrections/
\ No newline at end of file
diff --git a/python/lsst/obs/lsst/resources/policy/.gitignore b/python/lsst/obs/lsst/resources/policy/.gitignore
new file mode 100644
index 000000000..526f1b7bc
--- /dev/null
+++ b/python/lsst/obs/lsst/resources/policy/.gitignore
@@ -0,0 +1,10 @@
+/latiss.yaml
+/imsim.yaml
+/lsstCam.yaml
+/lsstCamSim.yaml
+/phosim.yaml
+/ts8.yaml
+/ucd.yaml
+/ts3.yaml
+/comCam.yaml
+/comCamSim.yaml
diff --git a/python/lsst/obs/lsst/script/generateCamera.py b/python/lsst/obs/lsst/script/generateCamera.py
index a3235134e..5269bb278 100644
--- a/python/lsst/obs/lsst/script/generateCamera.py
+++ b/python/lsst/obs/lsst/script/generateCamera.py
@@ -74,6 +74,7 @@ def build_argparser():
parser.add_argument('outputFile', type=str, help="Name of generated file")
parser.add_argument('--path', type=str, help="List of directories to search for components",
default=False)
+ parser.add_argument('--copy-to', type=str, help="Additional directory to write output to.", default="")
parser.add_argument('--verbose', action="store_true", help="How chatty should I be?", default=False)
return parser
@@ -318,6 +319,8 @@ def main():
try:
generateCamera(args.outputFile, args.path)
+ if args.copy_to:
+ shutil.copyfile(args.outputFile, os.path.join(args.copy_to, os.path.basename(args.outputFile)))
except Exception as e:
print(f"{e}", file=sys.stderr)
return 1
diff --git a/python/lsst/obs/lsst/script/make_lsstcam_pseudoflats.py b/python/lsst/obs/lsst/script/make_lsstcam_pseudoflats.py
index cd5f20cec..91412d48b 100644
--- a/python/lsst/obs/lsst/script/make_lsstcam_pseudoflats.py
+++ b/python/lsst/obs/lsst/script/make_lsstcam_pseudoflats.py
@@ -7,7 +7,6 @@
import argparse
from lsst.daf.butler import Butler
-from lsst.pipe.base import Instrument
from lsst.utils import getPackageDir
import lsst.afw.cameraGeom
from lsst.afw.image import ExposureF, FilterLabel
@@ -17,6 +16,7 @@
VisualizeMosaicExpConfig,
VisualizeMosaicExpTask,
)
+from .._instrument import LsstCam
def write_pseudoflats(butler: Butler | None, output_collection: str | None):
@@ -41,7 +41,7 @@ def write_pseudoflats(butler: Butler | None, output_collection: str | None):
],
)
- lsstcam_instr = Instrument.from_string("lsst.obs.lsst.LsstCam")
+ lsstcam_instr = LsstCam()
camera = lsstcam_instr.getCamera()
filter_dict = {
diff --git a/python/lsst/obs/lsst/testHelper.py b/python/lsst/obs/lsst/testHelper.py
index 9094ac9bf..b74761b24 100644
--- a/python/lsst/obs/lsst/testHelper.py
+++ b/python/lsst/obs/lsst/testHelper.py
@@ -30,10 +30,6 @@
import lsst.utils.tests
import lsst.obs.base.tests
import lsst.daf.butler
-from lsst.utils import getPackageDir
-
-# Define the data location relative to this package
-DATAROOT = os.path.join(getPackageDir("obs_lsst"), "data", "input")
class ObsLsstButlerTests(lsst.utils.tests.TestCase):
@@ -53,6 +49,8 @@ class ObsLsstButlerTests(lsst.utils.tests.TestCase):
_butler = None
+ DATAROOT = "UNDEFINED" # Define in subclass
+
@classmethod
@abstractmethod
def getInstrument(cls):
@@ -71,7 +69,7 @@ def tearDownClass(cls):
@classmethod
def setUpClass(cls):
- cls.data_dir = os.path.normpath(os.path.join(DATAROOT, cls.instrumentDir))
+ cls.data_dir = os.path.normpath(os.path.join(cls.DATAROOT, cls.instrumentDir))
# Protection against the base class values being used
if not os.path.exists(cls.data_dir):
raise unittest.SkipTest(f"Data directory {cls.data_dir} does not exist.")
diff --git a/python/lsst/obs/lsst/translators/lsst.py b/python/lsst/obs/lsst/translators/lsst.py
index ce81313c2..bffde5231 100644
--- a/python/lsst/obs/lsst/translators/lsst.py
+++ b/python/lsst/obs/lsst/translators/lsst.py
@@ -14,7 +14,6 @@
"compute_detector_exposure_id_generic", "LsstBaseTranslator",
"SIMONYI_TELESCOPE")
-import os.path
import yaml
import logging
import re
@@ -26,7 +25,7 @@
from astropy.time import Time, TimeDelta
from astropy.coordinates import EarthLocation
-from lsst.utils import getPackageDir
+from lsst.resources import ResourcePath, ResourcePathExpression
from astro_metadata_translator import cache_translation, FitsTranslator
from astro_metadata_translator.translators.helpers import tracking_from_degree_headers, \
@@ -69,20 +68,18 @@
# Number of decimal digits used by exposure_ids.
EXPOSURE_ID_MAXDIGITS = _SEQNUM_MAXDIGITS + _DAYOBS_MAXDIGITS
-obs_lsst_packageDir = getPackageDir("obs_lsst")
-
log = logging.getLogger(__name__)
-def read_detector_ids(policyFile):
+def read_detector_ids(policyFile: ResourcePathExpression):
"""Read a camera policy file and retrieve the mapping from CCD name
to ID.
Parameters
----------
- policyFile : `str`
- Name of YAML policy file to read, relative to the obs_lsst
- package.
+ policyFile : `lsst.resources.ResourcePathExpression`
+ Name of YAML policy file to read, relative to the resources root
+ directory. This usually means that the "policy" directory is included.
Returns
-------
@@ -99,14 +96,13 @@ def read_detector_ids(policyFile):
`lsst.afw.cameraGeom`. This is because the translators are intended to
have minimal dependencies on LSST infrastructure.
"""
-
- file = os.path.join(obs_lsst_packageDir, policyFile)
+ root = ResourcePath("resource://lsst.obs.lsst/resources/", forceDirectory=True)
+ resource = ResourcePath(policyFile, root=root)
try:
- with open(file) as fh:
- # Use the fast parser since these files are large
- camera = yaml.load(fh, Loader=yaml.CSafeLoader)
+ # Use the fast parser since these files are large
+ camera = yaml.load(resource.read(), Loader=yaml.CSafeLoader)
except OSError as e:
- raise ValueError(f"Could not load camera policy file {file}") from e
+ raise ValueError(f"Could not load camera policy file {resource}") from e
mapping = {}
for ccd, value in camera["CCDs"].items():
@@ -152,6 +148,8 @@ class LsstBaseTranslator(FitsTranslator):
_const_map = {}
_trivial_map = {}
+ default_resource_package = "lsst.obs.lsst"
+ default_resource_root = "resources/corrections/"
# Do not specify a name for this translator
cameraPolicyFile = None
@@ -203,18 +201,6 @@ def __init_subclass__(cls, **kwargs):
super().__init_subclass__(**kwargs)
- def search_paths(self):
- """Search paths to use for LSST data when looking for header correction
- files.
-
- Returns
- -------
- path : `list`
- List with a single element containing the full path to the
- ``corrections`` directory within the ``obs_lsst`` package.
- """
- return [os.path.join(obs_lsst_packageDir, "corrections")]
-
@classmethod
def observing_date_to_offset(cls, observing_date: astropy.time.Time) -> astropy.time.TimeDelta | None:
"""Return the offset to use when calculating the observing day.
diff --git a/data/input/lsstCam/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits b/tests/data/input/bot/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
similarity index 100%
rename from data/input/lsstCam/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
rename to tests/data/input/bot/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
diff --git a/data/input/comCam/butler.yaml b/tests/data/input/bot/butler.yaml
similarity index 100%
rename from data/input/comCam/butler.yaml
rename to tests/data/input/bot/butler.yaml
diff --git a/tests/data/input/gen3.sqlite3 b/tests/data/input/bot/gen3.sqlite3
similarity index 100%
rename from tests/data/input/gen3.sqlite3
rename to tests/data/input/bot/gen3.sqlite3
diff --git a/tests/data/input/bot/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits b/tests/data/input/bot/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits
new file mode 120000
index 000000000..78aeb7d13
--- /dev/null
+++ b/tests/data/input/bot/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits
@@ -0,0 +1 @@
+../../../../../e2v_spot.fits.gz
\ No newline at end of file
diff --git a/tests/data/input/bot/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits b/tests/data/input/bot/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits
new file mode 120000
index 000000000..2d8ea6449
--- /dev/null
+++ b/tests/data/input/bot/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits
@@ -0,0 +1 @@
+../../../../../itl_spot.fits.gz
\ No newline at end of file
diff --git a/data/input/comCam/LSSTComCam/calib/unbounded/camera/camera_LSSTComCam_LSSTComCam_calib_unbounded.fits b/tests/data/input/comCam/LSSTComCam/calib/unbounded/camera/camera_LSSTComCam_LSSTComCam_calib_unbounded.fits
similarity index 100%
rename from data/input/comCam/LSSTComCam/calib/unbounded/camera/camera_LSSTComCam_LSSTComCam_calib_unbounded.fits
rename to tests/data/input/comCam/LSSTComCam/calib/unbounded/camera/camera_LSSTComCam_LSSTComCam_calib_unbounded.fits
diff --git a/data/input/comCamSim/butler.yaml b/tests/data/input/comCam/butler.yaml
similarity index 100%
rename from data/input/comCamSim/butler.yaml
rename to tests/data/input/comCam/butler.yaml
diff --git a/data/input/comCam/gen3.sqlite3 b/tests/data/input/comCam/gen3.sqlite3
similarity index 100%
rename from data/input/comCam/gen3.sqlite3
rename to tests/data/input/comCam/gen3.sqlite3
diff --git a/data/input/comCam/raw/2019-05-30/3019053000001/3019053000001-R22-S00-det000.fits b/tests/data/input/comCam/raw/2019-05-30/3019053000001/3019053000001-R22-S00-det000.fits
similarity index 100%
rename from data/input/comCam/raw/2019-05-30/3019053000001/3019053000001-R22-S00-det000.fits
rename to tests/data/input/comCam/raw/2019-05-30/3019053000001/3019053000001-R22-S00-det000.fits
diff --git a/data/input/comCamSim/LSSTComCamSim/calib/unbounded/camera/camera_LSSTComCamSim_LSSTComCamSim_calib_unbounded.fits b/tests/data/input/comCamSim/LSSTComCamSim/calib/unbounded/camera/camera_LSSTComCamSim_LSSTComCamSim_calib_unbounded.fits
similarity index 100%
rename from data/input/comCamSim/LSSTComCamSim/calib/unbounded/camera/camera_LSSTComCamSim_LSSTComCamSim_calib_unbounded.fits
rename to tests/data/input/comCamSim/LSSTComCamSim/calib/unbounded/camera/camera_LSSTComCamSim_LSSTComCamSim_calib_unbounded.fits
diff --git a/data/input/imsim/butler.yaml b/tests/data/input/comCamSim/butler.yaml
similarity index 100%
rename from data/input/imsim/butler.yaml
rename to tests/data/input/comCamSim/butler.yaml
diff --git a/data/input/comCamSim/gen3.sqlite3 b/tests/data/input/comCamSim/gen3.sqlite3
similarity index 100%
rename from data/input/comCamSim/gen3.sqlite3
rename to tests/data/input/comCamSim/gen3.sqlite3
diff --git a/data/input/comCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det004.fits.fz b/tests/data/input/comCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det004.fits.fz
similarity index 100%
rename from data/input/comCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det004.fits.fz
rename to tests/data/input/comCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det004.fits.fz
diff --git a/data/input/comCamSim/raw/2024-04-04/7024040400780/CC_S_20240404_000780_R22_S01.fits b/tests/data/input/comCamSim/raw/2024-04-04/7024040400780/CC_S_20240404_000780_R22_S01.fits
similarity index 100%
rename from data/input/comCamSim/raw/2024-04-04/7024040400780/CC_S_20240404_000780_R22_S01.fits
rename to tests/data/input/comCamSim/raw/2024-04-04/7024040400780/CC_S_20240404_000780_R22_S01.fits
diff --git a/data/input/guider/guider_data/MC_C_20230616_000013_R04_SG0.fits b/tests/data/input/guider/guider_data/MC_C_20230616_000013_R04_SG0.fits
similarity index 100%
rename from data/input/guider/guider_data/MC_C_20230616_000013_R04_SG0.fits
rename to tests/data/input/guider/guider_data/MC_C_20230616_000013_R04_SG0.fits
diff --git a/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.fits b/tests/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.fits
similarity index 100%
rename from data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.fits
rename to tests/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.fits
diff --git a/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.json b/tests/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.json
similarity index 100%
rename from data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.json
rename to tests/data/input/guider/guider_data/MC_C_20240918_000013_R00_SG0_guider.json
diff --git a/data/input/guider/raw/MC_C_20240918_000013_R42_S11.fits b/tests/data/input/guider/raw/MC_C_20240918_000013_R42_S11.fits
similarity index 100%
rename from data/input/guider/raw/MC_C_20240918_000013_R42_S11.fits
rename to tests/data/input/guider/raw/MC_C_20240918_000013_R42_S11.fits
diff --git a/data/input/guider/raw/MC_C_20240918_000013_R42_S11.json b/tests/data/input/guider/raw/MC_C_20240918_000013_R42_S11.json
similarity index 100%
rename from data/input/guider/raw/MC_C_20240918_000013_R42_S11.json
rename to tests/data/input/guider/raw/MC_C_20240918_000013_R42_S11.json
diff --git a/data/input/imsim/CALIB/bias/2022-01-01/bias-R11-S20-det042_2022-01-01.fits b/tests/data/input/imsim/CALIB/bias/2022-01-01/bias-R11-S20-det042_2022-01-01.fits
similarity index 100%
rename from data/input/imsim/CALIB/bias/2022-01-01/bias-R11-S20-det042_2022-01-01.fits
rename to tests/data/input/imsim/CALIB/bias/2022-01-01/bias-R11-S20-det042_2022-01-01.fits
diff --git a/data/input/imsim/CALIB/dark/2022-01-01/dark-R11-S20-det042_2022-01-01.fits b/tests/data/input/imsim/CALIB/dark/2022-01-01/dark-R11-S20-det042_2022-01-01.fits
similarity index 100%
rename from data/input/imsim/CALIB/dark/2022-01-01/dark-R11-S20-det042_2022-01-01.fits
rename to tests/data/input/imsim/CALIB/dark/2022-01-01/dark-R11-S20-det042_2022-01-01.fits
diff --git a/data/input/imsim/CALIB/flat/i_sim_1.4/2022-08-06/flat_i_sim_1.4-R11-S20-det042_2022-08-06.fits b/tests/data/input/imsim/CALIB/flat/i_sim_1.4/2022-08-06/flat_i_sim_1.4-R11-S20-det042_2022-08-06.fits
similarity index 100%
rename from data/input/imsim/CALIB/flat/i_sim_1.4/2022-08-06/flat_i_sim_1.4-R11-S20-det042_2022-08-06.fits
rename to tests/data/input/imsim/CALIB/flat/i_sim_1.4/2022-08-06/flat_i_sim_1.4-R11-S20-det042_2022-08-06.fits
diff --git a/data/input/imsim/LSSTCam-imSim/calib/unbounded/camera/camera_LSSTCam-imSim_LSSTCam-imSim_calib_unbounded.fits b/tests/data/input/imsim/LSSTCam-imSim/calib/unbounded/camera/camera_LSSTCam-imSim_LSSTCam-imSim_calib_unbounded.fits
similarity index 100%
rename from data/input/imsim/LSSTCam-imSim/calib/unbounded/camera/camera_LSSTCam-imSim_LSSTCam-imSim_calib_unbounded.fits
rename to tests/data/input/imsim/LSSTCam-imSim/calib/unbounded/camera/camera_LSSTCam-imSim_LSSTCam-imSim_calib_unbounded.fits
diff --git a/data/input/latiss/butler.yaml b/tests/data/input/imsim/butler.yaml
similarity index 100%
rename from data/input/latiss/butler.yaml
rename to tests/data/input/imsim/butler.yaml
diff --git a/data/input/imsim/gen3.sqlite3 b/tests/data/input/imsim/gen3.sqlite3
similarity index 100%
rename from data/input/imsim/gen3.sqlite3
rename to tests/data/input/imsim/gen3.sqlite3
diff --git a/data/input/imsim/raw/204595/R11/00204595-R11-S20-det042.fits b/tests/data/input/imsim/raw/204595/R11/00204595-R11-S20-det042.fits
similarity index 100%
rename from data/input/imsim/raw/204595/R11/00204595-R11-S20-det042.fits
rename to tests/data/input/imsim/raw/204595/R11/00204595-R11-S20-det042.fits
diff --git a/data/input/latiss/CALIB/bias/2018-09-21/bias-det000_2018-09-21.fits b/tests/data/input/latiss/CALIB/bias/2018-09-21/bias-det000_2018-09-21.fits
similarity index 100%
rename from data/input/latiss/CALIB/bias/2018-09-21/bias-det000_2018-09-21.fits
rename to tests/data/input/latiss/CALIB/bias/2018-09-21/bias-det000_2018-09-21.fits
diff --git a/data/input/latiss/LATISS/calib/unbounded/camera/camera_LATISS_LATISS_calib_unbounded.fits b/tests/data/input/latiss/LATISS/calib/unbounded/camera/camera_LATISS_LATISS_calib_unbounded.fits
similarity index 100%
rename from data/input/latiss/LATISS/calib/unbounded/camera/camera_LATISS_LATISS_calib_unbounded.fits
rename to tests/data/input/latiss/LATISS/calib/unbounded/camera/camera_LATISS_LATISS_calib_unbounded.fits
diff --git a/data/input/lsstCam/butler.yaml b/tests/data/input/latiss/butler.yaml
similarity index 100%
rename from data/input/lsstCam/butler.yaml
rename to tests/data/input/latiss/butler.yaml
diff --git a/data/input/latiss/gen3.sqlite3 b/tests/data/input/latiss/gen3.sqlite3
similarity index 100%
rename from data/input/latiss/gen3.sqlite3
rename to tests/data/input/latiss/gen3.sqlite3
diff --git a/data/input/latiss/raw/2018-09-20/3018092000065-det000.fits b/tests/data/input/latiss/raw/2018-09-20/3018092000065-det000.fits
similarity index 100%
rename from data/input/latiss/raw/2018-09-20/3018092000065-det000.fits
rename to tests/data/input/latiss/raw/2018-09-20/3018092000065-det000.fits
diff --git a/tests/data/input/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits b/tests/data/input/lsstCam/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
similarity index 100%
rename from tests/data/input/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
rename to tests/data/input/lsstCam/LSSTCam/calib/unbounded/camera/camera_LSSTCam_LSSTCam_calib_unbounded.fits
diff --git a/data/input/lsstCamSim/butler.yaml b/tests/data/input/lsstCam/butler.yaml
similarity index 100%
rename from data/input/lsstCamSim/butler.yaml
rename to tests/data/input/lsstCam/butler.yaml
diff --git a/data/input/lsstCam/eimage/4000021706001/E000/R22/eimage_4000021706001_R22_S00_E000.fits.gz b/tests/data/input/lsstCam/eimage/4000021706001/E000/R22/eimage_4000021706001_R22_S00_E000.fits.gz
similarity index 100%
rename from data/input/lsstCam/eimage/4000021706001/E000/R22/eimage_4000021706001_R22_S00_E000.fits.gz
rename to tests/data/input/lsstCam/eimage/4000021706001/E000/R22/eimage_4000021706001_R22_S00_E000.fits.gz
diff --git a/data/input/lsstCam/gen3.sqlite3 b/tests/data/input/lsstCam/gen3.sqlite3
similarity index 100%
rename from data/input/lsstCam/gen3.sqlite3
rename to tests/data/input/lsstCam/gen3.sqlite3
diff --git a/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R10-S02-det029.fits b/tests/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R10-S02-det029.fits
similarity index 100%
rename from data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R10-S02-det029.fits
rename to tests/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R10-S02-det029.fits
diff --git a/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R22-S21-det097.fits b/tests/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R22-S21-det097.fits
similarity index 100%
rename from data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R22-S21-det097.fits
rename to tests/data/input/lsstCam/raw/2019-03-19/3019031900001/3019031900001-R22-S21-det097.fits
diff --git a/data/input/lsstCam/raw/2019-03-22/3019032200002/3019032200002-R10-S22-det035.fits b/tests/data/input/lsstCam/raw/2019-03-22/3019032200002/3019032200002-R10-S22-det035.fits
similarity index 100%
rename from data/input/lsstCam/raw/2019-03-22/3019032200002/3019032200002-R10-S22-det035.fits
rename to tests/data/input/lsstCam/raw/2019-03-22/3019032200002/3019032200002-R10-S22-det035.fits
diff --git a/data/input/lsstCam/raw/2021-12-12/30211212000310/30211212000310-R22-S22-det098.fits b/tests/data/input/lsstCam/raw/2021-12-12/30211212000310/30211212000310-R22-S22-det098.fits
similarity index 100%
rename from data/input/lsstCam/raw/2021-12-12/30211212000310/30211212000310-R22-S22-det098.fits
rename to tests/data/input/lsstCam/raw/2021-12-12/30211212000310/30211212000310-R22-S22-det098.fits
diff --git a/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileClose.json b/tests/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileClose.json
similarity index 100%
rename from data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileClose.json
rename to tests/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileClose.json
diff --git a/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileOpen.json b/tests/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileOpen.json
similarity index 100%
rename from data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileOpen.json
rename to tests/data/input/lsstCam/raw/2021-12-12/30211212000310/MC_O_30211212_000310_shutterMotionProfileOpen.json
diff --git a/data/input/lsstCam/raw/2021-12-12/30211212000310/Photodiode_Readings_20211212_000310.txt b/tests/data/input/lsstCam/raw/2021-12-12/30211212000310/Photodiode_Readings_20211212_000310.txt
similarity index 100%
rename from data/input/lsstCam/raw/2021-12-12/30211212000310/Photodiode_Readings_20211212_000310.txt
rename to tests/data/input/lsstCam/raw/2021-12-12/30211212000310/Photodiode_Readings_20211212_000310.txt
diff --git a/data/input/lsstCamSim/LSSTCamSim/calib/unbounded/camera/camera_LSSTCamSim_LSSTCamSim_calib_unbounded.fits b/tests/data/input/lsstCamSim/LSSTCamSim/calib/unbounded/camera/camera_LSSTCamSim_LSSTCamSim_calib_unbounded.fits
similarity index 100%
rename from data/input/lsstCamSim/LSSTCamSim/calib/unbounded/camera/camera_LSSTCamSim_LSSTCamSim_calib_unbounded.fits
rename to tests/data/input/lsstCamSim/LSSTCamSim/calib/unbounded/camera/camera_LSSTCamSim_LSSTCamSim_calib_unbounded.fits
diff --git a/data/input/phosim/butler.yaml b/tests/data/input/lsstCamSim/butler.yaml
similarity index 100%
rename from data/input/phosim/butler.yaml
rename to tests/data/input/lsstCamSim/butler.yaml
diff --git a/data/input/lsstCamSim/gen3.sqlite3 b/tests/data/input/lsstCamSim/gen3.sqlite3
similarity index 100%
rename from data/input/lsstCamSim/gen3.sqlite3
rename to tests/data/input/lsstCamSim/gen3.sqlite3
diff --git a/data/input/lsstCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det094.fits.fz b/tests/data/input/lsstCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det094.fits.fz
similarity index 100%
rename from data/input/lsstCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det094.fits.fz
rename to tests/data/input/lsstCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det094.fits.fz
diff --git a/data/input/phosim/LSSTCam-PhoSim/calib/unbounded/camera/camera_LSSTCam-PhoSim_LSSTCam-PhoSim_calib_unbounded.fits b/tests/data/input/phosim/LSSTCam-PhoSim/calib/unbounded/camera/camera_LSSTCam-PhoSim_LSSTCam-PhoSim_calib_unbounded.fits
similarity index 100%
rename from data/input/phosim/LSSTCam-PhoSim/calib/unbounded/camera/camera_LSSTCam-PhoSim_LSSTCam-PhoSim_calib_unbounded.fits
rename to tests/data/input/phosim/LSSTCam-PhoSim/calib/unbounded/camera/camera_LSSTCam-PhoSim_LSSTCam-PhoSim_calib_unbounded.fits
diff --git a/data/input/ts3/butler.yaml b/tests/data/input/phosim/butler.yaml
similarity index 100%
rename from data/input/ts3/butler.yaml
rename to tests/data/input/phosim/butler.yaml
diff --git a/data/input/phosim/eimage/9006002/E000/R22/eimage_09006002_R22_S00_E000.fits.gz b/tests/data/input/phosim/eimage/9006002/E000/R22/eimage_09006002_R22_S00_E000.fits.gz
similarity index 100%
rename from data/input/phosim/eimage/9006002/E000/R22/eimage_09006002_R22_S00_E000.fits.gz
rename to tests/data/input/phosim/eimage/9006002/E000/R22/eimage_09006002_R22_S00_E000.fits.gz
diff --git a/data/input/phosim/gen3.sqlite3 b/tests/data/input/phosim/gen3.sqlite3
similarity index 100%
rename from data/input/phosim/gen3.sqlite3
rename to tests/data/input/phosim/gen3.sqlite3
diff --git a/data/input/phosim/processCcd_metadata/00204595-i/R11/processCcdMetadata_00204595-i-R11-S11-det040.yaml b/tests/data/input/phosim/processCcd_metadata/00204595-i/R11/processCcdMetadata_00204595-i-R11-S11-det040.yaml
similarity index 100%
rename from data/input/phosim/processCcd_metadata/00204595-i/R11/processCcdMetadata_00204595-i-R11-S11-det040.yaml
rename to tests/data/input/phosim/processCcd_metadata/00204595-i/R11/processCcdMetadata_00204595-i-R11-S11-det040.yaml
diff --git a/data/input/phosim/raw/204595/R11/00204595-R11-S20-det042.fits b/tests/data/input/phosim/raw/204595/R11/00204595-R11-S20-det042.fits
similarity index 100%
rename from data/input/phosim/raw/204595/R11/00204595-R11-S20-det042.fits
rename to tests/data/input/phosim/raw/204595/R11/00204595-R11-S20-det042.fits
diff --git a/tests/data/input/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits b/tests/data/input/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits
deleted file mode 120000
index 106e3a359..000000000
--- a/tests/data/input/raw/2019-10-31/3019103101985/3019103101985-R22-S11-det094.fits
+++ /dev/null
@@ -1 +0,0 @@
-../../../../e2v_spot.fits.gz
\ No newline at end of file
diff --git a/tests/data/input/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits b/tests/data/input/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits
deleted file mode 120000
index b8c290057..000000000
--- a/tests/data/input/raw/2019-11-01/3019110102212/3019110102212-R02-S02-det011.fits
+++ /dev/null
@@ -1 +0,0 @@
-../../../../itl_spot.fits.gz
\ No newline at end of file
diff --git a/data/input/ts3/LSST-TS3/calib/unbounded/camera/camera_LSST-TS3_LSST-TS3_calib_unbounded.fits b/tests/data/input/ts3/LSST-TS3/calib/unbounded/camera/camera_LSST-TS3_LSST-TS3_calib_unbounded.fits
similarity index 100%
rename from data/input/ts3/LSST-TS3/calib/unbounded/camera/camera_LSST-TS3_LSST-TS3_calib_unbounded.fits
rename to tests/data/input/ts3/LSST-TS3/calib/unbounded/camera/camera_LSST-TS3_LSST-TS3_calib_unbounded.fits
diff --git a/data/input/ts8/butler.yaml b/tests/data/input/ts3/butler.yaml
similarity index 100%
rename from data/input/ts8/butler.yaml
rename to tests/data/input/ts3/butler.yaml
diff --git a/data/input/ts3/gen3.sqlite3 b/tests/data/input/ts3/gen3.sqlite3
similarity index 100%
rename from data/input/ts3/gen3.sqlite3
rename to tests/data/input/ts3/gen3.sqlite3
diff --git a/data/input/ts3/raw/2016-07-22/201607220607067-R071-S00-det071.fits b/tests/data/input/ts3/raw/2016-07-22/201607220607067-R071-S00-det071.fits
similarity index 100%
rename from data/input/ts3/raw/2016-07-22/201607220607067-R071-S00-det071.fits
rename to tests/data/input/ts3/raw/2016-07-22/201607220607067-R071-S00-det071.fits
diff --git a/data/input/ts3/raw/2018-11-15/201811151255111-R433-S00-det433.fits b/tests/data/input/ts3/raw/2018-11-15/201811151255111-R433-S00-det433.fits
similarity index 100%
rename from data/input/ts3/raw/2018-11-15/201811151255111-R433-S00-det433.fits
rename to tests/data/input/ts3/raw/2018-11-15/201811151255111-R433-S00-det433.fits
diff --git a/data/input/ts8/CALIB/bias/2018-07-24/bias-RTM-010-S11-det067_2018-07-24.fits b/tests/data/input/ts8/CALIB/bias/2018-07-24/bias-RTM-010-S11-det067_2018-07-24.fits
similarity index 100%
rename from data/input/ts8/CALIB/bias/2018-07-24/bias-RTM-010-S11-det067_2018-07-24.fits
rename to tests/data/input/ts8/CALIB/bias/2018-07-24/bias-RTM-010-S11-det067_2018-07-24.fits
diff --git a/data/input/ts8/LSST-TS8/calib/unbounded/camera/camera_LSST-TS8_LSST-TS8_calib_unbounded.fits b/tests/data/input/ts8/LSST-TS8/calib/unbounded/camera/camera_LSST-TS8_LSST-TS8_calib_unbounded.fits
similarity index 100%
rename from data/input/ts8/LSST-TS8/calib/unbounded/camera/camera_LSST-TS8_LSST-TS8_calib_unbounded.fits
rename to tests/data/input/ts8/LSST-TS8/calib/unbounded/camera/camera_LSST-TS8_LSST-TS8_calib_unbounded.fits
diff --git a/data/input/ucd/butler.yaml b/tests/data/input/ts8/butler.yaml
similarity index 100%
rename from data/input/ucd/butler.yaml
rename to tests/data/input/ts8/butler.yaml
diff --git a/data/input/ts8/gen3.sqlite3 b/tests/data/input/ts8/gen3.sqlite3
similarity index 100%
rename from data/input/ts8/gen3.sqlite3
rename to tests/data/input/ts8/gen3.sqlite3
diff --git a/data/input/ts8/raw/6006D/201807241028453-RTM-010-S11-det067.fits b/tests/data/input/ts8/raw/6006D/201807241028453-RTM-010-S11-det067.fits
similarity index 100%
rename from data/input/ts8/raw/6006D/201807241028453-RTM-010-S11-det067.fits
rename to tests/data/input/ts8/raw/6006D/201807241028453-RTM-010-S11-det067.fits
diff --git a/data/input/ucd/LSST-UCDCam/calib/unbounded/camera/camera_LSST-UCDCam_LSST-UCDCam_calib_unbounded.fits b/tests/data/input/ucd/LSST-UCDCam/calib/unbounded/camera/camera_LSST-UCDCam_LSST-UCDCam_calib_unbounded.fits
similarity index 100%
rename from data/input/ucd/LSST-UCDCam/calib/unbounded/camera/camera_LSST-UCDCam_LSST-UCDCam_calib_unbounded.fits
rename to tests/data/input/ucd/LSST-UCDCam/calib/unbounded/camera/camera_LSST-UCDCam_LSST-UCDCam_calib_unbounded.fits
diff --git a/tests/data/input/butler.yaml b/tests/data/input/ucd/butler.yaml
similarity index 100%
rename from tests/data/input/butler.yaml
rename to tests/data/input/ucd/butler.yaml
diff --git a/data/input/ucd/gen3.sqlite3 b/tests/data/input/ucd/gen3.sqlite3
similarity index 100%
rename from data/input/ucd/gen3.sqlite3
rename to tests/data/input/ucd/gen3.sqlite3
diff --git a/data/input/ucd/raw/2023-07-30/3023073000237-R22-S01-det001.fits b/tests/data/input/ucd/raw/2023-07-30/3023073000237-R22-S01-det001.fits
similarity index 100%
rename from data/input/ucd/raw/2023-07-30/3023073000237-R22-S01-det001.fits
rename to tests/data/input/ucd/raw/2023-07-30/3023073000237-R22-S01-det001.fits
diff --git a/data/input/ucd/raw/2023-10-31/2023103100227-R21-S01-det010.fits b/tests/data/input/ucd/raw/2023-10-31/2023103100227-R21-S01-det010.fits
similarity index 100%
rename from data/input/ucd/raw/2023-10-31/2023103100227-R21-S01-det010.fits
rename to tests/data/input/ucd/raw/2023-10-31/2023103100227-R21-S01-det010.fits
diff --git a/tests/test_assemble.py b/tests/test_assemble.py
index 527658f33..5ab30677d 100644
--- a/tests/test_assemble.py
+++ b/tests/test_assemble.py
@@ -25,19 +25,18 @@
import unittest
import lsst.utils.tests
-from lsst.utils import getPackageDir
from lsst.daf.butler import Butler
from lsst.afw.cameraGeom import Detector
from lsst.afw.image import ImageFitsReader
import lsst.obs.base.yamlCamera as yamlCamera
from lsst.ip.isr import AssembleCcdTask
+from lsst.resources import ResourcePath
from lsst.obs.lsst.utils import readRawFile
-PACKAGE_DIR = getPackageDir("obs_lsst")
TESTDIR = os.path.dirname(__file__)
-LATISS_DATA_ROOT = os.path.join(PACKAGE_DIR, 'data', 'input', 'latiss')
-BOT_DATA_ROOT = os.path.join(TESTDIR, 'data', 'input')
+LATISS_DATA_ROOT = os.path.join(TESTDIR, 'data', 'input', 'latiss')
+BOT_DATA_ROOT = os.path.join(TESTDIR, 'data', 'input', 'bot')
E2V_DATA_ID = {'raft': 'R22', 'name_in_raft': 'S11', 'exposure': 3019103101985, 'instrument': 'LSSTCam'}
ITL_DATA_ID = {'raft': 'R02', 'name_in_raft': 'S02', 'exposure': 3019110102212, 'instrument': 'LSSTCam'}
TESTDATA_ROOT = os.path.join(TESTDIR, "data")
@@ -146,8 +145,10 @@ def testAssemble(self):
class ReadRawFileTestCase(lsst.utils.tests.TestCase):
def testReadRawLatissFile(self):
fileName = os.path.join(LATISS_DATA_ROOT, "raw/2018-09-20/3018092000065-det000.fits")
- policy = os.path.join(PACKAGE_DIR, "policy", "latiss.yaml")
- camera = yamlCamera.makeCamera(policy)
+ with ResourcePath(
+ "resource://lsst.obs.lsst/resources/policy/latiss.yaml", forceDirectory=False
+ ).as_local() as policy_file:
+ camera = yamlCamera.makeCamera(policy_file.ospath)
exposure = readRawFile(fileName, camera[0], dataId={"file": fileName})
self.assertIsInstance(exposure, lsst.afw.image.Exposure)
md = exposure.getMetadata()
diff --git a/tests/test_comCam.py b/tests/test_comCam.py
index df0bc4939..4b8e0a94f 100644
--- a/tests/test_comCam.py
+++ b/tests/test_comCam.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstComCam
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestLsstCam(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "comCam"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_comCamSim.py b/tests/test_comCamSim.py
index e52d56c50..6ea5e396d 100644
--- a/tests/test_comCamSim.py
+++ b/tests/test_comCamSim.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstComCamSim
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestLsstCam(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "comCamSim"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_gen3.py b/tests/test_gen3.py
index 9f377d09f..37a1f7141 100644
--- a/tests/test_gen3.py
+++ b/tests/test_gen3.py
@@ -40,7 +40,7 @@
)
TESTDIR = os.path.abspath(os.path.dirname(__file__))
-DATAROOT = os.path.join(TESTDIR, os.path.pardir, "data", "input")
+DATAROOT = os.path.join(TESTDIR, "data", "input")
# This test is unfortunately slow; leave a profiling option in in case we want
# to improve it later. Initial version is about 60% YamlCamera construction
diff --git a/tests/test_generateCamera.py b/tests/test_generateCamera.py
index 484fcf2c7..7d0f86598 100644
--- a/tests/test_generateCamera.py
+++ b/tests/test_generateCamera.py
@@ -26,16 +26,13 @@
import shutil
from tempfile import mkdtemp
-import lsst.utils
-import lsst.utils.tests
-
from lsst.obs.lsst.script.generateCamera import generateCamera, parseYamlOnPath
TESTDIR = os.path.abspath(os.path.dirname(__file__))
POLICYDIR = os.path.normpath(os.path.join(TESTDIR, os.path.pardir, 'policy'))
-class PhosimToRaftsTestCase(lsst.utils.tests.ExecutablesTestCase):
+class PhosimToRaftsTestCase(unittest.TestCase):
"""Test the generateCamera.py utility script."""
def setUp(self):
@@ -111,5 +108,4 @@ def testFailures(self):
if __name__ == "__main__":
- lsst.utils.tests.init()
unittest.main()
diff --git a/tests/test_guider.py b/tests/test_guider.py
index 2d065e80d..38fc96e31 100644
--- a/tests/test_guider.py
+++ b/tests/test_guider.py
@@ -30,7 +30,7 @@
from lsst.obs.base import RawIngestTask
TESTDIR = os.path.abspath(os.path.dirname(__file__))
-DATAROOT = os.path.join(TESTDIR, os.path.pardir, "data", "input", "guider")
+DATAROOT = os.path.join(TESTDIR, "data", "input", "guider")
class GuiderIngestTestCase(unittest.TestCase):
diff --git a/tests/test_imsim.py b/tests/test_imsim.py
index 1bf2d6dac..00680f7e9 100644
--- a/tests/test_imsim.py
+++ b/tests/test_imsim.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstCamImSim
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestImsim(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "imsim"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_ingest.py b/tests/test_ingest.py
index fa2c00e05..ad8eb124d 100644
--- a/tests/test_ingest.py
+++ b/tests/test_ingest.py
@@ -38,7 +38,7 @@
import lsst.obs.lsst
TESTDIR = os.path.abspath(os.path.dirname(__file__))
-DATAROOT = os.path.join(TESTDIR, os.path.pardir, "data", "input")
+DATAROOT = os.path.join(TESTDIR, "data", "input")
class LatissIngestTestCase(IngestTestBase, lsst.utils.tests.TestCase):
diff --git a/tests/test_latiss.py b/tests/test_latiss.py
index 7e18abda3..01e6ff777 100644
--- a/tests/test_latiss.py
+++ b/tests/test_latiss.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import Latiss
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestLatiss(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "latiss"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_lsstCam.py b/tests/test_lsstCam.py
index c31f37e44..e80bfe0cb 100644
--- a/tests/test_lsstCam.py
+++ b/tests/test_lsstCam.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstCam
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestLsstCam(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "lsstCam"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_lsstCamSim.py b/tests/test_lsstCamSim.py
index 0baacd225..bff186534 100644
--- a/tests/test_lsstCamSim.py
+++ b/tests/test_lsstCamSim.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstCamSim
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestLsstCamSim(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "lsstCamSim"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_phosim.py b/tests/test_phosim.py
index 0ce0d5dc9..ae32d3bcf 100644
--- a/tests/test_phosim.py
+++ b/tests/test_phosim.py
@@ -43,6 +43,7 @@ def _clean_metadata_provenance(hdr):
class TestPhosim(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "phosim"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_rewrite_qe.py b/tests/test_rewrite_qe.py
index 301623ddf..405d14d99 100644
--- a/tests/test_rewrite_qe.py
+++ b/tests/test_rewrite_qe.py
@@ -27,15 +27,14 @@
import tempfile
import glob
-import lsst.utils
from lsst.obs.lsst.script.rewrite_ts8_qe_files import rewrite_ts8_files
from lsst.ip.isr import IntermediateSensorTransmissionCurve
+from lsst.resources import ResourcePath
TESTDIR = os.path.abspath(os.path.dirname(__file__))
-DATADIR = lsst.utils.getPackageDir('obs_lsst_data')
-class RewriteQeTestCase(lsst.utils.tests.ExecutablesTestCase):
+class RewriteQeTestCase(unittest.TestCase):
"""Test the rewrite_ts8_qe_files.py utility script."""
def testRewriteQe(self):
@@ -48,8 +47,13 @@ def testRewriteQe(self):
self.assertEqual(len(files), 9)
for f in files:
curve1 = IntermediateSensorTransmissionCurve.readText(f)
- expect_file = os.path.join(DATADIR, 'ts8', 'transmission_sensor', os.path.relpath(f, root))
- curve2 = IntermediateSensorTransmissionCurve.readText(expect_file)
+
+ rel_path = os.path.relpath(f, root)
+ with ResourcePath(
+ f"resource://lsst.obs_lsst_data/resources/ts8/transmission_sensor/{rel_path}",
+ forceDirectory=False,
+ ).as_local() as expect_file:
+ curve2 = IntermediateSensorTransmissionCurve.readText(expect_file.ospath)
# These fields are created every time, and therefore
# differ between the test data and the references.
diff --git a/tests/test_ts3.py b/tests/test_ts3.py
index 3f38959d3..ba2efcdcd 100644
--- a/tests/test_ts3.py
+++ b/tests/test_ts3.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstTS3
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestTs3(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "ts3"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_ts8.py b/tests/test_ts8.py
index dfe4894d2..5055383c1 100644
--- a/tests/test_ts8.py
+++ b/tests/test_ts8.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstTS8
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestTs8(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "ts8"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
diff --git a/tests/test_ucdcam.py.old b/tests/test_ucdcam.py.old
index 5de3eef5a..1bef2dfc9 100644
--- a/tests/test_ucdcam.py.old
+++ b/tests/test_ucdcam.py.old
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
+import os.path
import sys
import unittest
@@ -29,9 +30,12 @@ import lsst.afw.image
from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
from lsst.obs.lsst import LsstUCDCam
+TESTDIR = os.path.abspath(os.path.dirname(__file__))
+
class TestUcdCam(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
instrumentDir = "ucd"
+ DATAROOT = os.path.join(TESTDIR, "data", "input")
@classmethod
def getInstrument(cls):
@@ -64,7 +68,7 @@ class TestUcdCam(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
raw_subsets = (({}, 2),
({'physical_filter': 'r'}, 2),
({'physical_filter': 'foo'}, 0),
- ({'exposure': 3023073000237}, 1),
+ ({'exposure': 3023073000237}, 1),
)
linearizer_type = unittest.SkipTest
self.setUp_butler_get(ccdExposureId_bits=ccdExposureId_bits,