antares-devkit 0.8.2__tar.gz → 0.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/PKG-INFO +1 -1
  2. antares_devkit-0.9.1/antares_devkit/filters/passta_nearby_transients/__init__.py +71 -0
  3. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/young_rubin_transients_soraisam/__init__.py +10 -13
  4. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/utils.py +1 -0
  5. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/pyproject.toml +1 -1
  6. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/LICENSE.txt +0 -0
  7. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/README.md +0 -0
  8. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/__init__.py +0 -0
  9. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/bad_detection/__init__.py +0 -0
  10. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/bad_seeing/__init__.py +0 -0
  11. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/crash_filter/__init__.py +0 -0
  12. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/decam_shadow/__init__.py +0 -0
  13. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/desi_target/__init__.py +0 -0
  14. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/dwarf_nova_outburst/__init__.py +0 -0
  15. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/ecl_transient_1/__init__.py +0 -0
  16. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/ecl_transient_2/__init__.py +0 -0
  17. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/extragalactic/__init__.py +0 -0
  18. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/highamp/__init__.py +0 -0
  19. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/highfluxchange/__init__.py +0 -0
  20. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/highsnr/__init__.py +0 -0
  21. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/if_anomaly_detection/__init__.py +0 -0
  22. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/if_anomaly_detection/data/__init__.py +0 -0
  23. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/if_anomaly_detection/data/paleo2_106IFmodel_472727objs_nest=1000_cont=0.001_transf.pkl +0 -0
  24. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/imbh/__init__.py +0 -0
  25. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/inm31/__init__.py +0 -0
  26. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/laiss_rfc_ad_filter/__init__.py +0 -0
  27. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/laiss_rfc_ad_filter/data/__init__.py +0 -0
  28. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/laiss_rfc_ad_filter/data/cls=binary_n_estimators=100_max_depth=35_rs=11_max_feats=35_cw=balanced.pkl +0 -0
  29. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/lantern/__init__.py +0 -0
  30. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/lantern/data/__init__.py +0 -0
  31. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/lantern/data/lantern_xgboost_t2.0.7.pkl +0 -0
  32. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/lsst_ddf/__init__.py +0 -0
  33. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/lsst_transient_quality_scimma/__init__.py +0 -0
  34. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/malanchev_anomaly_transient_dmdt/__init__.py +0 -0
  35. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/malanchev_anomaly_transient_dmdt/data/__init__.py +0 -0
  36. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/malanchev_anomaly_transient_dmdt/data/malanchev_ssiforest_v1.pickle +0 -0
  37. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/malanchev_features_v1/__init__.py +0 -0
  38. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/microlensing/__init__.py +0 -0
  39. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/novtest/__init__.py +0 -0
  40. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/nuclear_transient/__init__.py +0 -0
  41. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/nuttela_tao/__init__.py +0 -0
  42. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/persistent_dimmers/__init__.py +0 -0
  43. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/random_tagger_filter/__init__.py +0 -0
  44. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/recent_reddening/__init__.py +0 -0
  45. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/refitt_newsources_snrcut/__init__.py +0 -0
  46. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/rubin_NovTest_soraisam/__init__.py +0 -0
  47. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/sample_filter/__init__.py +0 -0
  48. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/shadow_virgo/__init__.py +0 -0
  49. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/siena_mag_coord_cut/__init__.py +0 -0
  50. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/sso/__init__.py +0 -0
  51. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/sub_lum/__init__.py +0 -0
  52. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/superphot_plus_v1/__init__.py +0 -0
  53. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/superphot_plus_ztf_v3/__init__.py +0 -0
  54. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/test_dev_all/__init__.py +0 -0
  55. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/test_dev_lsst/__init__.py +0 -0
  56. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/test_dev_ztf/__init__.py +0 -0
  57. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/uniform_random_sample/__init__.py +0 -0
  58. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/vpdf/__init__.py +0 -0
  59. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/vpdf/data/__init__.py +0 -0
  60. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/vpdf/data/matheson_percent_grid_v1 +0 -0
  61. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/filters/young_extragalactic_candidate/__init__.py +0 -0
  62. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/antares_devkit/models.py +0 -0
  63. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/Dockerfile +0 -0
  64. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/__init__.py +0 -0
  65. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/conftest.py +0 -0
  66. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/data/large_locus.py +0 -0
  67. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/data/small_locus.py +0 -0
  68. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/unit/antares_devkit/filters/test_test_dev_all.py +0 -0
  69. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/unit/antares_devkit/filters/test_test_dev_lsst.py +0 -0
  70. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/unit/antares_devkit/filters/test_test_dev_ztf.py +0 -0
  71. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/unit/antares_devkit/test_models.py +0 -0
  72. {antares_devkit-0.8.2 → antares_devkit-0.9.1}/test/unit/test_filters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antares-devkit
3
- Version: 0.8.2
3
+ Version: 0.9.1
4
4
  Summary: Provides tools and utility methods to write and debug ANTARES filters with Python.
5
5
  Keywords: antares,devkit,filter development
6
6
  Author-Email: NSF NOIRLab ANTARES Team <antares@noirlab.edu>
@@ -0,0 +1,71 @@
1
+ """Description
2
+ This filter finds loci associated with galaxies within z<0.02 in NED or sdss_gals catalogs
3
+ """
4
+ from antares_devkit.models import BaseFilter
5
+
6
+
7
+
8
+ class InPasstaNearbyTransients(BaseFilter):
9
+ NAME = 'in_passta_nearby_transients' #for this default filter, name is same as its tag
10
+
11
+ SLACK_CHANNEL = "#filter-in-passta-nearby-transients"
12
+
13
+ ## bare absolute minimum alert properties proving it's good to go
14
+ REQUIRED_ALERT_PROPERTIES = [
15
+ 'ant_survey'
16
+ ]
17
+
18
+ OUTPUT_TAGS = [
19
+ {
20
+ 'name': 'in_passta_nearby_transients',
21
+ 'description': 'Locus is associated with a galaxy in the NED or sdss_gals catalogs with z<0.02',
22
+ }
23
+ ]
24
+
25
+ def _run(self, locus):
26
+
27
+ #Exit if the alert is an upper limit
28
+ if locus.alert.properties['ant_survey'] == 2: #be sure we don't work with upper limits
29
+ return
30
+
31
+ #Exit if the alert has a solar system object ID associated with it
32
+ if locus.alert.properties['ant_survey'] == 4:
33
+ if (locus.alert.properties['lsst_diaSource_ssObjectId'] != 0) is True:
34
+ return
35
+ elif locus.alert.properties['ant_survey'] == 1:
36
+ if locus.alert.properties['ztf_ssnamenr'] != 'null':
37
+ return
38
+
39
+ matching_catalog_names = locus.catalogs
40
+
41
+ galaxy_crossmatch_cats = ['ned',
42
+ 'sdss_gals'
43
+ ]
44
+
45
+ #Exit if the locus isn't crossmatched with ned or sdss_gals
46
+ if not (set(matching_catalog_names) & set(galaxy_crossmatch_cats)):
47
+ return
48
+
49
+ # Exit if the locus is cross-matched with a variable star catalog
50
+ varstar_cats = [
51
+ "gaia_dr3_variability",
52
+ "asassn_variable_catalog_v2_20190802",
53
+ "asassn_variable_catalog",
54
+ ]
55
+
56
+ if set(matching_catalog_names) & set(varstar_cats):
57
+ return
58
+
59
+ if 'ned' in matching_catalog_names:
60
+ for ned_gal in locus.catalog_objects['ned']:
61
+ if ned_gal['Redshift_1'] is not None:
62
+ if ned_gal['Redshift_1']<0.02:
63
+ locus.tag('in_passta_nearby_transients')
64
+ return
65
+ if 'sdss_gals' in matching_catalog_names:
66
+ for sdss_gal in locus.catalog_objects['sdss_gals']:
67
+ if sdss_gal['z'] is not None:
68
+ if sdss_gal['z'] > -9000:
69
+ if sdss_gal['z']<0.02:
70
+ locus.tag('in_passta_nearby_transients')
71
+ return
@@ -74,19 +74,17 @@ class young_rubin_transients_soraisam(BaseFilter):
74
74
  if 'lsst' in locus.properties['survey'].keys():
75
75
  if len(locus.properties['survey']['lsst']['dia_object_id']) > 1:
76
76
  C0 = True
77
- # print ("C0", C0)
78
77
  if C0:
79
78
  return
79
+
80
80
 
81
81
 
82
- C1 = (locus.alert.properties['lsst_diaSource_reliability'] < 0.8)
83
- # print ("C1", C1, locus.alert.properties['lsst_diaSource_reliability'])
82
+ C1 = (locus.alert.properties['lsst_diaSource_reliability'] < 0.6)
84
83
  if C1:
85
84
  return
86
-
85
+
87
86
 
88
87
  C2 = (locus.alert.properties['lsst_diaSource_ssObjectId'] != 0)
89
- # print ("C2", C2)
90
88
  if C2:
91
89
  return
92
90
 
@@ -100,19 +98,17 @@ class young_rubin_transients_soraisam(BaseFilter):
100
98
  C3 = True
101
99
  astro_objects = locus.catalog_objects
102
100
  matching_catalog_names = astro_objects.keys()
103
- ps_cats = [
104
- "bright_guide_star_cat", ## Classification = 0 star
105
- #"gaia_dr3_gaia_source",
106
- "sdss_stars", ## type = 6 star
107
- "2mass_psc",
108
- ]
109
101
  if "2mass_psc" in matching_catalog_names:
110
102
  C3 = False
111
103
  elif "bright_guide_star_cat" in matching_catalog_names and astro_objects['bright_guide_star_cat'][0]['classification']==0:
112
104
  C3 = False
113
105
  elif "sdss_stars" in matching_catalog_names and astro_objects['sdss_stars'][0]['type']==6:
114
106
  C3 = False
115
- # print ("C3", C3)
107
+ elif "gaia_dr3_gaia_source" in matching_catalog_names and \
108
+ astro_objects['gaia_dr3_gaia_source'][0]['classprob_dsc_combmod_quasar'] is not None and \
109
+ astro_objects['gaia_dr3_gaia_source'][0]['classprob_dsc_combmod_star'] is not None and \
110
+ (astro_objects['gaia_dr3_gaia_source'][0]['classprob_dsc_combmod_quasar']+astro_objects['gaia_dr3_gaia_source'][0]['classprob_dsc_combmod_star']>0.9):
111
+ C3 = False
116
112
  if not C3:
117
113
  return
118
114
 
@@ -171,5 +167,6 @@ class young_rubin_transients_soraisam(BaseFilter):
171
167
  locus.tag("young_rubin_transients")
172
168
 
173
169
  msg = f"Young extragalactic transient: triggering alert={alert_id} for locus <{antares_environment}/loci/{ant_id}|{ant_id}> {known_to_tns}, RA={ra_str} DEC={dec_str}, {current_pb}_mag={current_mag:.2f}, #dets in LSST={len(TS_lsst)}, UTC={current.iso}"
174
- if current_mag < 22.0:
170
+ if current_mag < 23.0:
175
171
  self.send_message_to_slack(msg)
172
+
@@ -26,6 +26,7 @@ def get_filters_path():
26
26
  "In_LSSTDDF": "antares_devkit.filters.lsst_ddf", # ["astropy", "numpy"]
27
27
  "InDecamShadow": "antares_devkit.filters.decam_shadow", # ["astropy", "numpy"]
28
28
  "InM31": "antares_devkit.filters.inm31",
29
+ "InPasstaNearbyTransients": "antares_devkit.filters.passta_nearby_transients",
29
30
  "LAISS_RFC_AD_filter": "antares_devkit.filters.laiss_rfc_ad_filter", # ["astropy", "timeout_decorator", "alerce", "numpy", "pandas", "matplotlib", "astro_ghost", "sklearn", "scipy"]
30
31
  "AnomalyTransientDmDt": "antares_devkit.filters.malanchev_anomaly_transient_dmdt", # ["numpy", "astropy", "light_curve"]
31
32
  "Features": "antares_devkit.filters.malanchev_features_v1", # ["numpy", "astropy", "light_curve"]
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "antares-devkit"
9
- version = "0.8.2"
9
+ version = "0.9.1"
10
10
  description = "Provides tools and utility methods to write and debug ANTARES filters with Python."
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.9"
File without changes