Skip to content

Commit e2088e5

Browse files
Jorge Fernandez HernandezJorge Fernandez Hernandez
authored andcommitted
EUCLIDPCR-1863 Update help for the method get_spectrum
1 parent 1698ee3 commit e2088e5

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

astroquery/esa/euclid/core.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,11 @@ def get_spectrum(self, *, source_id=None, schema='sedm', output_file=None, verbo
11471147
"""
11481148
Description
11491149
-----------
1150-
Downloads a spectrum with datalink
1150+
Downloads a spectrum with datalink.
1151+
1152+
The spectrum associated to the source_id is downloaded as fits file, and returned in a list. The file is
1153+
saved in the local path given by output_file. If this parameter is not set, the result is saved in the
1154+
directory <working directory>/temp_"%Y%m%d_%H%M%S"
11511155
11521156
Parameters
11531157
----------
@@ -1156,13 +1160,14 @@ def get_spectrum(self, *, source_id=None, schema='sedm', output_file=None, verbo
11561160
schema : str, mandatory, default 'sedm'
11571161
the data release, 'sedm'
11581162
output_file : str, optional
1159-
output file. If no value is provided, a temporary one is created
1163+
output file name. If no value is provided, a temporary one is created with the name
1164+
<working directory>/temp_"%Y%m%d_%H%M%S"/<source_id>.fits
11601165
verbose : bool, optional, default 'False'
11611166
flag to display information about the process
11621167
11631168
Returns
11641169
-------
1165-
The fits file is downloaded, and the local path where the spectrum is saved is returned
1170+
A list of files.
11661171
"""
11671172

11681173
if source_id is None or schema is None:
@@ -1172,7 +1177,8 @@ def get_spectrum(self, *, source_id=None, schema='sedm', output_file=None, verbo
11721177
id_value = """{schema} {source_id}""".format(**{'schema': schema, 'source_id': source_id})
11731178
params_dict['ID'] = id_value
11741179

1175-
output_file_full_path, output_dir = self.__set_dirs(output_file=output_file, observation_id='temp')
1180+
fits_file = source_id + '.fits'
1181+
output_file_full_path, output_dir = self.__set_dirs(output_file=output_file, observation_id=fits_file)
11761182
try:
11771183
self.__eucliddata.load_data(params_dict=params_dict, output_file=output_file_full_path, verbose=verbose)
11781184
except HTTPError as err:

0 commit comments

Comments
 (0)