alexandergagliano commited on
Commit
7627e0b
·
1 Parent(s): a55c4c3

Replace README with HF Space configuration

Browse files
Files changed (2) hide show
  1. README.md +36 -67
  2. README_HF.md +0 -50
README.md CHANGED
@@ -1,81 +1,50 @@
1
- [![Unit Tests](https://github.com/evan-reynolds/re-laiss/actions/workflows/ci.yml/badge.svg)](https://github.com/evan-reynolds/re-laiss/actions/workflows/ci.yml)
 
 
 
 
 
 
 
 
2
 
3
- <p align="center">
4
- <img src="https://github.com/evan-reynolds/re-laiss/blob/main/static/reLAISS_logo.png" style="width: 50%;" alt="reLAISS Logo">
5
- </p>
6
 
7
- <p align="center">
8
- <em>A flexible library for similarity searches of supernovae and their host galaxies.</em>
9
- </p>
10
 
11
- reLAISS lets you retrieve nearest‑neighbour supernovae (or spot outliers) by combining ZTF $g/r$ light‑curve morphology with Pan‑STARRS host‑galaxy colours. A pre‑built reference index allows users find similar events to a queried object in seconds. reLAISS is designed to be modular; feel free to customize for your own science!
12
 
13
- # Install
 
 
 
14
 
15
- Installation is easy: in a fresh conda environment, run `pip install relaiss`. If you want even faster performance, you can install both `ngt` and its python bindings from source; instructions can be found [here](https://github.com/yahoojapan/NGT/blob/main/README.md#Installation).
16
 
17
- # Code Demo
18
- ```
19
- import relaiss as rl
20
-
21
- client = rl.ReLAISS()
 
 
 
22
 
23
- # load reference data
24
- client.load_reference(
25
- path_to_sfd_folder='./sfddata-master', # Directory for SFD dust maps
26
- weight_lc=3, # Upweight lightcurve features for neighbor search
27
- )
28
 
29
- # Find the 5 closest matches to a ZTF transient
30
- neigh = client.find_neighbors(
31
- ztf_object_id='ZTF21abbzjeq', # Using the test transient
32
- n=5, # number of neighbors to retrieve
33
- plot=True, # plot and save figures
34
- save_figures=True,
35
- path_to_figure_directory='./figures'
36
- )
37
-
38
- # print closest neighbors and their distances
39
- print(neigh[["iau_name", "dist"]])
40
- ```
41
 
42
- # Citation
43
 
44
- If you use reLAISS for your research, please cite the following two works:
45
 
46
  ```
47
- @article{Reynolds_2025,
48
- doi = {10.3847/2515-5172/adef56},
49
- url = {https://dx.doi.org/10.3847/2515-5172/adef56},
50
- year = {2025},
51
- month = {jul},
52
- publisher = {The American Astronomical Society},
53
- volume = {9},
54
- number = {7},
55
- pages = {189},
56
- author = {Reynolds, E. and Gagliano, A. and Villar, V. A.},
57
- title = {reLAISS: A Python Package for Flexible Similarity Searches of Supernovae and Their Host Galaxies},
58
- journal = {Research Notes of the AAS},
59
- }
60
-
61
-
62
- @ARTICLE{2024ApJ...974..172A,
63
- author = {{Aleo}, P.~D. and {Engel}, A.~W. and {Narayan}, G. and {Angus}, C.~R. and {Malanchev}, K. and {Auchettl}, K. and {Baldassare}, V.~F. and {Berres}, A. and {de Boer}, T.~J.~L. and {Boyd}, B.~M. and {Chambers}, K.~C. and {Davis}, K.~W. and {Esquivel}, N. and {Farias}, D. and {Foley}, R.~J. and {Gagliano}, A. and {Gall}, C. and {Gao}, H. and {Gomez}, S. and {Grayling}, M. and {Jones}, D.~O. and {Lin}, C. -C. and {Magnier}, E.~A. and {Mandel}, K.~S. and {Matheson}, T. and {Raimundo}, S.~I. and {Shah}, V.~G. and {Soraisam}, M.~D. and {de Soto}, K.~M. and {Vicencio}, S. and {Villar}, V.~A. and {Wainscoat}, R.~J.},
64
- title = "{Anomaly Detection and Approximate Similarity Searches of Transients in Real-time Data Streams}",
65
- journal = {\apj},
66
- keywords = {Supernovae, Transient detection, Astronomical methods, Time domain astronomy, Time series analysis, Astrostatistics techniques, Classification, Light curves, Random Forests, 1668, 1957, 1043, 2109, 1916, 1886, 1907, 918, 1935, Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Instrumentation and Methods for Astrophysics},
67
- year = 2024,
68
- month = oct,
69
- volume = {974},
70
- number = {2},
71
- eid = {172},
72
- pages = {172},
73
- doi = {10.3847/1538-4357/ad6869},
74
- archivePrefix = {arXiv},
75
- eprint = {2404.01235},
76
- primaryClass = {astro-ph.HE},
77
- adsurl = {https://ui.adsabs.harvard.edu/abs/2024ApJ...974..172A},
78
- adsnote = {Provided by the SAO/NASA Astrophysics Data System}
79
- }
80
  ```
81
 
 
 
 
 
 
1
+ ---
2
+ title: reLAISS - Supernova Similarity Search
3
+ emoji: 🌟
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
 
11
+ # reLAISS: Supernova Similarity Search
 
 
12
 
13
+ Find similar supernovae using light curve and host galaxy features! This interactive tool uses the reLAISS (re-implementation of LAISS) algorithm to search through 25,000+ ZTF transients.
 
 
14
 
15
+ ## Features
16
 
17
+ - **Fast similarity search** using approximate nearest neighbors (NGT)
18
+ - **Flexible feature selection** - Choose from 25 light curve features and 18 host galaxy properties
19
+ - **Interactive visualizations** - Compare light curves and analyze features
20
+ - **Real-time data** - Fetches metadata from ANTARES and TNS APIs
21
 
22
+ ## Usage
23
 
24
+ 1. **Enter a ZTF Object ID** (e.g., `ZTF21abbzjeq`)
25
+ 2. **Select features** using the Quick Presets or customize your selection
26
+ 3. **Click Search** to find similar transients
27
+ 4. **Explore results** across multiple tabs:
28
+ - Summary: Overview cards for each match
29
+ - Light Curves: Visual comparison of photometry
30
+ - Feature Analysis: Detailed feature breakdown
31
+ - Host Galaxies: Host galaxy images and properties
32
 
33
+ ## Performance
 
 
 
 
34
 
35
+ - **First search**: ~90 seconds (one-time preprocessing + caching)
36
+ - **Subsequent searches**: ~3-5 seconds
37
+ - **Index rebuilds** (when changing features): ~10-15 seconds
 
 
 
 
 
 
 
 
 
38
 
39
+ ## Citation
40
 
41
+ If you use reLAISS in your research, please cite:
42
 
43
  ```
44
+ Reynolds et al. (2024) - reLAISS: A re-implementation of LAISS for transient similarity search
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  ```
46
 
47
+ ## Links
48
+
49
+ - [GitHub Repository](https://github.com/evan-reynolds/re-laiss/)
50
+ - [Original LAISS Paper](https://arxiv.org/abs/2109.01665)
README_HF.md DELETED
@@ -1,50 +0,0 @@
1
- ---
2
- title: reLAISS - Supernova Similarity Search
3
- emoji: 🌟
4
- colorFrom: blue
5
- colorTo: purple
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- # reLAISS: Supernova Similarity Search
12
-
13
- Find similar supernovae using light curve and host galaxy features! This interactive tool uses the reLAISS (re-implementation of LAISS) algorithm to search through 25,000+ ZTF transients.
14
-
15
- ## Features
16
-
17
- - **Fast similarity search** using approximate nearest neighbors (NGT)
18
- - **Flexible feature selection** - Choose from 25 light curve features and 18 host galaxy properties
19
- - **Interactive visualizations** - Compare light curves and analyze features
20
- - **Real-time data** - Fetches metadata from ANTARES and TNS APIs
21
-
22
- ## Usage
23
-
24
- 1. **Enter a ZTF Object ID** (e.g., `ZTF21abbzjeq`)
25
- 2. **Select features** using the Quick Presets or customize your selection
26
- 3. **Click Search** to find similar transients
27
- 4. **Explore results** across multiple tabs:
28
- - Summary: Overview cards for each match
29
- - Light Curves: Visual comparison of photometry
30
- - Feature Analysis: Detailed feature breakdown
31
- - Host Galaxies: Host galaxy images and properties
32
-
33
- ## Performance
34
-
35
- - **First search**: ~90 seconds (one-time preprocessing + caching)
36
- - **Subsequent searches**: ~3-5 seconds
37
- - **Index rebuilds** (when changing features): ~10-15 seconds
38
-
39
- ## Citation
40
-
41
- If you use reLAISS in your research, please cite:
42
-
43
- ```
44
- Reynolds et al. (2024) - reLAISS: A re-implementation of LAISS for transient similarity search
45
- ```
46
-
47
- ## Links
48
-
49
- - [GitHub Repository](https://github.com/evan-reynolds/re-laiss/)
50
- - [Original LAISS Paper](https://arxiv.org/abs/2109.01665)