Hide keyboard shortcuts

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

 

__all__ = ['filter_swap_scheduler', 'simple_filter_sched'] 

 

 

class filter_swap_scheduler(object): 

"""A simple way to schedule what filter to load 

""" 

def __init__(self): 

pass 

 

def add_observation(self, observation): 

pass 

 

def __call__(self, conditions): 

""" 

Returns 

------- 

list of strings for the filters that should be loaded 

""" 

pass 

 

 

class simple_filter_sched(filter_swap_scheduler): 

def __init__(self, illum_limit=10.): 

self.illum_limit = illum_limit 

 

def __call__(self, conditions): 

if conditions.moonPhase > self.illum_limit: 

result = ['g', 'r', 'i', 'z', 'y'] 

else: 

result = ['u', 'g', 'r', 'i', 'y'] 

return result