GoalStrictFilterBasisFunction¶
- class rubin_sim.scheduler.basis_functions.GoalStrictFilterBasisFunction(time_lag_min=10.0, time_lag_max=30.0, time_lag_boost=60.0, boost_gain=2.0, unseen_before_lag=False, filtername='r', tag=None, twi_change=-18.0, proportion=1.0, aways_available=False)¶
Bases:
BaseBasisFunction
Remove the bonus for staying in the same filter if certain conditions are met.
If the moon rises/sets or twilight starts/ends, it makes a lot of sense to consider a filter change. This basis function rewards if it matches the current filter, the moon rises or sets, twilight starts or stops, or there has been a large gap since the last observation.
- Parameters:
- time_lag_min
float
Minimum time after a filter change for which a new filter change will receive zero reward, or be denied at all (see unseen_before_lag).
- time_lag_max
float
Time after a filter change where the reward for changing filters achieve its maximum.
- time_lag_boost
float
Time after a filter change to apply a boost on the reward.
- boost_gain
float
A multiplier factor for the reward after time_lag_boost.
- unseen_before_lag
bool
If True will make it impossible to switch filter before time_lag has passed.
- filtername
str
The filter for which this basis function will be used.
- tag: `str` or None
When using filter proportion use only regions with this tag to count for observations.
- twi_change
float
Switch reward on when twilight changes.
- proportion
float
The expected filter proportion distribution.
- aways_available: `bool`
If this is true the basis function will aways be computed regardless of the feasibility. If False a more detailed feasibility check is performed. When set to False, it may speed up the computation process by avoiding to compute the reward functions paired with this bf, when observation is not feasible.
- time_lag_min
Methods Summary
check_feasibility
(conditions)This method makes a pre-check of the feasibility of this basis function.
filter_change_bonus
(time)Methods Documentation
- check_feasibility(conditions)¶
This method makes a pre-check of the feasibility of this basis function. If a basis function returns False on the feasibility check, it won’t computed at all.
- Returns:
- feasibility
bool
- feasibility
- filter_change_bonus(time)¶