/kowalski-searches

Search for transients using the kowalski database

Primary LanguagePythonMIT LicenseMIT

kowalski-searches

Search for transients using the kowalski database.

Required software

Python 3.6 or later version

Required packages

numpy
astropy
matplotlib
healpy
ligo.skymap (0.1.11, or any version that properly supports multi-resolution skymaps)

Query skymap

usage: query_skymap.py [-h] [--skymap SKYMAP_FILENAME] [--level LEVEL]
[--fov FOV] [--ra-center RA_CENTER [RA_CENTER ...]]
[--dec-center DEC_CENTER [DEC_CENTER ...]]
[--radius RADIUS] [--after-trigger AFTER_TRIGGER]
[--jd-trigger JD_TRIGGER] [--min-days MIN_DAYS]
[--max-days MAX_DAYS] [--ndethist NDETHIST_MIN]
[--slices SLICES] [--out OUT]

Query kowalski with cone searches within a LIGO/Virgo skymap contour.

optional arguments:
-h, --help show this help message and exit
--skymap SKYMAP_FILENAME Skymap filename
--level LEVEL Enclosed probability
--fov FOV Field of view of each cone (radius, in arcmin)
--ra-center RA_CENTER [RA_CENTER ...] Right ascension of the center (array, in degrees)
--dec-center DEC_CENTER [DEC_CENTER ...] Declination of the center (array, in degrees)
--radius RADIUS Search radius (min), by default radius = fov
--after-trigger AFTER_TRIGGER Query only alerts whose first detection occurred after a certain date. If this boolean value is True, then --jd-trigger must be given (default=True).
--jd-trigger JD_TRIGGER Julian Day of the trigger. If not given, it will be
read from the skymap header.
--min-days MIN_DAYS Minimum time (days) between the first and last alert
--max-days MAX_DAYS Maximum time (days) between the first and last alert
--within-days WITHIN_DAYS Maximum time (days) between the jd-trigger and the
first alert
--ndethist NDETHIST_MIN Minimum number of detections
--slices SLICES Number (integer) of slices in which the query will be devided
--out OUT Output filename
--ingest INGEST Use with caution! Ingest the candidates to the
scanning page on the GROWTH marshal
--ingest-program INGEST_PROGRAM Ingest the candidates to the scanning page of the
given GROWTH marshal program
--phi PHI Phi angle rotation of the skymap
--theta THETA Theta angle rotation of the skymap

example: python query_skymap.py --skymap LALInference.fits.gz --level 90 --slice 20 --min-days 0.02 --max-days 30. --within-days 2.0

Check skymap

WIP

Query CLU

usage: query_clu.py [-h] [--radius RADIUS] [--min-days MIN_DAYS]
[--max-days MAX_DAYS] [--min-dist MIN_DIST]
[--max-dist MAX_DIST] [--min-dec MIN_DEC]
[--slices SLICES]
Query kowalski with cone searces centred on CLU galaxies.

optional arguments:
-h, --help show this help message and exit
--radius RADIUS Search radius (arcmin)
--min-days MIN_DAYS Minimum time (days) between the first and last alert
--max-days MAX_DAYS Maximum time (days) between the first and last alert
--min-dist MIN_DIST Minimum distance(Mpc) of the CLU galaxies to explore
--max-dist MAX_DIST Maximum distance(Mpc) of the CLU galaxies to explore
--min-dec MIN_DEC Minimum declination (celestial, deg) of the CLU
galaxies to explore
--slices SLICES Number (integer) of slices in which the query will be
devided

Query FRB

usage: query_frb.py [-h] --cat CAT_NAME [--frb FRB_NAMES [FRB_NAMES ...]]
[--out OUT] [--out-lc OUT_LC] [--r SEARCH_RADIUS]
[--ndethist NDETHIST] [--p PLOT] [--um USE_METADATA]
[--sp SAVEPLOT] [--reject-neg REJECT_NEG]

Query kowalski with cone searces to find transients possibly associated
with FRBs reported in FRBCat(http://frbcat.org)
optional arguments:
-h, --help show this help message and exit
--cat CAT_NAME CSV file downloaded from the FRBcat page
--frb FRB_NAMES [FRB_NAMES ...]
Names of specific FRBs to check
--out OUT output JSON file name; example: results.json
--out-lc OUT_LC output CSV file name; example: lc.csv
--r SEARCH_RADIUS Cone search radius in arcmin (default=15)
--ndethist NDETHIST Minimum number of detections (default=2)
--p PLOT Plot the results? (boolean)
--um USE_METADATA Plot upper limits using ztfquery metadata (boolean)
--sp SAVEPLOT Save the plot of the results? (boolean)
--reject-neg REJECT_NEG
Reject candidates with negative detections? (boolean)

Plot volume

plot_volume.py is a snippet to plot the explored volume in a given time frame as the number of observed field is reduced.
Limitation: overheads are calculated only for field switch and there is no limit to the exptime on a given field.