Skip to content

Commit

Permalink
Merge pull request #3157 from bsipocz/BUG_esahubble_composite
Browse files Browse the repository at this point in the history
BUG: ESAHubble.get_member_observations now always return lists
  • Loading branch information
bsipocz authored Dec 19, 2024
2 parents f1a7888 + 4ddac23 commit 7bb09ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ casda

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

ehst
^^^^
esa.hubble
^^^^^^^^^^

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

- Fix an inconsistency, ``get_member_observations`` now return a list for
both simple and composite observations. [#3157]

gama
^^^^

Expand Down
2 changes: 1 addition & 1 deletion astroquery/esa/hubble/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _select_related_members(self, observation_id):
def _select_related_composite(self, observation_id):
query = f"select observation_id from ehst.observation where members like '%{observation_id}%'"
job = self.query_tap(query=query)
oids = job["observation_id"]
oids = job["observation_id"].tolist()
return oids

def __validate_product_type(self, product_type):
Expand Down
4 changes: 3 additions & 1 deletion astroquery/esa/hubble/tests/test_esa_hubble_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def test_hap_composite_to_hap_simple(self):

def test_hap_simple_to_hap_composite(self):
result = esa_hubble.get_member_observations(observation_id='hst_16316_71_acs_sbc_f150lp_jec071i9')
assert result == ['hst_16316_71_acs_sbc_f150lp_jec071']
assert result == ['hst_16316_71_acs_sbc_f150lp_jec071',
'hst_16316_71_acs_sbc_total_jec071',
'hst_skycell-p2478x15y09_acs_sbc_f150lp_all']

def test_hap_simple_to_hst_simple(self):
result = esa_hubble.get_hap_hst_link(observation_id='hst_16316_71_acs_sbc_f150lp_jec071i9')
Expand Down

0 comments on commit 7bb09ae

Please sign in to comment.