From fdddc3df52c1b809d6fce51465c2889546f15c66 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 12 Jul 2024 11:31:40 -0700 Subject: [PATCH] Modify nan/inf usage to support numpy 2.0 --- python/lsst/faro/base/MatchedCatalogBase.py | 2 +- .../lsst/faro/measurement/MatchedCatalogMeasurementTasks.py | 4 ++-- python/lsst/faro/utils/filtermatches.py | 2 +- python/lsst/faro/utils/prefilter.py | 2 +- python/lsst/faro/utils/selectors.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/lsst/faro/base/MatchedCatalogBase.py b/python/lsst/faro/base/MatchedCatalogBase.py index ce9312ec..463db92e 100644 --- a/python/lsst/faro/base/MatchedCatalogBase.py +++ b/python/lsst/faro/base/MatchedCatalogBase.py @@ -75,7 +75,7 @@ class MatchedBaseConfig( ) snrMax = pexConfig.Field( doc="Maximum SNR for a source to be included.", - dtype=float, default=np.Inf + dtype=float, default=np.inf ) brightMagCut = pexConfig.Field( doc="Bright limit of catalog entries to include.", dtype=float, default=10.0 diff --git a/python/lsst/faro/measurement/MatchedCatalogMeasurementTasks.py b/python/lsst/faro/measurement/MatchedCatalogMeasurementTasks.py index fb0be9e2..20ee3ee2 100644 --- a/python/lsst/faro/measurement/MatchedCatalogMeasurementTasks.py +++ b/python/lsst/faro/measurement/MatchedCatalogMeasurementTasks.py @@ -76,7 +76,7 @@ class PA1Config(Config): brightSnrMax = Field( doc="Maximum median SNR for a source to be considered bright.", dtype=float, - default=np.Inf, + default=np.inf, ) nMinPhotRepeat = Field( doc="Minimum number of objects required for photometric repeatability.", @@ -170,7 +170,7 @@ class PF1Config(Config): brightSnrMax = Field( doc="Maximum median SNR for a source to be considered bright.", dtype=float, - default=np.Inf, + default=np.inf, ) nMinPhotRepeat = Field( doc="Minimum number of objects required for photometric repeatability.", diff --git a/python/lsst/faro/utils/filtermatches.py b/python/lsst/faro/utils/filtermatches.py index d64d2dd2..2ebef022 100644 --- a/python/lsst/faro/utils/filtermatches.py +++ b/python/lsst/faro/utils/filtermatches.py @@ -40,7 +40,7 @@ def filterMatches( if snrMin is None: snrMin = 50.0 if snrMax is None: - snrMax = np.Inf + snrMax = np.inf if extended is None: extended = False if doFlags is None: diff --git a/python/lsst/faro/utils/prefilter.py b/python/lsst/faro/utils/prefilter.py index 03bb9e67..74465aaa 100644 --- a/python/lsst/faro/utils/prefilter.py +++ b/python/lsst/faro/utils/prefilter.py @@ -41,7 +41,7 @@ def preFilter( if snrMin is None: snrMin = 50.0 if snrMax is None: - snrMax = np.Inf + snrMax = np.inf if extended is None: extended = False diff --git a/python/lsst/faro/utils/selectors.py b/python/lsst/faro/utils/selectors.py index e4e4a0e2..44237c98 100644 --- a/python/lsst/faro/utils/selectors.py +++ b/python/lsst/faro/utils/selectors.py @@ -254,7 +254,7 @@ class SNRSelector(DataFrameAction): snrMax = Field( doc="The maximum S/N threshold to remove sources with.", dtype=float, - default=np.Inf + default=np.inf ) selectorBandType = ChoiceField( doc="Type of selection to do options are current band or static selection",