Skip to content

Commit

Permalink
Update to nanojansky photocalib definition
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Dec 20, 2018
1 parent ecbf6a3 commit e78e4f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/lsst/fgcmcal/fgcmOutputProducts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import numpy as np
import healpy as hp
import esutil
from astropy import units

import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
Expand Down Expand Up @@ -743,7 +744,7 @@ def _getChebyshevPhotoCalib(self, coefficients, err, xyMax, offset, scaling):
# Take the zeropoint, apply the absolute relative calibration offset,
# and whatever flat-field scaling was applied
pars[:, :] = (coefficients.reshape(orderPlus1, orderPlus1) *
10.**(offset / (-2.5)) * scaling)
(offset*units.ABmag).to_value(units.nJy) * scaling)

field = afwMath.ChebyshevBoundedField(bbox, pars)
calibMean = field.mean()
Expand Down Expand Up @@ -777,7 +778,7 @@ def _getConstantPhotoCalib(self, zeropoint, err, offset, scaling):
# Take the zeropoint, apply the absolute relative calibration offset,
# and whatever flat-field scaling was applied

calibMean = 10.**(zeropoint / (-2.5)) * 10.**(offset / (-2.5)) * scaling
calibMean = (offset*units.ABmag).to_value(units.nJy) * scaling
calibErr = (np.log(10.) / 2.5) * calibMean * err
photoCalib = afwImage.PhotoCalib(calibMean, calibErr)

Expand Down

0 comments on commit e78e4f3

Please sign in to comment.