diff --git a/pyscope/telrun/airmass_condition.py b/pyscope/telrun/airmass_condition.py index 0b2602b1..3803b2dd 100644 --- a/pyscope/telrun/airmass_condition.py +++ b/pyscope/telrun/airmass_condition.py @@ -6,7 +6,7 @@ class AirmassCondition(BoundaryCondition): - def __init__(self, airmass_limit=3, formula="Schoenberg1929", weight=1, **kwargs): + def __init__(self, airmass_limit=3, formula="Schoenberg1929", weight=1): """ A condition that penalizes targets for higher airmass values up to a limit. @@ -56,9 +56,6 @@ def __init__(self, airmass_limit=3, formula="Schoenberg1929", weight=1, **kwargs weight : `float`, default : 1 The weight of the condition in the final score. The default is 1. - **kwargs : `dict`, default : {} - Additional keyword arguments to pass to the `~pyscope.telrun.BoundaryCondition` constructor for storage in the `~pyscope.telrun.BoundaryCondition.kwargs` attribute. - References ---------- .. [1] `Schoenberg, E. 1929. Theoretische Photometrie, Über die Extinktion des Lichtes in der Erdatmosphäre. In Handbuch der Astrophysik. Band II, erste Hälfte. Berlin: Springer. `_ @@ -77,7 +74,7 @@ def __init__(self, airmass_limit=3, formula="Schoenberg1929", weight=1, **kwargs """ logger.debug("AirmassCondition(airmass_limit=%s, formula=%s, weight=%s)") - super().__init__(func=self._func, lqs_func=self._lqs_func, **kwargs) + super().__init__(func=self._func, lqs_func=self._lqs_func) @classmethod def from_string(self, string, airmass_limit=None, formula=None, weight=None): @@ -114,7 +111,7 @@ def __str__(self): logger.debug("AirmassCondition().__str__()") @staticmethod - def _func(target, time, location, formula="Schoenberg1929", **kwargs): + def _func(target, time, location, formula="Schoenberg1929"): """ Calculate the airmass value for the target. @@ -132,7 +129,7 @@ def _func(target, time, location, formula="Schoenberg1929", **kwargs): logger.debug("AirmassCondition._func(target=%s)" % target) @staticmethod - def _lqs_func(self, value, airmass_limit=3, **kwargs): + def _lqs_func(self, value, airmass_limit=3): """ Calculate the linear quality score for the airmass value. diff --git a/pyscope/telrun/celestialbody_condition.py b/pyscope/telrun/celestialbody_condition.py new file mode 100644 index 00000000..da7bd319 --- /dev/null +++ b/pyscope/telrun/celestialbody_condition.py @@ -0,0 +1,61 @@ +import logging + +from astropy import units as u + +from .boundary_condition import BoundaryCondition + +logger = logging.getLogger(__name__) + + +class CelestialBodyCondition(BoundaryCondition): + def __init__( + self, + body_name, + min_sep=0 * u.deg, + max_sep=180 * u.deg, + min_alt=-90 * u.deg, + max_alt=90 * u.deg, + score_type="boolean", + inclusive=True, + ): + """ """ + pass + + @classmethod + def from_string(cls, string): + pass + + def __str__(self): + pass + + @staticmethod + def _func(self, target, observer, time): + pass + + @staticmethod + def _lsq_func(self, value): + pass + + @property + def min_sep(self): + pass + + @property + def max_sep(self): + pass + + @property + def min_alt(self): + pass + + @property + def max_alt(self): + pass + + @property + def score_type(self): + pass + + @property + def inclusive(self): + pass diff --git a/pyscope/telrun/coord_condition.py b/pyscope/telrun/coord_condition.py index 4fc9fa1b..cc73d760 100644 --- a/pyscope/telrun/coord_condition.py +++ b/pyscope/telrun/coord_condition.py @@ -13,8 +13,8 @@ def __init__( min_val=None, max_val=None, score_type="boolean", + inclusive=True, ref_coord=None, - **kwargs, ): """ A restriction on the coordinates of the target viewed from a specific location @@ -48,14 +48,17 @@ def __init__( that returns 1 if the condition is met and 0 if it is not, commonly used for determining if the source is above or below the horizon. The default is "boolean". + inclusive : `bool`, default : `True` + If `True`, the condition is inclusive, meaning that the target must be within + the specified range. If `False`, the condition is exclusive, meaning that the + target must be outside the specified range. Useful for excluding certain parts + of the sky where a mount may be in jeopardy. + ref_coord : `~astropy.coordinates.SkyCoord`, default : `None` If `coord_type` is "radec" or "galactic", a user can specify a center value and `min_val` and `max_val` will be interpreted as a minimum and maximum angular separation of the target from the reference coordinate. - **kwargs : `dict`, default : {} - Additional keyword arguments to pass to the `~pyscope.telrun.BoundaryCondition` constructor. - """ logger.debug( """ @@ -65,10 +68,18 @@ def __init__( min_val=%s, max_val=%s, score_type=%s, + inclusive=%s, ref_coord=%s, - kwargs=%s )""" - % (coord_type, coord_idx, min_val, max_val, score_type, ref_coord, kwargs) + % ( + coord_type, + coord_idx, + min_val, + max_val, + score_type, + inclusive, + ref_coord, + ) ) @classmethod @@ -80,11 +91,12 @@ def from_string( min_val=None, max_val=None, score_type=None, + inclusive=None, ref_coord=None, - **kwargs, ): """ - Create a `~pyscope.telrun.CoordinateCondition` or a `list` of `~pyscope.telrun.CoordinateCondition` objects from a `str` representation of a `~pyscope.telrun.CoordinateCondition`. + Create a `~pyscope.telrun.CoordinateCondition` or a `list` of `~pyscope.telrun.CoordinateCondition` objects from a `str` + representation of a `~pyscope.telrun.CoordinateCondition`. All optional parameters are used to override the parameters extracted from the `str` representation. Parameters @@ -101,14 +113,23 @@ def from_string( score_type : `str`, default : `None` - ref_coord : `~astropy.coordinates.SkyCoord`, default : `None` + inclusive : `bool`, default : `None` - **kwargs : `dict`, default : {} + ref_coord : `~astropy.coordinates.SkyCoord`, default : `None` """ logger.debug( - "CoordinateCondition.from_string(string=%s, coord_type=%s, coord_idx=%s, min_val=%s, max_val=%s, score_type=%s, kwargs=%s)" - % (string, coord_type, coord_idx, min_val, max_val, score_type, kwargs) + "CoordinateCondition.from_string(string=%s, coord_type=%s, coord_idx=%s, min_val=%s, max_val=%s, score_type=%s, inclusive=%s, ref_coord=%s)" + % ( + string, + coord_type, + coord_idx, + min_val, + max_val, + score_type, + inclusive, + ref_coord, + ) ) def __str__(self): @@ -124,33 +145,150 @@ def __str__(self): logger.debug("CoordinateCondition().__str__()") @staticmethod - def _func(): - pass + def _func(self, target, time, location): + """ + Determine if the target meets the coordinate condition. + + Parameters + ---------- + target : `~astropy.coordinates.SkyCoord`, required + The target to check. + + time : `~astropy.time.Time`, required + The time of the observation. + + location : `~astropy.coordinates.EarthLocation`, required + The location of the observer. + + Returns + ------- + `float` or `bool` + The score value of the target. If `score_type` is "linear", the score is a `float` + value between 0 and 1. If `score_type` is "boolean", the score is a `bool` value of + `True` if the target meets the condition and `False` if it does not. + + """ + logger.debug( + "CoordinateCondition()._func(target=%s, time=%s, location=%s)" + % (target, time, location) + ) @staticmethod - def _lqs_func(): - pass + def _lqs_func(self, value): + """ + Calculate the linear quality score for the coordinate value. + + Parameters + ---------- + value : `float` or `bool`, required + + Returns + ------- + `float` + The linear quality score for the coordinate value. + + """ + logger.debug("CoordinateCondition._lqs_func(value=%s)" % value) @property def coord_type(self): - pass + """ + The type of coordinate system to use. Options are "altaz" for altitude and azimuth, "radec" for right ascension + and declination, and "galactic" for galactic latitude and longitude. + + Returns + ------- + `str` + The type of coordinate system to use. + + """ + logger.debug("CoordinateCondition().coord_type == %s" % self._coord_type) + return self._coord_type @property def coord_idx(self): - pass + """ + The index of the coordinate to use. The default is 0 for the first coordinate, e.g. altitude or right ascension. + + Returns + ------- + `int` + The index of the coordinate to use. + + """ + logger.debug("CoordinateCondition().coord_idx == %i" % self._coord_idx) + return self._coord_idx @property def min_val(self): - pass + """ + If `None`, there is no minimum value. Otherwise, the minimum value for the coordinate. + + Returns + ------- + `~astropy.units.Quantity` + The minimum value for the coordinate. + + """ + logger.debug("CoordinateCondition().min_val == %s" % self._min_val) + return self._min_val @property def max_val(self): - pass + """ + If `None`, there is no maximum value. Otherwise, the maximum value for the coordinate. + + Returns + ------- + `~astropy.units.Quantity` + The maximum value for the coordinate. + + """ + logger.debug("CoordinateCondition().max_val == %s" % self._max_val) + return self._max_val @property def score_type(self): - pass + """ + The type of scoring function to use. Options are "linear" for a linear function, commonly used for altitude, + and "boolean" for a binary function that returns 1 if the condition is met and 0 if it is not. + + Returns + ------- + `str` + The type of scoring function to use. + + """ + logger.debug("CoordinateCondition().score_type == %s" % self._score_type) + return self._score_type + + @property + def inclusive(self): + """ + If `True`, the condition is inclusive, meaning that the target must be within the specified range. If `False`, + the condition is exclusive, meaning that the target must be outside the specified range. + Essentially acts as a "not" operator. + + Returns + ------- + `bool` + If the condition is inclusive or exclusive. + + """ + logger.debug("CoordinateCondition().inclusive == %s" % self._inclusive) + return self._inclusive @property def ref_coord(self): - pass + """ + If `coord_type` is "radec" or "galactic", a user can specify a center value and `min_val` and `max_val` will be interpreted + as a minimum and maximum radial angular separation of the target from the reference coordinate. + + Returns + ------- + `~astropy.coordinates.SkyCoord` + The reference coordinate. + + """ + logger.debug("CoordinateCondition().ref_coord == %s" % self._ref_coord) + return self._ref_coord diff --git a/pyscope/telrun/hourangle_condition.py b/pyscope/telrun/hourangle_condition.py index 9647bfbe..60a29737 100644 --- a/pyscope/telrun/hourangle_condition.py +++ b/pyscope/telrun/hourangle_condition.py @@ -13,6 +13,7 @@ def __init__( min_hour_angle=-6 * u.hourangle, max_hour_angle=6 * u.hourangle, score_type="linear", + inclusive=True, ): """ A restriction on the hour angle over which a target can be observed. @@ -38,18 +39,30 @@ def __init__( for optimizing the observing time, and "boolean" for a binary function that returns 1 if the condition is met and 0 if it is not. The default is "linear". + inclusive : `bool`, default : `True` + If `True`, the condition is inclusive, meaning that the target must be within the specified range. + If `False`, the condition is exclusive, meaning that the target must be outside the specified range. + """ logger.debug( """HourAngleCondition( min_hour_angle=%s, max_hour_angle=%s, - score_type=%s + score_type=%s, + inclusive=%s )""" - % (min_hour_angle, max_hour_angle, score_type) + % (min_hour_angle, max_hour_angle, score_type, inclusive) ) @classmethod - def from_string(cls, string, min_hour_angle=None, max_hour_angle=None): + def from_string( + cls, + string, + min_hour_angle=None, + max_hour_angle=None, + score_type=None, + inclusive=None, + ): """ Create a new `~pyscope.telrun.HourAngleCondition` or a `list` of `~pyscope.telrun.HourAngleCondition` objects from a `str`. Any optional parameters are used to override the parameters extracted from the `str`. @@ -62,14 +75,24 @@ def from_string(cls, string, min_hour_angle=None, max_hour_angle=None): max_hour_angle : `~astropy.units.Quantity`, default : `None` + score_type : `str`, default : `None` + + inclusive : `bool`, default : `None` + Returns ------- `~pyscope.telrun.HourAngleCondition` or `list` of `~pyscope.telrun.HourAngleCondition` """ logger.debug( - "HourAngleCondition.from_string(string=%s, min_hour_angle=%s, max_hour_angle=%s)" - % (string, min_hour_angle, max_hour_angle) + """HourAngleCondition.from_string( + string=%s, + min_hour_angle=%s, + max_hour_angle=%s, + score_type=%s, + inclusive=%s + )""" + % (string, min_hour_angle, max_hour_angle, score_type, inclusive) ) def __str__(self): @@ -84,44 +107,106 @@ def __str__(self): """ logger.debug("HourAngleCondition().__str__()") - def __repr__(self): + @staticmethod + def _func(self, target, time, location): """ - Return a `str` representation of the `~pyscope.telrun.HourAngleCondition`. + Calculate the hour angle value for the target. + + Parameters + ---------- + target : `~astropy.coordinates.SkyCoord`, required + The target to calculate the hour angle value for. + + time : `~astropy.time.Time`, required + The time at which to calculate the hour angle value. + + location : `~astropy.coordinates.EarthLocation`, required + The location at which to calculate the hour angle value. Returns ------- - `str` - A `str` representation of the `~pyscope.telrun.HourAngleCondition`. + `~astropy.units.Quantity` + The hour angle value for the target. + """ - logger.debug("HourAngleCondition().__repr__()") - return str(self) + logger.debug( + "HourAngleCondition._func(target=%s, time=%s, location=%s)" + % (target, time, location) + ) - def __call__(self, time, location, target): + @staticmethod + def _lqs_func(self, value): """ - Compute the score for the hour angle condition. + Calculate the linear quality score for the hour angle value. Parameters ---------- - time : `~astropy.time.Time`, required - The time at which the observation is to be made. + value : `~astropy.units.Quantity`, required + The hour angle value for the target. - location : `~astropy.coordinates.EarthLocation`, required - The location of the observer. + Returns + ------- + `float` + The linear quality score for the hour angle value. - target : `~astropy.coordinates.SkyCoord`, required - The target to evaluate the condition for. + """ + logger.debug("HourAngleCondition._lqs_func(value=%s)" % value) + + @property + def min_hour_angle(self): + """ + The minimum hour angle at which the target can be observed. Returns ------- - `float` - The score for the hour angle condition from `0` to `1`. + `~astropy.units.Quantity` + The minimum hour angle at which the target can be observed """ - logger.debug( - "HourAngleCondition().__call__(time=%s, location=%s, target=%s)" - % (time, location, target) - ) + logger.debug("HourAngleCondition().min_hour_angle == %s" % self._min_hour_angle) + return self._min_hour_angle + + @property + def max_hour_angle(self): + """ + The maximum hour angle at which the target can be observed. + + Returns + ------- + `~astropy.units.Quantity` + The maximum hour angle at which the target can be observed - def plot(self, time, location, target=None, ax=None): - """ """ - pass + """ + logger.debug("HourAngleCondition().max_hour_angle == %s" % self._max_hour_angle) + return self._max_hour_angle + + @property + def score_type(self): + """ + The type of scoring function to use. The options are "linear" for a linear function, commonly used for + optimizing the observing time, and "boolean" for a binary function that returns 1 if the condition is met + and 0 if it is not. + + Returns + ------- + `str` + The type of scoring function to use. + + """ + logger.debug("HourAngleCondition().score_type == %s" % self._score_type) + return self._score_type + + @property + def inclusive(self): + """ + If `True`, the condition is inclusive, meaning that the target must be within the specified range. + If `False`, the condition is exclusive, meaning that the target must be outside the specified range. + + Returns + ------- + `bool` + If `True`, the condition is inclusive. If `False`, the condition is exclusive. + + """ + logger.debug("HourAngleCondition().inclusive == %s" % self._inclusive) + return self._inclusive diff --git a/pyscope/telrun/lqs.py b/pyscope/telrun/lqs.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/lqs_gauss.py b/pyscope/telrun/lqs_gauss.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/lqs_inequality.py b/pyscope/telrun/lqs_inequality.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/lqs_minmax.py b/pyscope/telrun/lqs_minmax.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/lqs_piecewise.py b/pyscope/telrun/lqs_piecewise.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/lqs_sigmoid.py b/pyscope/telrun/lqs_sigmoid.py new file mode 100644 index 00000000..e69de29b diff --git a/pyscope/telrun/moon_condition.py b/pyscope/telrun/moon_condition.py index 9957d648..a8e953aa 100644 --- a/pyscope/telrun/moon_condition.py +++ b/pyscope/telrun/moon_condition.py @@ -1,36 +1,18 @@ import logging -from astropy import units as u - -from .boundary_condition import BoundaryCondition +from .celestialbody_condition import CelestialBodyCondition logger = logging.getLogger(__name__) -class MoonCondition(BoundaryCondition): - def __init__( - self, - min_sep=0 * u.deg, - max_sep=180 * u.deg, - min_alt=-90 * u.deg, - max_alt=90 * u.deg, - min_illum=0, - max_illum=1, - ): +class MoonCondition(CelestialBodyCondition): + def __init__(self, min_illum=0, max_illum=1, **kwargs): """ """ pass - def __str__(self): - pass - - def __repr__(self): - logger.debug("MoonCondition().__repr__()") - return str(self) - - def __call__(self, time=None, location=None, target=None): - """ """ + @classmethod + def from_string(cls, string, min_illum=None, max_illum=None, **kwargs): pass - def plot(self, time, location, target=None, ax=None): - """ """ + def __str__(self): pass diff --git a/pyscope/telrun/snr_condition.py b/pyscope/telrun/snr_condition.py index 48b9e31f..d123ff8b 100644 --- a/pyscope/telrun/snr_condition.py +++ b/pyscope/telrun/snr_condition.py @@ -6,4 +6,41 @@ class SNRCondition(BoundaryCondition): - pass + def __init__( + self, min_snr=None, max_snr=None, score_type="boolean", inclusive=True + ): + """ """ + pass + + @classmethod + def from_string( + cls, string, min_snr=None, max_snr=None, score_type=None, inclusive=None + ): + pass + + def __str__(self): + pass + + @staticmethod + def _func(self, target, observer, time): + pass + + @staticmethod + def _lsq_func(self, value): + pass + + @property + def min_snr(self): + pass + + @property + def max_snr(self): + pass + + @property + def score_type(self): + pass + + @property + def inclusive(self): + pass diff --git a/pyscope/telrun/sun_condition.py b/pyscope/telrun/sun_condition.py index f70deb3f..565d30e7 100644 --- a/pyscope/telrun/sun_condition.py +++ b/pyscope/telrun/sun_condition.py @@ -8,30 +8,13 @@ class SunCondition(BoundaryCondition): - def __init__( - self, - min_sep=0 * u.deg, - max_sep=180 * u.deg, - min_alt=-90 * u.deg, - max_alt=90 * u.deg, - ): + def __init__(self, **kwargs): """ """ pass - def from_string(self, string): + @classmethod + def from_string(cls, string, **kwargs): pass def __str__(self): pass - - def __repr__(self): - logger.debug("SunCondition().__repr__()") - return str(self) - - def __call__(self, time=None, location=None, target=None): - """ """ - pass - - def plot(self, time, location, target=None, ax=None): - """ """ - pass diff --git a/pyscope/telrun/time_condition.py b/pyscope/telrun/time_condition.py index 77a51e5a..0a7f6e48 100644 --- a/pyscope/telrun/time_condition.py +++ b/pyscope/telrun/time_condition.py @@ -6,4 +6,233 @@ class TimeCondition(BoundaryCondition): - pass + def __init__( + self, + time_type="local", # local, utc, specified tz/location, or lst at location + min_time=None, + max_time=None, + score_type="boolean", + inclusive=True, + ref_time=None, + ): + """ + A restriction on the time of an observation. The time can be specified + several ways: local, UTC, a specified timezone, or LST at a location. + + Parameters + ---------- + time_type : `str`, default : "local" + The type of time to use. Can be "local", "utc", a timezone + string or an `~astropy.coordinates.EarthLocation` for a timezone lookup, or "lst". + + min_time : `~astropy.time.Time`, default : `None` + The minimum time for the observation. + + max_time : `~astropy.time.Time`, default : `None` + The maximum time for the observation. + + score_type : `str`, default : "boolean" + The type of score to return. Can be "boolean" or "linear". If "boolean", + the score is `True` if the target meets the condition and `False` if it does not. + If "linear", the score is a `float` value between 0 and 1. + + inclusive : `bool`, default : `True` + Whether the min and max values are inclusive. + + ref_time : `~astropy.time.Time`, default : `None` + The reference time to use for the condition. If specified, the `min_time` and + `max_time` are relative to this time. + + """ + logger.debug( + "TimeCondition.__init__(time_type=%s, min_time=%s, max_time=%s, score_type=%s, inclusive=%s, ref_time=%s)" + % (time_type, min_time, max_time, score_type, inclusive, ref_time) + ) + + @classmethod + def from_string( + cls, + string, + time_type=None, + min_time=None, + max_time=None, + score_type=None, + inclusive=None, + ref_time=None, + ): + """ + Create a `~pyscope.telrun.TimeCondition` or a `list` of `~pyscope.telrun.TimeCondition` objects + from a `str` representation of a `~pyscope.telrun.TimeCondition`. All optional parameters are + used to override the parameters extracted from the `str` representation. + + Parameters + ---------- + string : `str`, required + + time_type : `str`, default : `None` + + min_time : `~astropy.time.Time`, default : `None` + + max_time : `~astropy.time.Time`, default : `None` + + score_type : `str`, default : `None` + + inclusive : `bool`, default : `None` + + ref_time : `~astropy.time.Time`, default : `None` + + """ + logger.debug( + "TimeCondition.from_string(string=%s, time_type=%s, min_time=%s, max_time=%s, score_type=%s, inclusive=%s, ref_time=%s)" + % (string, time_type, min_time, max_time, score_type, inclusive, ref_time) + ) + + def __str__(self): + """ + Return a `str` representation of the `~pyscope.telrun.TimeCondition`. + + Returns + ------- + `str` + A `str` representation of the `~pyscope.telrun.TimeCondition`. + + """ + logger.debug("TimeCondition().__str__()") + + @staticmethod + def _func(self, target, time, location): + """ + Check if the target meets the time condition. + + Parameters + ---------- + target : `~astropy.coordinates.SkyCoord`, required + The target to check. + + time : `~astropy.time.Time`, required + The time of the observation. + + location : `~astropy.coordinates.EarthLocation`, required + The location of the observer. + + Returns + ------- + `float` or `bool` + The score for the time condition. If `score_type` is "boolean", the score is `True` if the target + meets the condition and `False` if it does not. If `score_type` is "linear", the score is a `float` + value between 0 and 1. + + """ + logger.debug( + "TimeCondition()._func(target=%s, time=%s, location=%s)" + % (target, time, location) + ) + + @staticmethod + def _lqs_func(self, value): + """ + Calculate the linear quality score for the score value. + + Parameters + ---------- + value : `float`, required + The score value for the target. + + Returns + ------- + `float` + The linear quality score for the score value. + + """ + logger.debug("TimeCondition()._lqs_func(value=%s)" % value) + + @property + def min_time(self): + """ + The minimum time for the observation. + + Returns + ------- + `~astropy.time.Time` + The minimum time for the observation. + + """ + logger.debug("TimeCondition().min_time == %s" % self._min_time) + return self._min_time + + @property + def max_time(self): + """ + The maximum time for the observation. + + Returns + ------- + `~astropy.time.Time` + The maximum time for the observation. + + """ + logger.debug("TimeCondition().max_time == %s" % self._max_time) + return self._max_time + + @property + def time_type(self): + """ + The type of time to use. Can be "local", "utc", a timezone string or an + `~astropy.coordinates.EarthLocation` for a timezone lookup, or "lst". + + Returns + ------- + `str` + The type of time to use. + + """ + logger.debug("TimeCondition().time_type == %s" % self._time_type) + return self._time_type + + @property + def score_type(self): + """ + The type of score to return. Can be "boolean" or "linear". If "boolean", + the score is `True` if the target meets the condition and `False` if it does not. + If "linear", the score is a `float` value between 0 and 1. + + Returns + ------- + `str` + The type of score to return. + + """ + logger.debug("TimeCondition().score_type == %s" % self._score_type) + return self._score_type + + @property + def inclusive(self): + """ + Whether the min and max values are inclusive. Operates as a "not" on the + condition. If `True`, the min and max values are inclusive. If `False`, the + min and max values are exclusive. + + Returns + ------- + `bool` + Whether the min and max values are inclusive. + + """ + logger.debug("TimeCondition().inclusive == %s" % self._inclusive) + return self._inclusive + + @property + def ref_time(self): + """ + The reference `~astropy.time.Time` to use for the condition. If specified, the `min_time` and + `max_time` are relative to this time. A timezone specified in the `ref_time` + `~astropy.time.Time` object will override the `time_type` parameter. + + Returns + ------- + `~astropy.time.Time` + The reference time to use for the condition. + + """ + logger.debug("TimeCondition().ref_time == %s" % self._ref_time) + return self._ref_time