@@ -163,10 +163,10 @@ def logout(self, *, verbose=False):
163
163
except HTTPError :
164
164
log .error ("Error logging out data server" )
165
165
166
- def load_data (self , ids , * , data_release = None , data_structure = 'INDIVIDUAL' ,
167
- retrieval_type = "ALL" , valid_data = False , band = None ,
168
- avoid_datatype_check = False , format = "votable" , output_file = None ,
169
- overwrite_output_file = False , verbose = False ):
166
+ def load_data (self , ids , * , data_release = None , data_structure = 'INDIVIDUAL' , retrieval_type = "ALL" ,
167
+ linking_parameter = 'SOURCE_ID' , valid_data = False , band = None , avoid_datatype_check = False ,
168
+ format = "votable" ,
169
+ output_file = None , overwrite_output_file = False , verbose = False ):
170
170
"""Loads the specified table
171
171
TAP+ only
172
172
@@ -194,6 +194,11 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL',
194
194
For GAIA DR4, possible values will be ['EPOCH_PHOTOMETRY', 'RVS', 'XP_CONTINUOUS', 'XP_SAMPLED',
195
195
'MCMC_GSPPHOT', 'MCMC_MSC', 'EPOCH_ASTROMETRY', 'RV_EPOCH_SINGLE', 'RV_EPOCH_DOUBLE', 'RVS_EPOCH' or
196
196
'RVS_TRANSIT']
197
+ linking_parameter : str, optional, default SOURCE_ID, valid values: SOURCE_ID, TRANSIT_ID, IMAGE_ID
198
+ By default, all the identifiers are considered as source_id
199
+ SOURCE_ID: the identifiers are considered as source_id
200
+ TRANSIT_ID: the identifiers are considered as transit_id
201
+ IMAGE_ID: the identifiers are considered as sif_observation_id
197
202
valid_data : bool, optional, default False
198
203
By default, the epoch photometry service returns all available data, including
199
204
data rows where flux is null and/or the rejected_by_photometry flag is set to True.
@@ -272,6 +277,14 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL',
272
277
params_dict ['RETRIEVAL_TYPE' ] = str (retrieval_type )
273
278
params_dict ['USE_ZIP_ALWAYS' ] = 'true'
274
279
280
+ valid_param = {'SOURCE_ID' , 'TRANSIT_ID' , 'IMAGE_ID' }
281
+ if linking_parameter not in valid_param :
282
+ raise ValueError (
283
+ f"Invalid linking_parameter value '{ linking_parameter } ' (Valid values: { ', ' .join (valid_param )} )" )
284
+ else :
285
+ if linking_parameter != 'SOURCE_ID' :
286
+ params_dict ['LINKING_PARAMETER' ] = linking_parameter
287
+
275
288
if path != '' :
276
289
try :
277
290
os .mkdir (path )
0 commit comments