Skip to content

Commit

Permalink
Increase max dropped SkyCam fibers from 1 to 3 (fixes #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirkby committed Nov 22, 2021
1 parent 5c6ce47 commit 94144bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Changed
- Use MW_transp=1 when the fiberassign FAPRGRM is "BACKUP". Fixes [#8](https://github.com/desihub/desietc/issues/8).
- Use 2,20-min average airmass correction factors in speeds. Fixes [#9](https://github.com/desihub/desietc/issues/9).
- Increase max dropped SkyCam fibers from 1 to 3. Fixes [#7](https://github.com/desihub/desietc/issues/7).

## [0.1.13] - 2021-10-07
## Added
Expand Down
4 changes: 2 additions & 2 deletions desietc/sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __init__(self, calib_name='SKY_calib.fits'):
# Initialize background fitting.
self.bgfitter = BGFitter()

def setraw(self, raw, name, gain=2.5, saturation=65500, refit=True, pullcut=5, chisq_max=5, ndrop_max=2,
def setraw(self, raw, name, gain=2.5, saturation=65500, refit=True, pullcut=5, chisq_max=5, ndrop_max=3,
masked=True, finetune=True):
"""
"""
Expand Down Expand Up @@ -230,7 +230,7 @@ def setraw(self, raw, name, gain=2.5, saturation=65500, refit=True, pullcut=5, c
snr = self.flux[:N] / self.fluxerr[:N]
order = np.argsort(snr)[::-1]
self.ndrop = 0
while self.ndrop < ndrop_max:
while self.ndrop <= ndrop_max:
ivar = np.sum(wgt[used])
meanflux = np.sum(wgt[used] * cflux[used]) / ivar
self.chisq = np.sum(((cflux[used] - meanflux) / cfluxerr[used]) ** 2) / (N - self.ndrop)
Expand Down

0 comments on commit 94144bf

Please sign in to comment.