Skip to content

Commit

Permalink
Merge pull request #124 from lsst/tickets/DM-38632
Browse files Browse the repository at this point in the history
DM-38632: Use normalized compensated tophats as default input for calibration.
  • Loading branch information
erykoff authored Jun 19, 2024
2 parents 8ee334c + dc88203 commit a8d6e2f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/lsst/fgcmcal/fgcmBuildFromIsolatedStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def setDefaults(self):
self.reserve_selection.reserve_fraction = 0.1

# The names here correspond to the isolated_star_sources.
self.instFluxField = 'apFlux_12_0_instFlux'
self.instFluxField = 'normCompTophatFlux_instFlux'
self.localBackgroundFluxField = 'localBackground_instFlux'
self.apertureInnerInstFluxField = 'apFlux_12_0_instFlux'
self.apertureOuterInstFluxField = 'apFlux_17_0_instFlux'
Expand All @@ -176,7 +176,7 @@ def setDefaults(self):

source_selector.flags.bad = []

source_selector.signalToNoise.minimum = 11.0
source_selector.signalToNoise.minimum = 9.0
source_selector.signalToNoise.maximum = 1000.0
source_selector.signalToNoise.fluxField = self.instFluxField
source_selector.signalToNoise.errField = self.instFluxField + 'Err'
Expand Down Expand Up @@ -394,7 +394,8 @@ def _make_all_star_obs_from_isolated_stars(
if self.sourceSelector.config.doFlags:
source_columns.extend(self.sourceSelector.config.flags.bad)

local_background_area = np.pi*calib_flux_aperture_radius**2.
if self.config.doSubtractLocalBackground:
local_background_area = np.pi*calib_flux_aperture_radius**2.

# Compute the approximate pixel area over the full focal plane
# from the WCS jacobian using the camera model.
Expand Down
5 changes: 5 additions & 0 deletions tests/config/fgcmBuildFromIsolatedStarsHsc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import os
from lsst.obs.hsc.hscFilters import HSC_FILTER_DEFINITIONS

config.instFluxField = 'apFlux_12_0_instFlux'
config.sourceSelector["science"].signalToNoise.fluxField = 'apFlux_12_0_instFlux'
config.sourceSelector["science"].signalToNoise.errField = 'apFlux_12_0_instFluxErr'
config.sourceSelector["science"].signalToNoise.minimum = 11.0

# This override is to be consistent with the old tests
config.referenceCCD = 13
# The filterMap and bands are for the small subset of bands used in the tests
Expand Down
1 change: 1 addition & 0 deletions tests/config/fgcmBuildFromIsolatedStarsLatiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
config.sourceSelector["science"].flags.bad.append("localBackground_flag")
config.sourceSelector["science"].signalToNoise.fluxField = "apFlux_35_0_instFlux"
config.sourceSelector["science"].signalToNoise.errField = "apFlux_35_0_instFluxErr"
config.sourceSelector["science"].signalToNoise.minimum = 11.0
config.fgcmLoadReferenceCatalog.load(os.path.join(configDir, "filterMapLatiss.py"))
config.fgcmLoadReferenceCatalog.applyColorTerms = True
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(configDir, "colortermsLatiss.py"))
Expand Down

0 comments on commit a8d6e2f

Please sign in to comment.