Skip to content

Commit 7bb09ae

Browse files
authored
Merge pull request #3157 from bsipocz/BUG_esahubble_composite
BUG: ESAHubble.get_member_observations now always return lists
2 parents f1a7888 + 4ddac23 commit 7bb09ae

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGES.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ casda
3131

3232
- Support jobs which are in the SUSPENDED state (used when copying data) [#3134]
3333

34-
ehst
35-
^^^^
34+
esa.hubble
35+
^^^^^^^^^^
3636

3737
- Include warning in get_datalabs_path method for ehst when the data volume is not mounted in DataLabs [#3059]
3838

39+
- Fix an inconsistency, ``get_member_observations`` now return a list for
40+
both simple and composite observations. [#3157]
41+
3942
gama
4043
^^^^
4144

astroquery/esa/hubble/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _select_related_members(self, observation_id):
299299
def _select_related_composite(self, observation_id):
300300
query = f"select observation_id from ehst.observation where members like '%{observation_id}%'"
301301
job = self.query_tap(query=query)
302-
oids = job["observation_id"]
302+
oids = job["observation_id"].tolist()
303303
return oids
304304

305305
def __validate_product_type(self, product_type):

astroquery/esa/hubble/tests/test_esa_hubble_remote.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def test_hap_composite_to_hap_simple(self):
103103

104104
def test_hap_simple_to_hap_composite(self):
105105
result = esa_hubble.get_member_observations(observation_id='hst_16316_71_acs_sbc_f150lp_jec071i9')
106-
assert result == ['hst_16316_71_acs_sbc_f150lp_jec071']
106+
assert result == ['hst_16316_71_acs_sbc_f150lp_jec071',
107+
'hst_16316_71_acs_sbc_total_jec071',
108+
'hst_skycell-p2478x15y09_acs_sbc_f150lp_all']
107109

108110
def test_hap_simple_to_hst_simple(self):
109111
result = esa_hubble.get_hap_hst_link(observation_id='hst_16316_71_acs_sbc_f150lp_jec071i9')

0 commit comments

Comments
 (0)