Skip to content

Update heasarc.rst #3390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ heasarc
- Heasarc.locate_data returns empty rows with an error in the error_message column if there are
no data associated with that row rather than filtering it out. [#3275]
- Heasarc.locate_data changed to use POST request instead of GET to accomodate large requests. [#3356]
- maxrec in Heasarc.query_region maxes out on 1e5 regardless of how it is set. Use instead an ADQL query using the TOP parameter set to something larger than 1e5. [#3390]

imcce
^^^^^
Expand Down
18 changes: 17 additions & 1 deletion docs/heasarc/heasarc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,23 @@ for ``'box'`` and:
>>> Heasarc.query_region(catalog='xmmmaster', spatial='polygon',
polygon=[(226.2,10.6),(225.9,10.5),(225.8,10.2),(226.2,10.3)])

for ``'polygon'``.
for ``'polygon'``. For ``'all-sky'``:

.. doctest-skip::

>>> Heasarc.query_region(pos, spatial='all-sky', catalog='csc', maxrec=None)

though you may find that maxrec has a hard limit of 1e5 regardless of how you set it. See `issue #3387 tracker <https://github.com/astropy/astroquery/issues/3387>`_.

In this case one can do instead:

.. doctest-skip::

>>> # get a comma-separated list of the default columns in csc.
>>> columns = ', '.join(Heasarc._get_default_columns('csc'))
>>> # construct a query for all entries; use TOP with a large number greater than the server's 1e5 LIMIT
>>> query = f'SELECT TOP 9999999 {columns} FROM csc'
>>> Heasarc.query_tap(query).to_table()

List Catalog Columns
--------------------
Expand Down
Loading