Skip to content

Commit

Permalink
Merge pull request #9 from danjampro/update_camera
Browse files Browse the repository at this point in the history
Get processCcd.py working
  • Loading branch information
fergusL authored Mar 26, 2020
2 parents e1b3481 + 9b2ba68 commit 4173691
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 5 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ bin/showCamera.py
bin/showDither.py
bin/showPsfs.py
bin/hscIsr.py

*.DS_Store
scripts/private
Binary file removed camera/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions camera/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
config.detectorList[0].bbox_y0=0

# y1 of pixel bounding box
config.detectorList[0].bbox_y1=4096
config.detectorList[0].bbox_y1=2532

# x1 of pixel bounding box
config.detectorList[0].bbox_x1=6144
config.detectorList[0].bbox_x1=3352

# x0 of pixel bounding box
config.detectorList[0].bbox_x0=0
Expand Down
14 changes: 13 additions & 1 deletion config/characterise.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
e.g.:
config.doWrite = False
'''
# Cosmic ray removal
# See: https://github.com/lsst/meas_algorithms/blob/master/src/CR.cc
config.repair.doCosmicRay = True

config.repair.doCosmicRay=True
# We seem to be getting too many CR detections
# For now we can increase the max number of allowable CRs
config.repair.cosmicray.nCrPixelMax = 1000000

# Sometimes there are no initial source detections, causing errors
# Lowering this number gives more sources for PSF fitting (default 10)
config.detection.includeThresholdMultiplier = 5.0

# Try and get PSF fitting to work
config.psfIterations = 1 #More than this and it fails... not sure why.
2 changes: 1 addition & 1 deletion config/processCcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
config.charImage.load(os.path.join(configDir, "characterise.py"))

#Load Calibrate configurations
config.doCalibrate = False
config.doCalibrate = True
config.calibrate.load(os.path.join(configDir, "calibrate.py"))
1 change: 1 addition & 0 deletions docker/startup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
. $LSST_HOME/loadLSST.bash
eups declare obs_huntsman v1 -r $STACK/obs_huntsman
setup obs_huntsman v1
ingestImages.py DATA testdata/*.fits.fz --mode=link
/bin/bash
8 changes: 8 additions & 0 deletions policy/HuntsmanMapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ exposures:
python: lsst.afw.image.DecoratedImageF
persistable: DecoratedImageF
template: 'raw/%(dateObs)s/%(dataType)s-%(visit)04d-%(filter)s-%(ccd)02d.fits'
calexp:
python: lsst.afw.image.DecoratedImageF
persistable: DecoratedImageF
template: 'calexp/calexp/%(visit)07d/calexp-%(visit)07d_%(ccd)02d-%(filter)s.fits'

calibrations:
add_bias_etc_here:
Expand All @@ -19,3 +23,7 @@ datasets:
template: 'processCcd_md/%(dateObs)s/processCcd_md-%(visit)04d-%(filter)s-%(ccd)02d.boost'
icSrc:
template: 'sci-results/icSrc/%(dateObs)s/icSrc-%(visit)04d-%(filter)s-%(ccd)02d.fits'
src:
template: 'sci-results/src/%(dateObs)s/src-%(visit)04d-%(filter)s-%(ccd)02d.fits'
calexpBackground:
template: 'calexp/bkgd/%(visit)07d/calexp-%(visit)07d_%(ccd)02d-%(filter)s.fits'
2 changes: 1 addition & 1 deletion scripts/buildDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def makeDetector(ccdId):
# Add the amplifiers to the CCD
ampTable = []
for i in range(1):
addAmp(ampTable, i, readout[ccdId-1][i],gain_all[ccdId-1][i])
addAmp(ampTable, i, readout[ccdId-1][i], gain_all[ccdId-1][i])

# Create detectorTable (can add more than one CCD here later)
protoTypeSchema = cameraGeom.Amplifier.getRecordSchema()
Expand Down

0 comments on commit 4173691

Please sign in to comment.