Skip to content

Commit

Permalink
Merge pull request #3154 from esdc-esac-esa-int/ESA_isla-create-astro…
Browse files Browse the repository at this point in the history
…query

ESA Integral Science Legacy Archive Astroquery module
  • Loading branch information
bsipocz authored Jan 24, 2025
2 parents 40872f7 + f181ac8 commit a1c1156
Show file tree
Hide file tree
Showing 23 changed files with 3,067 additions and 7 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,25 @@ jobs:
toxenv: py39-test-oldestdeps-alldeps
toxargs: -v

- name: Python 3.10 with all optional dependencies (MacOS X)
- name: OSX, py310, all optional dependencies
os: macos-latest
python: "3.10"
toxenv: py310-test-alldeps
toxargs: -v

- name: Python 3.11 with mandatory dependencies (Windows)
- name: Windows, py311, mandatory dependencies only
os: windows-latest
python: "3.11"
toxenv: py311-test
toxargs: -v

- name: Linux ARM, py312, all optional dependencies
os: ubuntu-24.04-arm
python: "3.12"
toxenv: py312-test-alldeps
toxargs: -v


steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

New Tools and Services
----------------------

esa.integral
^^^^^^^^^^^^
- New module to access the ESA Integral Science Legacy Archive. [#3154]

Service fixes and enhancements
------------------------------
Expand Down
60 changes: 60 additions & 0 deletions astroquery/esa/integral/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"""
=========
ISLA Init
=========
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
"""

from astropy import config as _config

ISLA_DOMAIN = 'https://isla.esac.esa.int/tap/'
ISLA_TAP_URL = ISLA_DOMAIN + 'tap'


class Conf(_config.ConfigNamespace):
"""
Configuration parameters for `astroquery.esa.integral`.
"""
ISLA_TAP_SERVER = _config.ConfigItem(ISLA_TAP_URL, "ISLA TAP Server")
ISLA_DATA_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'data?', "ISLA Data Server")
ISLA_LOGIN_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'login', "ISLA Login Server")
ISLA_LOGOUT_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'logout', "ISLA Logout Server")
ISLA_SERVLET = _config.ConfigItem(ISLA_TAP_URL + "/sync/?PHASE=RUN",
"ISLA Sync Request")
ISLA_TARGET_RESOLVER = _config.ConfigItem(ISLA_DOMAIN + "servlet/target-resolver?TARGET_NAME={}"
"&RESOLVER_TYPE={}&FORMAT=json",
"ISLA Target Resolver Request")

ISLA_INSTRUMENT_BAND_QUERY = _config.ConfigItem('select i.name as instrument, b."name" as band, '
'i.instrument_oid, b.band_oid from ila.instrument i join '
'ila.band b using(instrument_oid);',
"ISLA Instrument Band Query")
ISLA_EPOCH_TARGET_QUERY = _config.ConfigItem("select distinct epoch from ila.epoch where source_id = '{}' and "
"(instrument_oid = {} or band_oid = {})",
"ISLA Epoch Query")
ISLA_EPOCH_QUERY = _config.ConfigItem("select distinct epoch from ila.epoch where "
"(instrument_oid = {} or band_oid = {})",
"ISLA Epoch Query")
ISLA_OBSERVATION_BASE_QUERY = _config.ConfigItem("select * from ila.cons_pub_obs",
"ISLA Observation Base Query")
ISLA_TARGET_CONDITION = _config.ConfigItem("select distinct src.name, src.ra, src.dec, src.source_id from "
"ila.v_cat_source src where "
"src.name ilike '%{}%' order by src.name asc",
"ISLA Target Condition")
ISLA_CONE_TARGET_CONDITION = _config.ConfigItem("select distinct src.name, src.ra, src.dec, "
"src.source_id from ila.v_cat_source src where "
"1=CONTAINS(POINT('ICRS',src.ra,src.dec),CIRCLE('ICRS',{},{},{}))",
"ISLA Target Condition")
ISLA_COORDINATE_CONDITION = _config.ConfigItem("1=CONTAINS(POINT('ICRS',ra,dec),CIRCLE('ICRS',{},{},{}))",
"ISLA Coordinate Condition")
TIMEOUT = 60


conf = Conf()

from .core import Integral, IntegralClass

__all__ = ['Integral', 'IntegralClass', 'Conf', 'conf']
Loading

0 comments on commit a1c1156

Please sign in to comment.