Coverage for python/lsst/sims/featureScheduler/schedulers/filter_scheduler.py : 47%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from lsst.sims.featureScheduler.utils import int_rounded
3__all__ = ['filter_swap_scheduler', 'simple_filter_sched']
6class filter_swap_scheduler(object):
7 """A simple way to schedule what filter to load
8 """
9 def __init__(self):
10 pass
12 def add_observation(self, observation):
13 pass
15 def __call__(self, conditions):
16 """
17 Returns
18 -------
19 list of strings for the filters that should be loaded
20 """
21 pass
24class simple_filter_sched(filter_swap_scheduler):
25 def __init__(self, illum_limit=10.):
26 self.illum_limit_IR = int_rounded(illum_limit)
28 def __call__(self, conditions):
29 if int_rounded(conditions.moonPhase) > self.illum_limit_IR:
30 result = ['g', 'r', 'i', 'z', 'y']
31 else:
32 result = ['u', 'g', 'r', 'i', 'y']
33 return result