3. Searching around a position
cone_search.py searches a 2° cone around
the Crab Nebula over the last 30 days. Each run is one search against your
quota.
python cone_search.py
Angles are decimal degrees or sexagesimal strings, and the unit is read from
the notation, never from the size of the number. These three calls search
the same position:
client.cone_search(ra=83.6331, dec=22.0145, radius=2, start=start, end=end)
client.cone_search(ra="05h34m31.94s", dec="+22d00m52.2s", radius=2, start=start, end=end)
client.cone_search(ra="05:34:31.94", dec="+22:00:52.2", radius=2, start=start, end=end)
A malformed or out-of-range angle raises
AstrocolibriConfigError before anything is sent, so it costs no
quota. Right ascension must lie within [0, 360), declination within [-90,
90] and the radius within (0, 180]. Hours are accepted for right ascension
only, and a bare "30m" right ascension is refused as ambiguous:
minutes of time, or of arc?
The time window applies to transients only. The catalog groups of the
result, "sources", "Xsources" and
"icecat", list every known source in the cone whatever its
date.
Searching a localization region. Gravitational waves,
Fermi/GBM and IPN bursts, IceCube neutrinos and MAXI transients are localized to
regions far from circular. contour_search.py searches inside the 90%
localization contour of the gravitational-wave event S230518h, widened by
1°, for the week after the merger:
event = client.get_event("S230518h")
merger = datetime.fromisoformat(event["time"]).replace(tzinfo=timezone.utc)
results = client.cone_search(
ra=event["ra"],
dec=event["dec"],
radius=15,
start=merger,
end=merger + timedelta(days=7),
contour_trigger_id="S230518h",
contour_margin=1.0,
)
print(results["search_region"]) # "contour_90", or "circle" if no contour is stored
If no contour is stored for the event, the API searches the circle instead.
That is not an error, so check "search_region" to know which
area was searched.