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""" 

2The class SNObj is a catalogDB class which can read a table of SALT2 

3parameters on the catsim database 

4""" 

5from .BaseCatalogModels import BaseCatalogObj 

6from lsst.sims.utils import ObservationMetaData 

7 

8__all__ = ['SNDBObj'] 

9 

10class SNDBObj(BaseCatalogObj): 

11 objid = 'TwinkUnlensedSN' 

12 # From now on the tableid should be specified in instantiating the class 

13 # table = 'TwinkSN' or 'TwinkSNKraken' 

14 idColKey = 'id' 

15 raColName = 'snra' 

16 decColName = 'sndec' 

17 objectTypeId = 42 

18 #Don't run test on base class 

19 doRunTest = False 

20 #default observation metadata 

21 testObservationMetaData = ObservationMetaData(boundType='circle', 

22 pointingRA=53.125, 

23 pointingDec=-27.9, 

24 boundLength=0.1, 

25 mjd=52000., 

26 bandpassName='r', 

27 m5=22.0) 

28 

29 dbDefaultValues = {'varsimobjid':-1, 'runid':-1, 'ismultiple':-1, 'run':-1, 

30 'runobjid':-1} 

31 

32 # These types should be matched to the database. 

33 #: Default map is float. If the column mapping is the same as the 

34 # column name, None can be specified 

35 

36 columns = [('raJ2000', 'snra*PI()/180.'), 

37 ('decJ2000', 'sndec*PI()/180.'), 

38 ('Tt0', 't0'), 

39 ('Tx0', 'x0'), 

40 ('Tx1', 'x1'), 

41 ('Tc', 'c'), 

42 ('Tsnid', 'id'), 

43 ('Tredshift', 'redshift'), 

44 ('Tgaltileid', 'galtileid') 

45 ]