Skip to content

Commit 0ed7fe6

Browse files
davidgltbsipocz
authored andcommitted
Add PR number in CHANGES.rst
Align to PEP8
1 parent b78fc97 commit 0ed7fe6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ alma
1515

1616
- Added support for frequency_resolution in KHz [#3035]
1717

18+
ehst
19+
^^^^
20+
21+
- Include warning in get_datalabs_path method for ehst when the data volume is not mounted in DataLabs [#3059]
22+
1823
gama
1924
^^^^
2025

astroquery/esa/hubble/core.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,13 +1031,13 @@ def get_datalabs_path(self, filename, default_volume=None):
10311031
job2 = self.query_tap(query=query2)
10321032
if job2 is None:
10331033
return None
1034-
1034+
10351035
observation_id = job2["observation_id"][0]
10361036
query3 = f"select instrument_name from ehst.observation where observation_id = '{observation_id}'"
10371037
job3 = self.query_tap(query=query3)
10381038
if job3 is None:
10391039
return None
1040-
1040+
10411041
instrument_name = job3["instrument_name"][0]
10421042

10431043
# Output example for path: /hstdata/hstdata_i/i/b4x/04, or hstdata_i/i/b4x/04 for path_parsed
@@ -1048,15 +1048,16 @@ def get_datalabs_path(self, filename, default_volume=None):
10481048
if default_volume is None:
10491049
full_path = "/data/user/hub_" + path_parsed + "/" + filename
10501050
file_exists = os.path.exists(full_path)
1051-
1051+
10521052
# Use the path provided by the user: convert /hstdata/hstdata_i/i/b4x/04 to /data/user/myPath/i/b4x/04
10531053
else:
10541054
path_parsed = path_parsed.split("/", 1)[1]
10551055
full_path = "/data/user/" + default_volume + "/" + path_parsed + "/" + filename
10561056
file_exists = os.path.exists(full_path)
1057-
1057+
10581058
if not file_exists:
1059-
print(f"File '{filename}' is not accessible. Please ensure the '{instrument_name}' volume is mounted in your ESA Datalabs instance.")
1059+
print(f"File '{filename}' is not accessible. Please ensure the '{instrument_name}' " \
1060+
"volume is mounted in your ESA Datalabs instance.")
10601061
return full_path
10611062

10621063

0 commit comments

Comments
 (0)