|
| 1 | +""" |
| 2 | +========= |
| 3 | +ISLA Init |
| 4 | +========= |
| 5 | +
|
| 6 | +European Space Astronomy Centre (ESAC) |
| 7 | +European Space Agency (ESA) |
| 8 | +
|
| 9 | +""" |
| 10 | + |
| 11 | +from astropy import config as _config |
| 12 | + |
| 13 | +ISLA_DOMAIN = 'https://isla.esac.esa.int/tap/' |
| 14 | +ISLA_TAP_URL = ISLA_DOMAIN + 'tap' |
| 15 | + |
| 16 | + |
| 17 | +class Conf(_config.ConfigNamespace): |
| 18 | + """ |
| 19 | + Configuration parameters for `astroquery.esa.integral`. |
| 20 | + """ |
| 21 | + ISLA_TAP_SERVER = _config.ConfigItem(ISLA_TAP_URL, "ISLA TAP Server") |
| 22 | + ISLA_DATA_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'data?', "ISLA Data Server") |
| 23 | + ISLA_LOGIN_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'login', "ISLA Login Server") |
| 24 | + ISLA_LOGOUT_SERVER = _config.ConfigItem(ISLA_DOMAIN + 'logout', "ISLA Logout Server") |
| 25 | + ISLA_SERVLET = _config.ConfigItem(ISLA_TAP_URL + "/sync/?PHASE=RUN", |
| 26 | + "ISLA Sync Request") |
| 27 | + ISLA_TARGET_RESOLVER = _config.ConfigItem(ISLA_DOMAIN + "servlet/target-resolver?TARGET_NAME={}" |
| 28 | + "&RESOLVER_TYPE={}&FORMAT=json", |
| 29 | + "ISLA Target Resolver Request") |
| 30 | + |
| 31 | + ISLA_INSTRUMENT_BAND_QUERY = _config.ConfigItem('select i.name as instrument, b."name" as band, ' |
| 32 | + 'i.instrument_oid, b.band_oid from ila.instrument i join ' |
| 33 | + 'ila.band b using(instrument_oid);', |
| 34 | + "ISLA Instrument Band Query") |
| 35 | + ISLA_EPOCH_TARGET_QUERY = _config.ConfigItem("select distinct epoch from ila.epoch where source_id = '{}' and " |
| 36 | + "(instrument_oid = {} or band_oid = {})", |
| 37 | + "ISLA Epoch Query") |
| 38 | + ISLA_EPOCH_QUERY = _config.ConfigItem("select distinct epoch from ila.epoch where " |
| 39 | + "(instrument_oid = {} or band_oid = {})", |
| 40 | + "ISLA Epoch Query") |
| 41 | + ISLA_OBSERVATION_BASE_QUERY = _config.ConfigItem("select * from ila.cons_pub_obs", |
| 42 | + "ISLA Observation Base Query") |
| 43 | + ISLA_TARGET_CONDITION = _config.ConfigItem("select distinct src.name, src.ra, src.dec, src.source_id from " |
| 44 | + "ila.v_cat_source src where " |
| 45 | + "src.name ilike '%{}%' order by src.name asc", |
| 46 | + "ISLA Target Condition") |
| 47 | + ISLA_CONE_TARGET_CONDITION = _config.ConfigItem("select distinct src.name, src.ra, src.dec, " |
| 48 | + "src.source_id from ila.v_cat_source src where " |
| 49 | + "1=CONTAINS(POINT('ICRS',src.ra,src.dec),CIRCLE('ICRS',{},{},{}))", |
| 50 | + "ISLA Target Condition") |
| 51 | + ISLA_COORDINATE_CONDITION = _config.ConfigItem("1=CONTAINS(POINT('ICRS',ra,dec),CIRCLE('ICRS',{},{},{}))", |
| 52 | + "ISLA Coordinate Condition") |
| 53 | + TIMEOUT = 60 |
| 54 | + |
| 55 | + |
| 56 | +conf = Conf() |
| 57 | + |
| 58 | +from .core import Integral, IntegralClass |
| 59 | + |
| 60 | +__all__ = ['Integral', 'IntegralClass', 'Conf', 'conf'] |
0 commit comments