Skip to content

Commit 46b11d2

Browse files
mhsarmientobsipocz
authored andcommitted
This new commit implements C9APP-164 [MUST]: Astroquery + Datalink: Retrieval_Type = "ALL" VS. Retrieval_type = "Epoch Photometry"
1 parent f45190a commit 46b11d2

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

astroquery/gaia/core.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def logout(self, verbose=False):
162162
except HTTPError as err:
163163
log.error("Error logging out data server")
164164

165-
def load_data(self, ids, data_release=None, data_structure='INDIVIDUAL', retrieval_type="ALL", valid_data=True,
165+
def load_data(self, ids, data_release=None, data_structure='INDIVIDUAL', retrieval_type="ALL", valid_data=False,
166166
band=None, avoid_datatype_check=False, format="votable", output_file=None,
167167
overwrite_output_file=False, verbose=False):
168168
"""Loads the specified table
@@ -189,12 +189,10 @@ def load_data(self, ids, data_release=None, data_structure='INDIVIDUAL', retriev
189189
retrieval type identifier. For GAIA DR2 possible values are ['EPOCH_PHOTOMETRY']
190190
For future GAIA DR3 (Once published), possible values will be ['EPOC_PHOTOMETRY', 'RVS', 'XP_CONTINUOUS',
191191
'XP_SAMPLED', 'MCMC_GSPPHOT' or 'MCMC_MSC']
192-
valid_data : bool, optional, default True
193-
By default, the epoch photometry service returns only valid data,
194-
that is, all data rows where flux is not null and
195-
rejected_by_photometry flag is not true. In order to retrieve
196-
all data associated to a given source without this filter,
197-
this request parameter should be included (valid_data=False)
192+
valid_data : bool, optional, default False
193+
By default, the epoch photometry service returns all data associated to a given source.
194+
In order to retrieve only valid data, that is, all data rows where flux is not null and
195+
rejected_by_photometry flag is not true, this parameter should be included (valid_data=True)
198196
band : str, optional, default None, valid values: G, BP, RP
199197
By default, the epoch photometry service returns all the
200198
available photometry bands for the requested source.
@@ -250,9 +248,9 @@ def load_data(self, ids, data_release=None, data_structure='INDIVIDUAL', retriev
250248
params_dict = {}
251249

252250
if not valid_data or str(retrieval_type) == 'ALL':
253-
params_dict['VALID_DATA'] = "false"
254-
elif valid_data:
255251
params_dict['VALID_DATA'] = "true"
252+
elif valid_data:
253+
params_dict['VALID_DATA'] = "false"
256254

257255
if band is not None:
258256
if band != 'G' and band != 'BP' and band != 'RP':

0 commit comments

Comments
 (0)