Skip to content

Commit

Permalink
add test for desy download
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonreusch committed May 6, 2023
1 parent 043aadd commit 74d9298
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_skymap_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,25 @@ def test_grb_scan(self):
true_gcn = "Astronomer Name (Institute of Somewhere), ............. report,\n\nOn behalf of the Zwicky Transient Facility (ZTF) and Global Relay of Observatories Watching Transients Happen (GROWTH) collaborations: \n\nAs part of the ZTF neutrino follow up program (Stein et al. 2022), we observed the localization region of the GRB210927A with the Palomar 48-inch telescope, equipped with the 47 square degree ZTF camera (Bellm et al. 2019, Graham et al. 2019). We started observations in the g- and r-band beginning at 2021-09-27 02:44 UTC, approximately 2.1 hours after event time. We covered 0.1% (1.0 sq deg) of the reported localization region. This estimate accounts for chip gaps. Each exposure was 30s with a typical depth of 20.5 mag. \n \nThe images were processed in real-time through the ZTF reduction and image subtraction pipelines at IPAC to search for potential counterparts (Masci et al. 2019). AMPEL (Nordin et al. 2019, Stein et al. 2021) was used to search the alerts database for candidates. We reject stellar sources (Tachibana and Miller 2018) and moving objects, and apply machine learning algorithms (Mahabal et al. 2019) , and removing candidates with history of variability prior to the merger time. We are left with the following high-significance transient candidates by our pipeline, all lying within the 90.0% localization of the skymap.\n\n+--------------------------------------------------------------------------------+\n| ZTF Name | IAU Name | RA (deg) | DEC (deg) | Filter | Mag | MagErr |\n+--------------------------------------------------------------------------------+\n| ZTF21acdvtxc | ------- | 250.2336698 | +05.3908972 | g | 21.80 | 0.21 | (MORE THAN ONE DAY SINCE SECOND DETECTION) \n| ZTF21acdvtxp | ------- | 250.4636648 | +01.8436867 | g | 21.33 | 0.18 | (MORE THAN ONE DAY SINCE SECOND DETECTION) \n| ZTF21acdvuzf | ------- | 241.8979602 | +19.0755373 | g | 20.82 | 0.17 | (MORE THAN ONE DAY SINCE SECOND DETECTION) \n+--------------------------------------------------------------------------------+\n\n \n\nAmongst our candidates, \n\nZTF21acdvtxc had upper limit problems. PLEASE FILL IN NUMBERS BY HAND!!! WISEA J164056.10+052327.1 ['UvS'-type source (0.03 arsec)]\nZTF21acdvtxp had upper limit problems. PLEASE FILL IN NUMBERS BY HAND!!! [MILLIQUAS: SDSS J164151.27+015037.0 - Likely QSO (prob = 95.0%) (0.21 arsec)]\nZTF21acdvuzf had upper limit problems. PLEASE FILL IN NUMBERS BY HAND!!! \n\n\nZTF and GROWTH are worldwide collaborations comprising Caltech, USA; IPAC, USA; WIS, Israel; OKC, Sweden; JSI/UMd, USA; DESY, Germany; TANGO, Taiwan; UW Milwaukee, USA; LANL, USA; TCD, Ireland; IN2P3, France.\n\nGROWTH acknowledges generous support of the NSF under PIRE Grant No 1545949.\nAlert distribution service provided by DIRAC@UW (Patterson et al. 2019).\nAlert database searches are done by AMPEL (Nordin et al. 2019).\nAlert filtering is performed with the nuztf (Stein et al. 2021, https://github.com/desy-multimessenger/nuztf).\n"

self.assertEqual(res, true_gcn)

def test_gw_scan_desy_download(self):
self.logger.info("\n\n Testing GW result download from DESY \n\n")

gw_name = "S200115j"
prob_threshold = 0.9

self.logger.info(f"Scanning with GW {gw_name}")

scanner = SkymapScanner(
event=gw_name,
prob_threshold=prob_threshold,
n_days=2,
)

scanner.download_results()

n_expected_candidates = 122

n_retrieved_candidates = len(scanner.final_candidates)

self.assertEqual(n_retrieved_candidates, n_expected_candidates)

0 comments on commit 74d9298

Please sign in to comment.