Ejemplo n.º 1
0
# whether to report photozs to TNS and skyportal
report_photoz_TNS = False
report_photoz_skyportal = False

# add redshift to Simbad query
customSimbad = Simbad()
customSimbad.add_votable_fields('z_value')
customSimbad.add_votable_fields('rv_value')
customSimbad.add_votable_fields('rvz_type')
customSimbad.add_votable_fields('rvz_error')
customSimbad.add_votable_fields('rvz_qual')
customSimbad.TIMEOUT = 5 # 5 seconds

# timeout for Ned
customNed = Ned()
customNed.TIMEOUT = 5

class alerce_tns(Alerce):
    'module to interact with alerce api to send TNS report'
    
    def __init__(self, **kwargs):
        
        super().__init__(**kwargs)

        ## fix API address
        #my_config = {
        #    "ZTF_API_URL": "https://dev.api.alerce.online"
        #}
        #self.load_config_from_object(my_config)
        tns_credentials_file = "tns_credentials.json"
        with open(tns_credentials_file) as jsonfile: