Skip to content

Commit fcaf77c

Browse files
Raul Gutierrezbsipocz
authored andcommitted
Added default output columns. Changed name for target RA and DEC
columns to target_ra and target_dec.
1 parent 3c25d83 commit fcaf77c

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

astroquery/jwst/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,25 @@ class Conf(_config.ConfigNamespace):
2727
JWST_MAIN_TABLE = _config.ConfigItem("jwst.main",
2828
"JWST main table, combination of \
2929
observation and plane tables.")
30+
31+
JWST_MAIN_TABLE_RA = _config.ConfigItem("target_ra",
32+
"Name of RA parameter in table")
33+
34+
JWST_MAIN_TABLE_DEC = _config.ConfigItem("target_dec",
35+
"Name of Dec parameter in table")
36+
3037
JWST_ARTIFACT_TABLE = _config.ConfigItem("jwst.artifact",
3138
"JWST artifacts (data files) table.")
39+
3240
JWST_OBSERVATION_TABLE = _config.ConfigItem("jwst.observation",
3341
"JWST observation table")
42+
3443
JWST_PLANE_TABLE = _config.ConfigItem("jwst.plane",
3544
"JWST plane table")
45+
3646
JWST_OBSERVATION_TABLE_RA = _config.ConfigItem("targetposition_coordinates_cval1",
3747
"Name of RA parameter in table")
48+
3849
JWST_OBSERVATION_TABLE_DEC = _config.ConfigItem("targetposition_coordinates_cval2",
3950
"Name of Dec parameter in table")
4051

astroquery/jwst/core.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ class JwstClass(object):
3232
Proxy class to default TapPlus object (pointing to JWST Archive)
3333
"""
3434
JWST_MAIN_TABLE = conf.JWST_MAIN_TABLE
35-
JWST_ARTIFACT_TABLE = conf.JWST_ARTIFACT_TABLE
36-
JWST_OBSERVATION_TABLE = conf.JWST_OBSERVATION_TABLE
37-
JWST_OBSERVATION_TABLE_RA = conf.JWST_OBSERVATION_TABLE_RA
38-
JWST_OBSERVATION_TABLE_DEC = conf.JWST_OBSERVATION_TABLE_DEC
39-
JWST_PLANE_TABLE = conf.JWST_PLANE_TABLE
35+
JWST_MAIN_TABLE_RA = conf.JWST_MAIN_TABLE_RA
36+
JWST_MAIN_TABLE_DEC = conf.JWST_MAIN_TABLE_DEC
4037

4138
JWST_DEFAULT_COLUMNS = ['observationid', 'calibrationlevel', 'public',
42-
'dataproducttype', 'instrument_name', 'position_bounds_center',
39+
'dataproducttype', 'instrument_name', 'energy_bandpassname',
40+
'target_name', 'target_ra', 'target_dec', 'position_bounds_center',
4341
'position_bounds_spoly']
4442

4543
PLANE_DATAPRODUCT_TYPES = ['image', 'cube', 'measurements', 'spectrum']
@@ -558,12 +556,12 @@ def __cone_search(self, coordinate, radius,
558556
radius_deg = commons.radius_to_unit(radius_quantity, unit='deg')
559557

560558
query = "SELECT DISTANCE(POINT('ICRS'," +\
561-
str(self.JWST_OBSERVATION_TABLE_RA) + "," +\
562-
str(self.JWST_OBSERVATION_TABLE_DEC) + "), \
559+
str(self.JWST_MAIN_TABLE_RA) + "," +\
560+
str(self.JWST_MAIN_TABLE_DEC) + "), \
563561
POINT('ICRS'," + str(ra) + "," + str(dec) +")) AS dist, "+columns+" \
564562
FROM " + str(self.JWST_MAIN_TABLE) + " WHERE CONTAINS(\
565-
POINT('ICRS'," + str(self.JWST_OBSERVATION_TABLE_RA) + "," +\
566-
str(self.JWST_OBSERVATION_TABLE_DEC)+"),\
563+
POINT('ICRS'," + str(self.JWST_MAIN_TABLE_RA) + "," +\
564+
str(self.JWST_MAIN_TABLE_DEC)+"),\
567565
CIRCLE('ICRS'," + str(ra)+"," + str(dec) + ", " +\
568566
str(radius_deg)+"))=1" +\
569567
observationid_condition +\

0 commit comments

Comments
 (0)