Skip to content

Commit 390eecf

Browse files
committed
example usage of time range selection
1 parent f761d9e commit 390eecf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/heasarc/heasarc.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ coordinates:
5858
Note that the :meth:`~astroquery.heasarc.HeasarcClass.query_region` converts
5959
the passed coordinates to the FK5 reference frame before submitting the query.
6060

61+
It is also possible to select time range:
62+
63+
.. code-block:: python
64+
65+
>>> from astroquery.heasarc import Heasarc
66+
>>> heasarc = Heasarc()
67+
>>> table = heasarc.query_region('3C273', mission="numaster", radius='1 degree', time='2019-01-01 .. 2020-01-01')
68+
>>> table.pprint()
69+
NAME RA DEC TIME OBSID STATUS EXPOSURE_A OBSERVATION_MODE OBS_TYPE PROCESSING_DATE PUBLIC_DATE ISSUE_FLAG SEARCH_OFFSET_
70+
DEGREE DEGREE MJD S MJD MJD
71+
----- -------- ------ ---------------- ----------- -------- ---------- ---------------- -------- ---------------- ----------- ---------- ---------------------------------------------
72+
3C273 187.2473 2.0362 58666.3272 10502620002 ARCHIVED 49410 SCIENCE CAL 59054.3142 58677 0 2.077 (187.2779215031367,2.0523867628597445)
73+
6174
Modifying returned table columns
6275
--------------------------------
6376

@@ -216,6 +229,7 @@ tables listing most recent INTEGRAL data.
216229
mission='integral_rev3_scw',
217230
radius='361 degree',
218231
time="2021-02-01 .. 2030-12-01",
232+
sortvar='START_DATE',
219233
resultmax=100000
220234
)
221235
>>> table.pprint(max_lines=10)

0 commit comments

Comments
 (0)