Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. | ||||||||
Line: 19 to 19 | ||||||||
This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package (https://github.com/MatteoGiomi/extcats![]() | ||||||||
Added: | ||||||||
> > | from extcats import CatalogQuery #see https://github.com/MatteoGiomi/extcats![]() | |||||||
class AGNFilter(AbstractTransientFilter): """ |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations.AMPEL is processing alerts as they are made available at the UW Kafka server. Work so far has focused on implementing a set of sample T0 filters that will work as templates for specific science channels. A key feature of AMPEL is the ability to take user-defined actions for each transient, depending on the outcome of the filters. For this test, two such actions are implemented: relaying information on the accepted alerts to a Slack channel and uploading candidates to the TNS sandbox area. | ||||||||
Changed: | ||||||||
< < | In the following, a few templates filters are briefly described. For the sake of clarity, only the relevant parts of the code are shown. Complete and in depth description and explanation of the AMPEL filtering stage (the T0 pipeline tier) can be found at: https://github.com/AmpelProject/Ampel-T0-ref![]() | |||||||
> > | In the following, a few templates filters are briefly described. For the sake of clarity, only the relevant parts of the code are shown. Complete and in depth description and explanation of the AMPEL filtering stage (the T0 pipeline tier) can be found at: https://github.com/AmpelProject/Ampel-T0-ref![]() ![]() | |||||||
NOTE: as with any commissioning activity, this is still work in progress. More careful study is needed to tune the performance and science output of each of these filters. If anyone is interested in contributing to AMPEL, please get in touch! We need help developing filters, as well as modules for calculating science values. People to contact: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. | ||||||||
Line: 16 to 16 | ||||||||
Finding/rejecting AGNs: | ||||||||
Changed: | ||||||||
< < | This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package (https://github.com/AmpelProject/extcats![]() | |||||||
> > | This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package (https://github.com/MatteoGiomi/extcats![]() | |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. | ||||||||
Line: 7 to 7 | ||||||||
In the following, a few templates filters are briefly described. For the sake of clarity, only the relevant parts of the code are shown. Complete and in depth description and explanation of the AMPEL filtering stage (the T0 pipeline tier) can be found at: https://github.com/AmpelProject/Ampel-T0-ref![]() | ||||||||
Added: | ||||||||
> > | If anyone is interested in contributing to AMPEL, please get in touch! We need help developing filters, as well as modules for calculating science values. People to contact:
| |||||||
Finding/rejecting AGNs:This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package (https://github.com/AmpelProject/extcats![]() | ||||||||
Line: 254 to 261 | ||||||||
TDE Filter: | ||||||||
Changed: | ||||||||
< < | This filter combines photometry calculations with catalogue matching to search for TDE-like nuclear transients, similar to the TDE SEDm proposal. To minimise computational time, photometry cuts are firstly appplied to search for bright, highly-varying blue flares. We then check to make sure the flare is not coincident with a known AGN, (i.e the location is not listed in MQC). | |||||||
> > | This filter combines photometry calculations with catalogue matching to search for TDE-like nuclear transients, similar to the TDE SEDm proposal. To minimise computational time, photometry cuts are firstly appplied to search for bright, strongly-varying blue flares. We then check to make sure the flare is not coincident with a known AGN, (i.e the location is not listed in MQC). | |||||||
| ||||||||
Line: 330 to 337 | ||||||||
-- MatteoGiomi - 16 Feb 2018 -- JakobNordin - 16 Feb 2018 \ No newline at end of file | ||||||||
Added: | ||||||||
> > | -- RobertStein - 16 Feb 2018 |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. | ||||||||
Line: 9 to 9 | ||||||||
Finding/rejecting AGNs: | ||||||||
Changed: | ||||||||
< < | This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package, developed as part of the AMPEL project. | |||||||
> > | This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package (https://github.com/AmpelProject/extcats![]() | |||||||
class AGNFilter(AbstractTransientFilter): """ | ||||||||
Changed: | ||||||||
< < | Requires match with the million quasar catalog. | |||||||
> > | Accept a transient if coincident with an AGN. | |||||||
""" .... def __init__(self): | ||||||||
Changed: | ||||||||
< < | self.logger.info("Initiliazing AGN filter") | |||||||
> > | self.logger.info("Initiliazing AGNFilter") | |||||||
self.mqc_query = CatalogQuery('milliquas', ra_key = 'ra', dec_key = 'dec') # connect to the MQC database ..... | ||||||||
Line: 49 to 48 | ||||||||
mean_ra, mean_dec = np.mean(ras), np.mean(decs) # check the MQC | ||||||||
Changed: | ||||||||
< < | if not self.mqc_query.binaryserach( #this method return True if at least one counterpart is found around target | |||||||
> > | if self.mqc_query.binaryserach( #this method return True if at least one counterpart is found around target | |||||||
mean_ra, mean_dec, self.search_radius_arcsec, method = self.search_method): return self.on_match_default_flags else: | ||||||||
Line: 57 to 56 | ||||||||
Changed: | ||||||||
< < | The parameters (search radius and search method) are assigned to the filter by the mandatory set_filter_parameters method. The apply method process the alert and it is where the logic of the filter is specified. In this case, an alert is rejected if a counterpart in the MQC is found within the search radius. | |||||||
> > | The parameters (search radius and search method) are assigned to the filter by the mandatory set_filter_parameters method. Parameter values can either be assigned through a dictionary, or via a config file. The apply method process the alert and it is where the logic of the filter is specified. In this case, an alert is accepted if a counterpart in the MQC is found within the search radius. | |||||||
New transient sources | ||||||||
Changed: | ||||||||
< < | This filters looks for transient which have been detected twice in a short period of time. The | |||||||
> > | This filters looks for transient which have been detected twice in a short period of time. A preliminary cut on realbogus value, minimum number of detections, and star/galaxy score is applied. | |||||||
| ||||||||
Changed: | ||||||||
< < | class AtLeast2withinNightFilter(AbstractTransientFilter): | |||||||
> > | class NewTransients(AbstractTransientFilter): | |||||||
""" | ||||||||
Changed: | ||||||||
< < | Requires no bogus no star, two alerts for the same transient within a short time range. Push stuff to TNS and message to Slack. | |||||||
> > | Requires no bogus, no star, two alerts for the same transient within a short time range. Push to TNS and message to Slack. | |||||||
""" ... def __init__(self): | ||||||||
Changed: | ||||||||
< < | self.logger.info("Initiliazing AtLeast2withinNightFilter filter") | |||||||
> > | self.logger.info("Initiliazing NewTransients filter") | |||||||
... | ||||||||
Line: 89 to 88 | ||||||||
self.rb_cut_latest = d['rb_cut'] self.sgscore_cut = d['sgscore_cut'] | ||||||||
Changed: | ||||||||
< < | # youngness th | |||||||
> > | # minimum time difference between most recent alerts | |||||||
self.latest_2pt_within = d['latest_2pt_within'] | ||||||||
Changed: | ||||||||
< < | # min det above RB | |||||||
> > | # min number of detection above RB | |||||||
self.min_ndet = d['min_det'] | ||||||||
Changed: | ||||||||
< < | # how to comunicate with slak / TNS | |||||||
> > | # communicate with slack / TNS | |||||||
if not d['slackchannel'] is None: self.sc = SlackClient(botapi_ztfmsip) | ||||||||
Changed: | ||||||||
< < | self.slackchannel = d['slackchannel'] # should be "#bottest" | |||||||
> > | self.slackchannel = d['slackchannel'] | |||||||
else: self.slackchannel = None self.atreport = d['send_atreport'] | ||||||||
Line: 119 to 118 | ||||||||
if (latest_pp['sgscore'] is None) or latest_pp['sgscore'] > self.sgscore_cut: return None | ||||||||
Changed: | ||||||||
< < | # get JD of all the points above rb cut | |||||||
> > | # get JD of all the points passing RB cut | |||||||
jds = sorted( ampel_alert.get_values( 'jd', filters={'rb': self.rb_cut, 'op': '>'}) ) | ||||||||
Line: 140 to 139 | ||||||||
Using WISE vs. PanSTARRS photometry to reject Brown dwarfs | ||||||||
Changed: | ||||||||
< < | This filter implements a more complex logic, and relies on both PS1 photometry (provided in the alert by the ML working group) and WISE infrared colors to further reduce the number of stars by eliminating alerts associated with flares from M-dwarfs. Such objects can in fact produce rapid transients that could be misinterpreted as extragalactic transients. In http://adsabs.harvard.edu/abs/2017arXiv171200949H![]() | |||||||
> > | This filter implements a more complex logic, and relies on both PS1 photometry (provided in the alert by the ML working group) and WISE infrared colors to further reduce the number of stars by eliminating alerts associated with flares from M-dwarfs. Such objects can in fact produce rapid transients that could be misinterpreted as extragalactic. In http://adsabs.harvard.edu/abs/2017arXiv171200949H![]() | |||||||
see: http://irsa.ipac.caltech.edu/data/download/wise-allwise/![]()
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | * if none is found we have no information to reject the alert and it is therefore accepted. * else, its M-dwarf-likeness is computed and the alert is accepted accordingly. | |||||||
> > | * if none is found, we have no reason to reject the alert so it is therefore accepted. * else, its M-dwarf-likeness (based on the IR/optical colors) is computed and a cut is applied. | |||||||
| ||||||||
Changed: | ||||||||
< < | class MasterFilter(AbstractTransientFilter): | |||||||
> > | class MdwarfFilter(AbstractTransientFilter): | |||||||
""" Requires 2 detections, no bogus, no star, reject AGNs, and M-dwarfs comparing the PS1 and WISE colors. | ||||||||
Line: 163 to 162 | ||||||||
def __init__(self): | ||||||||
Added: | ||||||||
> > | self.logger.info("Initiliazing MdwarfFilter") | |||||||
# connect to the databases of the external catalogs self.mqc_query = CatalogQuery( 'milliquas', ra_key = 'ra', dec_key = 'dec') | ||||||||
Line: 186 to 186 | ||||||||
self.allwise_rs_arcsec = d['allwise_rs_arcsec'] self.allwise_search_method = d['allwise_search_method'] | ||||||||
Changed: | ||||||||
< < | # infrared-optical color cut for M-dwarfs (pseudo code here!! TODO) | |||||||
> > | # infrared-optical color cut for M-dwarfs | |||||||
self.w1_minus_PS1i_cut = d['w1_minus_PS1i_cut'] | ||||||||
Line: 217 to 217 | ||||||||
if all( [ (ps1c is None) for ps1c in ps1_mags] ): pass # if you don't return None, the candidate will be accepted at a certain point. | ||||||||
Changed: | ||||||||
< < | else: # here we have PS1 info # if the ML say it's a galaxy there are three options: | |||||||
> > | else: # if the sg_score say it's a galaxy there are three options: | |||||||
# a) it is a misclassified star # b) it is an AGN | ||||||||
Changed: | ||||||||
< < | # c) none of the above, it's interesting for us. # we first check with the AGN catalog which is smaller and hence faster | |||||||
> > | # c) none of the above, this filter thinks it's interesting. | |||||||
# compute average ra/dec for the alert ras, decs = np.array(ampel_alert.get_values('ra')), np.array(ampel_alert.get_values('dec')) | ||||||||
Line: 249 to 247 | ||||||||
# congratulations, you made it! return self.on_match_default_flags | ||||||||
Added: | ||||||||
> > |
TDE Filter:This filter combines photometry calculations with catalogue matching to search for TDE-like nuclear transients, similar to the TDE SEDm proposal. To minimise computational time, photometry cuts are firstly appplied to search for bright, highly-varying blue flares. We then check to make sure the flare is not coincident with a known AGN, (i.e the location is not listed in MQC).class TDEFilter(AbstractTransientFilter): """ """ ... def __init__(self): self.logger.info("Initiliazing TDEFilter") self.mqc_query = mqc_query = CatalogQuery( 'milliquas', ra_key = 'ra', dec_key = 'dec') def set_filter_parameters(self, d): # realbogus and star galaxy cut self.rb_cut = d['rb_cut'] self.sgscore_cut = d['sgscore_cut'] # cuts on photometry self.mag_threshold = d['mag_threshold'] self.delta_mag_threshold = d['delta_mag_threshold'] self.color_gr_threshold = d['color_gr_threshold'] # cuts on AGN matching self.search_radius_arcsec = d['rs_arcsec'] self.search_method = d['search_method'] def apply(self, ampel_alert): """ To exclude the alert, return *None* To accept it, either * return self.on_match_default_flags * return a custom combination of T2RunnableIds """ # get lightcurve points and stats lc = np.array(ampel_alert.get_values("mag")) max_mag, min_mag = lc.min(), lc.max() delta_mag = min_mag - max_mag # skim out faint sources if max_mag > self.mag_threshold: return None # retain strongly varying sources if delta_mag < self.delta_mag_threshold: return None # now check the color r_lc = np.array(ampel_alert.get_values("mag", filters={'filter_id': 1, 'op': '='})) g_lc = np.array(ampel_alert.get_values("mag", filters={'filter_id': 0, 'op': '='})) if len(g_lc)==0 or len(r_lc)==0: return None else: max_mag_r, max_mag_g = np.min(r_lc), np.min(g_lc) if max_mag_g - max_mag_r < self.color_gr_threshold: return None # finally query catalog for CP in the million quasar catalog ras, decs = np.array(ampel_alert.get_values('ra')), np.array(ampel_alert.get_values('dec')) mean_ra, mean_dec = np.mean(ras), np.mean(decs) if self.mqc_query.binaryserach(mean_ra, mean_dec, self.search_radius_arcsec, method = self.search_method): return None # congratulations you made it! return self.on_match_default_flags | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMPEL operating on ZTF commissioning observations. | ||||||||
Changed: | ||||||||
< < | AMPEL is ingesting alerts as they are made available at the UW Kafka server. Work so far has focused on implementing a set of sample T0 filters that will work as templates for specific science channels. | |||||||
> > | AMPEL is processing alerts as they are made available at the UW Kafka server. Work so far has focused on implementing a set of sample T0 filters that will work as templates for specific science channels. A key feature of AMPEL is the ability to take user-defined actions for each transient, depending on the outcome of the filters. For this test, two such actions are implemented: relaying information on the accepted alerts to a Slack channel and uploading candidates to the TNS sandbox area. | |||||||
Changed: | ||||||||
< < | Using WISE photometry to reject Brown dwarfs | |||||||
> > | In the following, a few templates filters are briefly described. For the sake of clarity, only the relevant parts of the code are shown. Complete and in depth description and explanation of the AMPEL filtering stage (the T0 pipeline tier) can be found at: https://github.com/AmpelProject/Ampel-T0-ref![]() | |||||||
Added: | ||||||||
> > | Finding/rejecting AGNs: | |||||||
Changed: | ||||||||
< < | Finding/rejecting AGNs through the XXX catalog | |||||||
> > | This very simple filter checks for possible AGN counterparts around the average position of the alert. For this preliminary implementation, only the Million Quasar Catalog (MQC, http://quasars.org/milliquas.htm![]() ![]() extcats package, developed as part of the AMPEL project. | |||||||
Added: | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | New transient sources | |||||||
> > | class AGNFilter(AbstractTransientFilter): """ Requires match with the million quasar catalog. """ | |||||||
Added: | ||||||||
> > | .... | |||||||
Added: | ||||||||
> > | def __init__(self): | |||||||
Added: | ||||||||
> > | self.logger.info("Initiliazing AGN filter") self.mqc_query = CatalogQuery('milliquas', ra_key = 'ra', dec_key = 'dec') # connect to the MQC database | |||||||
Added: | ||||||||
> > | ..... | |||||||
Added: | ||||||||
> > | def set_filter_parameters(self, d):
"""
set parameters for the filter
"""
self.search_radius_arcsec = d['rs_arcsec']
self.search_method = d['search_method']
def apply(self, ampel_alert):
"""
To exclude the alert, return None
To accept it, either
set_filter_parameters method. The apply method process the alert and it is where the logic of the filter is specified. In this case, an alert is rejected if a counterpart in the MQC is found within the search radius.
New transient sourcesThis filters looks for transient which have been detected twice in a short period of time. Theclass AtLeast2withinNightFilter(AbstractTransientFilter): """ Requires no bogus no star, two alerts for the same transient within a short time range. Push stuff to TNS and message to Slack. """ ... def __init__(self): self.logger.info("Initiliazing AtLeast2withinNightFilter filter") ... def set_filter_parameters(self, d): """ set parameters for the filter """ # realbogus and star galaxy cut self.rb_cut_latest = d['rb_cut'] self.sgscore_cut = d['sgscore_cut'] # youngness th self.latest_2pt_within = d['latest_2pt_within'] # min det above RB self.min_ndet = d['min_det'] # how to comunicate with slak / TNS if not d['slackchannel'] is None: self.sc = SlackClient(botapi_ztfmsip) self.slackchannel = d['slackchannel'] # should be "#bottest" else: self.slackchannel = None self.atreport = d['send_atreport'] def apply(self, ampel_alert): """ To exclude the alert, return *None* To accept it, either * return self.on_match_default_flags * return a custom combination of T2RunnableIds """ # apply SG and RB cut on latest detection latest_pp = ampel_alert.get_photopoints()[0] if latest_pp['rb'] < self.rb_cut: return None if (latest_pp['sgscore'] is None) or latest_pp['sgscore'] > self.sgscore_cut: return None # get JD of all the points above rb cut jds = sorted( ampel_alert.get_values( 'jd', filters={'rb': self.rb_cut, 'op': '>'}) ) # check for minimum number of detections if len(jds) < self.min_ndet: return None # now check time difference between last and previous detection latest_jd, previous_jd = jds[-1], jds[-2] if ( latest_jd - previous_jd ) > self.latest_2pt_within: return None # congratulations you made it! return self.on_match_default_flags Using WISE vs. PanSTARRS photometry to reject Brown dwarfsThis filter implements a more complex logic, and relies on both PS1 photometry (provided in the alert by the ML working group) and WISE infrared colors to further reduce the number of stars by eliminating alerts associated with flares from M-dwarfs. Such objects can in fact produce rapid transients that could be misinterpreted as extragalactic transients. In http://adsabs.harvard.edu/abs/2017arXiv171200949H![]() ![]()
class MasterFilter(AbstractTransientFilter): """ Requires 2 detections, no bogus, no star, reject AGNs, and M-dwarfs comparing the PS1 and WISE colors. """ ... def __init__(self): # connect to the databases of the external catalogs self.mqc_query = CatalogQuery.CatalogQuery( 'milliquas', ra_key = 'ra', dec_key = 'dec') self.wise_query = CatalogQuery.CatalogQuery( 'wise', ra_key = 'ra', dec_key = 'dec') ... def set_filter_parameters(self, d): # realbogus and star galaxy cut self.rb_cut = d['rb_cut'] self.sgscore_cut = d['sgscore_cut'] # min det above RB self.min_ndet = d['min_det'] # catalog query parameters self.milliquas_rs_arcsec = d['milliquas_rs_arcsec'] self.milliquas_search_method = d['milliquas_search_method'] self.allwise_rs_arcsec = d['allwise_rs_arcsec'] self.allwise_search_method = d['allwise_search_method'] # infrared-optical color cut for M-dwarfs (pseudo code here!! TODO) self.w1_minus_PS1i_cut = d['w1_minus_PS1i_cut'] def apply(self, ampel_alert): """ To exclude the alert, return *None* To accept it, either * return self.on_match_default_flags * return a custom combination of T2RunnableIds """ # apply SG and RB cut on latest detection latest_pp = ampel_alert.get_photopoints()[0] if latest_pp['rb'] < self.rb_cut: return None if (latest_pp['sgscore'] is None) or latest_pp['sgscore'] > self.sgscore_cut: return None # minimum number of detections lc = np.array(ampel_alert.get_values("mag")) if len(lc) < self.min_ndet: return None # check for PS1 colors. ps1_mags = [latest_pp['s%smag'%ps1_band] for ps1_band in ['r', 'g', 'z', 'i']] # if there are no PS1 counterparts it can not to be a star, so we take it if all( [ (ps1c is None) for ps1c in ps1_mags] ): pass # if you don't return None, the candidate will be accepted at a certain point. else: # here we have PS1 info # if the ML say it's a galaxy there are three options: # a) it is a misclassified star # b) it is an AGN # c) none of the above, it's interesting for us. # we first check with the AGN catalog which is smaller and hence faster # compute average ra/dec for the alert ras, decs = np.array(ampel_alert.get_values('ra')), np.array(ampel_alert.get_values('dec')) mean_ra, mean_dec = np.mean(ras), np.mean(decs) # match with AGN if self.mqc_query.binaryserach( mean_ra, mean_dec, self.milliquas_rs_arcsec, method = self.milliquas_search_method): return None # check if you find wise cp wise_cp, wise_cp_dist = self.wise_query.findclosest( mean_ra, mean_dec, self.allwise_rs_arcsec, method = self.allwise_search_method) # if there aren't take the alert. There are no reason why not. if wise_cp is None: return self.on_match_default_flags # if there is, check infrared-optical colors if (wise_cp['w1mpro']-latest_pp['simag']) > self.w1_minus_PS1i_cut: return None # congratulations, you made it! return self.on_match_default_flags-- MatteoGiomi - 16 Feb 2018 | |||||||
-- JakobNordin - 16 Feb 2018 \ No newline at end of file |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
AMPEL operating on ZTF commissioning observations.AMPEL is ingesting alerts as they are made available at the UW Kafka server. Work so far has focused on implementing a set of sample T0 filters that will work as templates for specific science channels.Using WISE photometry to reject Brown dwarfsFinding/rejecting AGNs through the XXX catalogNew transient sources-- JakobNordin - 16 Feb 2018 |