Skip to content

Commit db2eb8a

Browse files
Jorge Fernandez HernandezJorge Fernandez Hernandez
authored andcommitted
EUCLIDPCR-1914 Overload method get_datalinks
1 parent 8ede150 commit db2eb8a

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

astroquery/esa/euclid/core.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,5 +1225,26 @@ def get_spectrum(self, *, source_id, schema='sedm', retrieval_type="ALL", output
12251225

12261226
return files
12271227

1228+
def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
1229+
"""Gets datalinks associated to the provided identifiers
1230+
TAP+ only
1231+
1232+
Parameters
1233+
----------
1234+
ids : str, int, str list or int list, mandatory
1235+
list of identifiers
1236+
linking_parameter : str, optional, default SOURCE_ID, valid values: SOURCE_ID
1237+
By default, all the identifiers are considered as source_id
1238+
verbose : bool, optional, default 'False'
1239+
flag to display information about the process
1240+
1241+
Returns
1242+
-------
1243+
A table object
1244+
1245+
"""
1246+
1247+
return self.__eucliddata.get_datalinks(ids=ids, linking_parameter=linking_parameter, verbose=verbose)
1248+
12281249

12291250
Euclid = EuclidClass()

docs/esa/euclid/euclid.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,8 +1177,18 @@ To find out the resources associated with a given source:
11771177
.. doctest-skip::
11781178

11791179
>>> from astroquery.esa.euclid import Euclid
1180-
>>> ids=["sedm -522481450274091664"]
1180+
>>> Euclid.login()
1181+
>>> ids=["2707008224650763513"]
11811182
>>> datalink = Euclid.get_datalinks(ids=ids)
1183+
>>> datatlink
1184+
<Table length=2>
1185+
ID linking_parameter access_url service_def error_message semantics description content_type content_length
1186+
byte
1187+
object object object object object object object object int64
1188+
------------------------ ----------------- ------------------------------------------------------------------------------------------- ----------- ------------- --------- ------------------- ------------ --------------
1189+
sedm 2707008224650763513 SOURCE_ID https://eas.esac.esa.int/sas-dd/data?ID=sedm+2707008224650763513&RETRIEVAL_TYPE=SPECTRA_RGS #this Spectra Red Source --
1190+
sedm 2707008224650763513 SOURCE_ID https://eas.esac.esa.int/sas-dd/data?ID=sedm+2707008224650763513&RETRIEVAL_TYPE=SPECTRA_BGS #this Spectra Blue Source --
1191+
11821192

11831193

11841194
The query below retrieves a random sample of Euclid sources having spectra.

0 commit comments

Comments
 (0)