Skip to content
Draft
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
26 changes: 26 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,32 @@ vizier

- Methods ``get_catalog``, ``get_catalog_async`` and ``query_*`` now always return UCD1+ instead of UCD1. [#3458]

fermi
^^^^^

- The module now uses the new Fermi LAT Data Query REST API
(``https://fermi.gsfc.nasa.gov/ssc/data/access/lat/query/api/v1``), which is replacing the
``LATDataQuery.cgi`` endpoint whose HTML responses were previously scraped
with regular expressions. The user-facing ``FermiLAT.query_object()``
signature is unchanged. [#3647]
- ``FermiLAT.query_object_async()`` now returns the server-assigned
``query_id`` instead of the URL of an HTML results page. [#3647]
- New methods ``FermiLAT.get_status()``, ``FermiLAT.list_results()``,
``FermiLAT.wait_for_completion()`` and ``FermiLAT.get_file_urls()`` expose
the individual steps of the asynchronous query workflow. [#3647]
- New keyword arguments: ``zenithangle`` (maximum zenith angle in degrees) and
``coordsystem`` (``'J2000'``, ``'B1950'`` or ``'Galactic'``). All-sky
queries (radius > 60 deg, observation window <= 24 h) are now supported. [#3647]
- ``GetFermilatDatafile`` and ``get_fermilat_datafile`` are deprecated; they
now delegate to ``FermiLAT.get_file_urls()`` and take a ``query_id`` rather
than a results-page URL. [#3647]
- The module no longer emits an "Experimental" warning on import. [#3647]
- Failed queries now surface the server's error message: an HTTP error
response with a JSON body such as ``{"error": "..."}`` is raised as a
``RemoteServiceError`` carrying that message, rather than a bare status
code. [#3647]


mast
^^^^
- ``utils.mast_relative_path`` is now deprecated in favor of ``utils.get_cloud_paths``. [#3488]
Expand Down
23 changes: 15 additions & 8 deletions astroquery/fermi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

https://fermi.gsfc.nasa.gov
https://fermi.gsfc.nasa.gov/ssc/data/

As of 2026, the Fermi LAT Data Server exposes a JSON REST API. This module
targets that API; the legacy ``LATDataQuery.cgi`` HTML-scraping path has been
removed.
"""
from astropy import config as _config

Expand All @@ -14,25 +18,28 @@ class Conf(_config.ConfigNamespace):
"""

url = _config.ConfigItem(
'https://fermi.gsfc.nasa.gov/cgi-bin/ssc/LAT/LATDataQuery.cgi',
'Fermi query URL.')
'https://fermi.gsfc.nasa.gov/ssc/data/access/lat/query/api/v1',
'Base URL of the Fermi LAT Data Query REST API. Endpoints '
'(/query, /query/{id}/status, /query/{id}/results) are appended to it.')
file_base_url = _config.ConfigItem(
# NOTE: the results endpoint returns bare filenames; download URLs are
# reconstructed against this staging area. Currently a /test/ path -
# revisit if the staging location changes at production cutover.
'https://fermi.gsfc.nasa.gov/FTP/fermi/data/lat/test/queries/',
'Base URL under which query result files are staged.')
timeout = _config.ConfigItem(
60,
'Time limit for connecting to Fermi server.')
'Time limit for connecting to the Fermi server.')
retrieval_timeout = _config.ConfigItem(
120,
'Time limit for retrieving a data file once it has been located.')


conf = Conf()

from .core import FermiLAT, FermiLATClass, GetFermilatDatafile, get_fermilat_datafile
from .core import FermiLAT, FermiLATClass, GetFermilatDatafile, get_fermilat_datafile # noqa: E402

__all__ = ['FermiLAT', 'FermiLATClass',
'GetFermilatDatafile', 'get_fermilat_datafile',
'Conf', 'conf',
]

import warnings
warnings.warn("Experimental: Fermi-LAT has not yet been refactored to have "
"its API match the rest of astroquery.")
Loading
Loading