Skip to content

Commit

Permalink
Merge pull request #141 from lsst/tickets/DM-24495
Browse files Browse the repository at this point in the history
DM-24495: Switch to using __file__ to reference other configs.
  • Loading branch information
TallJimbo committed Apr 17, 2020
2 parents 9352a82 + b5986a9 commit a6dd159
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
4 changes: 1 addition & 3 deletions config/coaddDriver.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Load from sub-configurations
import os.path

from lsst.utils import getPackageDir

for sub in ("makeCoaddTempExp", "backgroundReference", "assembleCoadd", "detectCoaddSources"):
path = os.path.join(getPackageDir("obs_decam"), "config", sub + ".py")
path = os.path.join(os.path.dirname(__file__), sub + ".py")
if os.path.exists(path):
getattr(config, sub).load(path)
3 changes: 1 addition & 2 deletions config/datasetIngest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Config override for lsst.ap.verify.DatasetIngestTask
import os.path

from lsst.utils import getPackageDir
from lsst.obs.decam.ingest import DecamIngestTask

decamConfigDir = os.path.join(getPackageDir('obs_decam'), 'config')
decamConfigDir = os.path.dirname(__file__)

config.textDefectPath = os.path.join(getPackageDir('obs_decam_data'), 'decam', 'defects')
config.dataIngester.retarget(DecamIngestTask)
Expand Down
4 changes: 1 addition & 3 deletions config/multiBandDriver.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Load from sub-configurations
import os.path

from lsst.utils import getPackageDir

for sub in ("mergeCoaddDetections", "measureCoaddSources", "mergeCoaddMeasurements", "forcedPhotCoadd"):
path = os.path.join(getPackageDir("obs_decam"), "config", sub + ".py")
path = os.path.join(os.path.dirname(__file__), sub + ".py")
if os.path.exists(path):
getattr(config, sub).load(path)
4 changes: 1 addition & 3 deletions config/runIsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""
import os.path

from lsst.utils import getPackageDir

obsConfigDir = os.path.join(getPackageDir("obs_decam"), "config")
obsConfigDir = os.path.join(os.path.dirname(__file__))

config.isr.load(os.path.join(obsConfigDir, "isr.py"))
4 changes: 1 addition & 3 deletions config/runIsrCp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""
import os.path

from lsst.utils import getPackageDir

obsConfigDir = os.path.join(getPackageDir("obs_decam"), "config")
obsConfigDir = os.path.join(os.path.dirname(__file__))

config.isr.load(os.path.join(obsConfigDir, "isr.py"))
4 changes: 1 addition & 3 deletions config/singleFrameDriver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import os

from lsst.utils import getPackageDir

config.processCcd.load(os.path.join(getPackageDir("obs_decam"), "config", "processCcd.py"))
config.processCcd.load(os.path.join(os.path.dirname(__file__), "processCcd.py"))
config.ccdKey = 'ccdnum'

0 comments on commit a6dd159

Please sign in to comment.