diff --git a/CHANGES.rst b/CHANGES.rst index e571f02403..00e88042b5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 ^^^^^ diff --git a/docs/heasarc/heasarc.rst b/docs/heasarc/heasarc.rst index aad7956939..9ba10f2bc2 100644 --- a/docs/heasarc/heasarc.rst +++ b/docs/heasarc/heasarc.rst @@ -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 `_. + +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 --------------------