Skip to content

Commit

Permalink
Use +/- Inf for timespan of obscore record if no timespan available
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 30, 2024
1 parent 106344b commit e37fd84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/daf/butler/registry/obscore/_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
__all__ = ["ExposureRegionFactory", "Record", "RecordFactory"]

import logging
import math
import warnings
from abc import abstractmethod
from collections.abc import Callable, Collection, Mapping
Expand Down Expand Up @@ -188,6 +189,9 @@ def __call__(self, ref: DatasetRef, context: SqlQueryContext) -> Record | None:
if timespan.end is not None:
t_max = cast(astropy.time.Time, timespan.end)
record["t_max"] = t_max.mjd
else:
record["t_min"] = -math.inf
record["t_max"] = math.inf

region = dataId.region
if self.exposure.name in dataId:
Expand Down

0 comments on commit e37fd84

Please sign in to comment.