|
13 | 13 | import os |
14 | 14 | import shutil |
15 | 15 | import zipfile |
16 | | -from collections.abc import Iterable |
17 | | - |
18 | 16 | from astropy import units |
19 | 17 | from astropy import units as u |
20 | 18 | from astropy.coordinates import Angle |
|
23 | 21 | from astropy.table import Table |
24 | 22 | from astropy.units import Quantity |
25 | 23 | from astropy.utils.decorators import deprecated_renamed_argument |
| 24 | +from collections.abc import Iterable |
26 | 25 | from requests import HTTPError |
27 | 26 |
|
28 | 27 | from astroquery import log |
@@ -174,54 +173,52 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retr |
174 | 173 | Parameters |
175 | 174 | ---------- |
176 | 175 | ids : str, int, str list or int list, mandatory |
177 | | - list of identifiers |
| 176 | + List of identifiers |
178 | 177 | data_release: str, optional, default None |
179 | | - data release from which data should be taken. E.g. 'Gaia DR3' |
180 | | - By default, it takes the current default one. |
| 178 | + Data release from which data should be taken. E.g. 'Gaia DR3'. By default, it takes the current default one. |
181 | 179 | data_structure: str, optional, default 'INDIVIDUAL' |
182 | | - it can be 'INDIVIDUAL' or 'RAW': |
| 180 | + It can be 'INDIVIDUAL' or 'RAW': |
183 | 181 | 'INDIVIDUAL' means products are provided in separate files for each sourceId. All files are zipped |
184 | | - in a single bundle, even if only one source/file is considered |
185 | | - 'RAW' means products are provided following a Data Model similar to that used in the MDB, meaning in |
186 | | - particular that parameters stored as arrays will remain as such. A single file is provided for the data of |
187 | | - all sourceIds together, but in this case there will be always be one row per sourceId. |
188 | | - retrieval_type : str, optional, default 'ALL' to retrieve all data from the list of sources |
189 | | - retrieval type identifier. For GAIA DR2 possible values are ['EPOCH_PHOTOMETRY'] |
190 | | - For GAIA DR3, possible values are ['EPOCH_PHOTOMETRY', 'RVS', 'XP_CONTINUOUS', 'XP_SAMPLED', |
191 | | - 'MCMC_GSPPHOT' or 'MCMC_MSC'] |
192 | | - For GAIA DR4, possible values will be ['EPOCH_PHOTOMETRY', 'MEAN_SPECTRUM_RVS', 'XP_CONTINUOUS', |
193 | | - 'XP_SAMPLED', 'MCMC_GSPPHOT', 'MCMC_MSC', 'EPOCH_ASTROMETRY', 'RVS_EPOCH_DATA_SINGLE', |
194 | | - 'RVS_EPOCH_DATA_DOUBLE','EPOCH_SPECTRUM_RVS', 'EPOCH_ASTROMETRY_CROWDED_FIELD', |
| 182 | + in a single bundle, even if only one source/file is considered 'RAW' means products are provided |
| 183 | + following a Data Model similar to that used in the MDB, meaning in particular that parameters stored as |
| 184 | + arrays will remain as such. A single file is provided for the data of all sourceIds together, but in this |
| 185 | + case there will be always be one row per sourceId. |
| 186 | + retrieval_type : str, optional, default ‘ALL’ to retrieve all data from the list of sources |
| 187 | + Retrieval type identifier: |
| 188 | + For Gaia DR2, the only possible values is ['EPOCH_PHOTOMETRY'] |
| 189 | + For Gaia DR3, the possible values are ['EPOCH_PHOTOMETRY', 'RVS', 'XP_CONTINUOUS', 'XP_SAMPLED', |
| 190 | + 'MCMC_GSPPHOT', 'MCMC_MSC'] |
| 191 | + For Gaia DR4, the possible values will be ['EPOCH_PHOTOMETRY', 'MEAN_SPECTRUM_RVS', 'MCMC_GSP_PHOT', |
| 192 | + 'EPOCH_ASTROMETRY', 'EPOCH_SPECTRUM_RVS', 'EPOCH_ASTROMETRY_CROWDED_FIELD', |
195 | 193 | 'EPOCH_PHOTOMETRY_CROWDED_FIELD', 'EPOCH_IMAGE', 'EPOCH_PHOTOMETRY_CCD', 'EPOCH_SPECTRUM_XP_SSO', |
196 | 194 | 'EPOCH_SPECTRUM_XP_CROWDING', 'MEAN_SPECTRUM_XP', 'EPOCH_SPECTRUM_XP', 'CROWDED_FIELD_IMAGE', |
197 | 195 | 'EPOCH_ASTROMETRY_BRIGHT', 'MEAN_SPECTRUM_XP_GRAVLENS', 'EPOCH_FLAGS_NSS', 'EPOCH_PARAMETERS_RVS_SINGLE', |
198 | | - 'EPOCH_PARAMETERS_RVS_DOUBLE', 'EPOCH_FLAGS_VARI']. Note that for 'CROWDED_FIELD_IMAGE' only the format |
199 | | - 'fits' can be used, and that its image, in the principal header, will not be available in the returned |
| 196 | + 'EPOCH_PARAMETERS_RVS_DOUBLE', 'EPOCH_FLAGS_VARI']. Note that for 'CROWDED_FIELD_IMAGE', only the format |
| 197 | + 'fits' can be used, and its image, in the principal header, will not be available in the returned |
200 | 198 | dictionary. Set 'output_file' to retrieve all data: image + tables. |
201 | 199 | linking_parameter : str, optional, default SOURCE_ID, valid values: SOURCE_ID, TRANSIT_ID, IMAGE_ID |
202 | 200 | By default, all the identifiers are considered as source_id |
203 | 201 | SOURCE_ID: the identifiers are considered as source_id |
204 | 202 | TRANSIT_ID: the identifiers are considered as transit_id |
205 | 203 | IMAGE_ID: the identifiers are considered as sif_observation_id |
206 | 204 | valid_data : bool, optional, default False |
207 | | - By default, the epoch photometry service returns all available data, including |
208 | | - data rows where flux is null and/or the rejected_by_photometry flag is set to True. |
209 | | - In order to retrieve only valid data (data rows where flux is not null and/or the |
210 | | - rejected_by_photometry flag is set to False) this request parameter should be included |
211 | | - with valid_data=True. |
| 205 | + By default, the epoch photometry service returns all available data, including data rows where flux is |
| 206 | + null and/or the rejected_by_photometry flag is set to True. In order to retrieve only valid data (data |
| 207 | + rows where flux is not null and/or the rejected_by_photometry flag is set to False) this request |
| 208 | + parameter should be included with valid_data=True. |
212 | 209 | avoid_datatype_check: boolean, optional, default False. |
213 | | - By default, this value will be set to False. If it is set to 'true' |
214 | | - the Datalink items tags will not be checked. |
| 210 | + By default, this value will be set to False. If it is set to 'true' the Datalink items tags will not be |
| 211 | + checked. |
215 | 212 | format : str, optional, default 'votable' |
216 | | - loading format. Other available formats are 'csv', 'ecsv','votable_plain', 'json' and 'fits' |
| 213 | + Loading format. Other available formats are 'csv', 'ecsv','votable_plain', 'json' and 'fits' |
217 | 214 | dump_to_file: boolean, optional, default False. |
218 | 215 | If it is true, a compressed directory named "datalink_output_<time_stamp>.zip" with all the DataLink |
219 | 216 | files is made in the current working directory. The <time_stamp> format follows the ISO 8601 standard: |
220 | 217 | "YYYYMMDD_HHMMSS.mmmmmm". |
221 | 218 | overwrite_output_file : boolean, optional, default False |
222 | 219 | To overwrite the output file ("datalink_output.zip") if it already exists. |
223 | 220 | verbose : bool, optional, default 'False' |
224 | | - flag to display information about the process |
| 221 | + Flag to display information about the process |
225 | 222 |
|
226 | 223 | Returns |
227 | 224 | ------- |
|
0 commit comments