Example #1
0
 def loadcfgfiles(self,maincfgfile,extracfgfiles=None,params=None,params4all=None,params4sections=None,requireParamExists=True):
     if self.cfg == None:
         self.cfg = yamlcfgclass()
     if self.cfg.loadcfgfiles(maincfgfile,extracfgfiles=extracfgfiles,
                              params=params,params4all=params4all,params4sections=params4sections,
                              requireParamExists=requireParamExists,verbose=self.verbose):
         raise RuntimeError,"Something went wrong when loading config files!"
     return(0)
Example #2
0
    def __init__(self):
        pdastroclass.__init__(self)

        self.lctype = None # can be 'avg' or 'single'

        # config file
        self.cfg = yamlcfgclass()

        # miscellaneous vars
        self.verbose = 0
        self.debug = False
        self.outrootdir = None
        self.filt = None
        self.api = False
        
        # tables
        self.lc = pdastrostatsclass(hexcols=['Mask'])
        self.RADECtable = pdastroclass()
        self.averagelc = pdastrostatsclass(hexcols=['Mask'])

        # FLAGS
        self.flag_c0_X2norm      = 0x1 
        self.flag_c0_uncertainty = 0x2
        self.flag_c0_X2norm_dynamic = 0x4
        
        self.flag_c1_X2norm      = 0x10
        self.flag_c1_absnormmean = 0x20
        
        self.flag_c2_X2norm      = 0x100
        self.flag_c2_absnormmean = 0x200
        self.flag_c2_Nclip       = 0x400
        self.flag_c2_Nused       = 0x800

        self.flag_daysigma       = 0x1000
        self.flag_daysmallnumber = 0x2000

        self.flag_c2_ok          = 0x80000

        self.flag_c0_bad         = 0x100000
        self.flag_c2_bad         = 0x400000
        self.flag_day_bad        = 0x800000

        self.flags={'flag_c0_uncertainty':self.flag_c0_uncertainty,
                    'flag_c0_X2norm':self.flag_c0_X2norm,
                    'flag_c1_X2norm':self.flag_c1_X2norm,
                    'flag_c1_absnormmean':self.flag_c1_absnormmean,
                    'flag_c2_X2norm':self.flag_c2_X2norm,
                    'flag_c2_absnormmean':self.flag_c2_absnormmean,
                    'flag_c2_Nclip':self.flag_c2_Nclip,
                    'flag_c2_Nused':self.flag_c2_Nused,
                    'flag_c2_ok':self.flag_c2_ok,
                    'flag_daysigma':self.flag_daysigma,
                    'flag_daysmallnumber':self.flag_daysmallnumber,
                    'flag_c0_bad':self.flag_c0_bad,
                    'flag_c2_bad':self.flag_c2_bad,
                    'flag_day_bad':self.flag_day_bad}
        
        self.flags_c1c2 = self.flag_c1_X2norm|self.flag_c1_absnormmean|self.flag_c2_X2norm|self.flag_c2_absnormmean|self.flag_c2_Nclip|self.flag_c2_Nused|self.flag_c2_bad|self.flag_c2_ok#|self.flag_c1_good|self.flag_c2_good
Example #3
0
    def __init__(self):
        SNloopclass.__init__(self)

        self.cfg = yamlcfgclass()
        self.debug = False
        self.outrootdir = None
        self.snlist = pdastroclass(columns=[
            'atlasdesignation', 'otherdesignation', 'ra', 'dec',
            'spectraltype', 'earliestmjd', 'tnsname', 'closebrightRA',
            'closebrightDec', 'MJDpreSN'
        ])
        self.snlistsurvey = pdastroclass(columns=[
            'atlasdesignation', 'otherdesignation', 'ra', 'dec',
            'spectraltype', 'earliestmjd', 'tnsname', 'closebrightRA',
            'closebrightDec', 'MJDpreSN'
        ])