EuclidClass¶
- class astroquery.esa.euclid.EuclidClass(*, environment='PDR', tap_plus_conn_handler=None, datalink_handler=None, cutout_handler=None, verbose=False, show_server_messages=True)[source]¶
Bases:
TapPlusConstructor for EuclidClass.
- Parameters:
- environmentstr, mandatory if no tap, data or cutout hosts is specified, default ‘PDR’
The Euclid Science Archive environment: ‘PDR’, ‘IDR’, ‘OTF’ and ‘REG’
- tap_plus_conn_handlertap connection handler object, optional, default None
HTTP(s) connection hander (creator). If no handler is provided, a new one is created.
- datalink_handlerdataliink connection handler object, optional, default None
HTTP(s) connection hander (creator). If no handler is provided, a new one is created.
- cutout_handlercutout connection handler object, optional, default None
HTTP(s) connection hander (creator). If no handler is provided, a new one is created.
- verbosebool, optional, default ‘True’
flag to display information about the process
- show_server_messagesbool, optional, default ‘True’
show the messages to inform users about the status of Euclid TAP
Attributes Summary
Proxy class to default TapPlus object (pointing to the Euclid archive)
Methods Summary
cone_search(coordinate, radius, *[, ...])Cone search for a given catalog and sky position, results sorted by distance
cross_match_basic(*, ...[, ...])Performs a positional cross-match between the specified tables.
get_cutout(*[, file_path, instrument, id, ...])Downloads a cutout given its file path, instrument and obs_id, and the cutout region
get_datalinks(ids, *[, linking_parameter, ...])Gets datalinks associated to the provided identifiers (TAP+ only).
get_observation_products(*[, id, schema, ...])Downloads the products for a given EUCLID observation_id (observations) or tile_index (mosaics) For big files the download may require a long time
get_product(*[, file_name, product_id, ...])Downloads a product given its file name or product id
get_product_list(*[, observation_id, ...])Get the list of products of a given EUCLID id searching by observation_id or tile_index.
get_scientific_product_list(*[, ...])Gets the LE3 products (the high-level science data products).
get_spectrum(*, source_id[, schema, ...])Downloads a spectrum with datalink.
get_status_messages([verbose])Retrieve the messages to inform users about the status of Euclid TAP
is_gz_file(filepath)launch_job(query, *[, name, dump_to_file, ...])Launches a synchronous job
launch_job_async(query, *[, name, ...])Launches an asynchronous job
login(*[, user, password, credentials_file, ...])Performs a login
login_gui([verbose])Performs a login using a GUI dialog
logout([verbose])Performs a logout
query_object(coordinate, *[, radius, width, ...])Searches for objects around a given position with the default catalog sascat_pvpr01.mer_final_cat_pvpr01
Attributes Documentation
- EUCLID_MESSAGES = 'notification?action=GetNotifications'¶
Proxy class to default TapPlus object (pointing to the Euclid archive)
- ROW_LIMIT = 50¶
Methods Documentation
- cone_search(coordinate, radius, *, table_name=None, ra_column_name=None, dec_column_name=None, async_job=False, background=False, dump_to_file=False, output_file=None, output_format='csv', verbose=False, columns=None)[source]¶
Cone search for a given catalog and sky position, results sorted by distance
- Parameters:
- coordinateastropy.coordinate, mandatory
coordinates center point
- radiusastropy.units, mandatory
radius
- table_namestr, optional, default the table defined for the selected environment
Table to search
- ra_column_namestr, optional, default the column name defined for the selected environment
Name of the RA column in the table
- dec_column_namestr, optional, default the column name defined for the selected environment
Name of the DEC column in the table
- async_jobbool, optional, default ‘False’
executes the job in asynchronous/synchronous mode (default synchronous)
- backgroundbool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
- dump_to_filebool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
- output_filestr, optional, default None
file name where the results are saved if dump_to_file is True. If this parameter is not provided, the job id is used instead
- output_formatstr, optional, default ‘csv’
Output format for the output file
- columns: list, optional, default None
if empty, all columns will be selected
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- A Job object
- cross_match_basic(*, table_a_full_qualified_name, table_a_column_ra, table_a_column_dec, table_b_full_qualified_name=None, table_b_column_ra=None, table_b_column_dec=None, results_name=None, radius=1.0, background=False, verbose=False)[source]¶
Performs a positional cross-match between the specified tables.
This method carries out the following steps in one step:
updates the user table metadata to flag the positional RA/Dec columns;
launches a positional cross-match as an asynchronous query;
returns all the columns from both tables plus the angular distance (deg) for the cross-matched sources.
The result is a join table with the identifies of both tables and the distance (degrees), that is returned without metadata units. If desired, units can be added using the Units package of Astropy as follows:
results[‘separation’].unit = u.degree. To speed up the cross-match, pass the biggest table to thetable_b_full_qualified_nameparameter. TAP+ only- Parameters:
- table_a_full_qualified_namestr, mandatory
a full qualified table name (i.e. schema name and table name)
- table_a_column_rastr, mandatory
the ‘ra’ column in the table table_a_full_qualified_name
- table_a_column_decstr, mandatory
the ‘dec’ column in the table table_a_full_qualified_name
- table_b_full_qualified_namestr, optional, default the main_table associated to the selected environment
a full qualified table name (i.e. schema name and table name)
- table_b_column_rastr, optional, default the main_table_ra_column associated to the selected environment
the ‘ra’ column in the table table_b_full_qualified_name
- table_b_column_decstr, default the main_table_dec_column associated to the selected environment
the ‘dec’ column in the table table_b_full_qualified_name
- results_namestr, optional, default None
custom name defined by the user for the job that is going to be created
- radiusfloat (arc. seconds), str or astropy.coordinate, optional, default 1.0
radius (valid range: 0.1-10.0). For an astropy.coordinate any angular unit is valid, but its value in arc sec must be contained within the valid range.
- backgroundbool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- A Job object
- get_cutout(*, file_path=None, instrument=None, id=None, coordinate, radius, output_file=None, verbose=False)[source]¶
Downloads a cutout given its file path, instrument and obs_id, and the cutout region
- Parameters:
- file_pathstr, mandatory, default None
file path for the product on the server
- instrumentstr, mandatory, default None
instrument for the product, can be ‘VIS’ or ‘NISP’
- idstr, mandatory, default None
the observation id or tile index for MER products
- coordinateastropy.coordinate, mandatory
coordinates center point
- radiusastropy.units, mandatory
the radius of the cutout to generate
- output_filestr, optional
output file. If no value is provided, a temporary one is created
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- The fits file is downloaded, and the local path where the cutout is saved is returned
- get_datalinks(ids, *, linking_parameter='SOURCE_ID', extra_options=None, verbose=False)[source]¶
Gets datalinks associated to the provided identifiers (TAP+ only).
- Parameters:
- idsstr, int, list of str or list of int, mandatory
list of identifiers
- linking_parameterstr, optional, default SOURCE_ID, valid values: SOURCE_ID
By default, all the identifiers are considered as source_id
- extra_optionsstr, optional, default None, valid values: METADATA
To let customize the server behaviour, if present. If provided with value METADATA, the extra fields datalabs_path, file_name & hdu_index will be retrieved.
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- A table object
- get_observation_products(*, id=None, schema='sedm', product_type=None, product_subtype='STK', filter='VIS', output_file=None, verbose=False)[source]¶
Downloads the products for a given EUCLID observation_id (observations) or tile_index (mosaics) For big files the download may require a long time
- Parameters:
- idstr, mandatory
observation identifier (observation id for observations, mosaic id for mosaics)
- schemastr, optional
schema name. Default value is ‘sedm’.
- product_typestr, mandatory, default None
list only products of the given type. possible values: ‘observation’, ‘mosaic’
- product_subtypestr, optional, default ‘STK’
list only products of the given subtype. Possible values: ‘STK’, ‘ALL’, ‘PSF’, ‘BKG’ for observations also ‘DET’, ‘WGT’ for mosaics also ‘GRID_PSF’, ‘FLAG’, ‘RMS’.
- filterstr, optional, default ‘VIS’
list products for this instrument, only for observations. Possible values: ‘VIS’, ‘NIR_J’, ‘NIR_H’, ‘NIR_Y’
- output_filestr, optional
output file, use zip extension when downloading multiple files if no value is provided, a temporary one is created
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- The fits file(s) are downloaded, and the local path where the product(s) are saved is returned
- get_product(*, file_name=None, product_id=None, schema='sedm', output_file=None, verbose=False)[source]¶
Downloads a product given its file name or product id
- Parameters:
- file_namestr, optional, default None
file name for the product. More than one can be specified between comma. Either file_name or product_id is mandatory
- product_idstr, optional, default None
product id. More than one can be specified between comma. Either file_name or product_id is mandatory
- schemastr, optional, default ‘sedm’
the data release name (schema) in which the product should be searched
- output_filestr, optional
output file, use zip extension when downloading multiple files if no value is provided, a temporary one is created
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- The fits file(s) are downloaded, and the local path where the product(s) are saved is returned
- get_product_list(*, observation_id=None, tile_index=None, product_type, verbose=False)[source]¶
Get the list of products of a given EUCLID id searching by observation_id or tile_index.
- Parameters:
- observation_idstr, mandatory
observation id for observations. It is not compatible with parameter tile_index.
Searchable products by observation_id: ‘dpdVisRawFrame’, ‘dpdNispRawFrame’, ,’DpdVisCalibratedQuadFrame’,’DpdVisCalibratedFrameCatalog’, ‘DpdVisStackedFrame’, ‘DpdVisStackedFrameCatalog’, ‘DpdNirCalibratedFrame’, ‘DpdNirCalibratedFrameCatalog’, ‘DpdNirStackedFrameCatalog’, ‘DpdNirStackedFrame’, ‘DpdMerSegmentationMap’, ‘dpdMerFinalCatalog’, ‘dpdPhzPfOutputCatalog’, ‘dpdPhzPfOutputForL3’, ‘dpdSpePfOutputCatalog’, ‘dpdSheLensMcChains’,’dpdSheBiasParams’, ‘dpdSheLensMcFinalCatalog’,’dpdSheLensMcRawCatalog’, ‘dpdSheMetaCalFinalCatalog’, ‘dpdSheMetaCalRawCatalog’, ‘dpdHealpixBitMaskVMPZ’, ‘dpdHealpixFootprintMaskVMPZ’, ‘dpdHealpixCoverageVMPZ’, ‘dpdHealpixDepthMapVMPZ’, ‘dpdHealpixInfoMapVMPZ’, ‘dpdSleDetectionOutput’,’dpdSleModelOutput’, ‘DpdSirCombinedSpectra’,’dpdSirScienceFrame’
- tile_indexstr, mandatory
tile index for products searchable by tile. It is not compatible with parameter observation_id.
Searchable products by tile_index: ‘DpdMerSegmentationMap’, ‘dpdMerFinalCatalog’, ‘DpdMerBksMosaic’, ‘dpdPhzPfOutputCatalog’,’dpdPhzPfOutputForL3’, ‘dpdSpePfOutputCatalog’, ‘dpdSheLensMcChains’, ‘dpdSheBiasParams’, ‘dpdSheLensMcFinalCatalog’, ‘dpdSheLensMcRawCatalog’, ‘dpdSheMetaCalFinalCatalog’, ‘dpdSheMetaCalRawCatalog’, ‘dpdHealpixBitMaskVMPZ’, ‘dpdHealpixFootprintMaskVMPZ’, ‘dpdHealpixCoverageVMPZ’, ‘dpdHealpixDepthMapVMPZ’,’dpdHealpixInfoMapVMPZ’, dpdSleDetectionOutput’, ‘dpdSleModelOutput’, ‘DpdSirCombinedSpectra’
- product_typestr, mandatory, default None
Available product types:
Euclid LE1 observations:
- VIS
DpdVisRawFrame: Vis Raw Frame Product
- NISP
DpdNispRawFrame: NISP Raw Frame Product
Euclid LE2 products:
- VIS
DpdVisCalibratedQuadFrame: VIS Calibrated Frame Product DpdVisCalibratedFrameCatalog: VIS Calibrated Frame Catalog DpdVisStackedFrame: Vis Stacked Frame Product - This product is not available in Q1 DpdVisStackedFrameCatalog: Vis Stacked Catalogue Product - This product is not available in Q1
- NIR
DpdNirCalibratedFrame: NIR Calibrated Frame DpdNirCalibratedFrameCatalog: NIR Calibrated Frame Catalog DpdNirStackedFrame: NIR Stacked Frame - This product is not available in Q1 DpdNirStackedFrameCatalog: NIR Stacked Frame Catalog - This product is not available in Q1
- MER
DpdMerSegmentationMap: Segmentation Map Product DpdMerBksMosaic: Background-Subtracted Mosaic Product dpdMerFinalCatalog: Final Catalog Product - We suggest to use ADQL to retrieve data from this dataset.
- PHZ - We suggest to use ADQL to retrieve data from these products.
dpdPhzPfOutputCatalog: PHZ PF output catalog product for weak lensing dpdPhzPfOutputForL3: PHZ PF output catalog product for LE3
- SPE - We suggest to use ADQL to retrieve data from this product.
dpdSpePfOutputCatalog: SPE PF output catalog product
- SHE - None of these product are available in Q1
dpdSheLensMcChains: Shear LensMc Chains dpdSheBiasParams: Shear Bias Parameters Data Product dpdSheLensMcFinalCatalog: Shear LensMc Final Catalog dpdSheLensMcRawCatalog: Shear LensMc Raw Catalog dpdSheMetaCalFinalCatalog: Shear MetaCal Final Catalog dpdSheMetaCalRawCatalog: Shear LensMc Raw Catalog
- VMPZ-ID
dpdHealpixBitMaskVMPZ: Input Product: Bit Mask Parameters dpdHealpixFootprintMaskVMPZ: Output Product: HEALPix Footprint Mask dpdHealpixCoverageVMPZ: Output Product: HEALPix Coverage Mask dpdHealpixDepthMapVMPZ: Input Product: Depth Maps Parameters dpdHealpixInfoMapVMPZ: Input Product: Information Map Parameters
- SLE - None of these product are available in Q1
dpdSleDetectionOutput: SLE Detection Output dpdSleModelOutput: SLE Model Output
- SIR
DpdSirCombinedSpectra: Combined Spectra Product - We suggest to use ADQL to retrieve data (spectra) from this dataset. dpdSirScienceFrame: Science Frame Product
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- The list of products (astropy.table)
- get_scientific_product_list(*, observation_id=None, tile_index=None, category=None, group=None, product_type=None, dataset_release='REGREPROC1_R2', verbose=False)[source]¶
Gets the LE3 products (the high-level science data products).
Please note that not all combinations of category, group, and product_type are valid. Check the available values in https://astroquery.readthedocs.io/en/latest/esa/euclid/euclid.html#appendix
- Parameters:
- observation_id: str, optional, default None.
It is not compatible with parameter tile_index.
- tile_index: str, optional, default None.
It is not compatible with parameter observation_id.
- category: str, optional, default None.
- groupstr, optional, default None
- product_typestr, optional, default None
- dataset_releasestr, mandatory. Default REGREPROC1_R2
Data release from which data should be taken.
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- The products in an astropy.table.Table
- get_spectrum(*, source_id, schema='sedm', retrieval_type='ALL', output_file=None, verbose=False)[source]¶
Downloads a spectrum with datalink.
The spectrum associated with the source_id is downloaded as a compressed fits file, and the files it contains are returned in a list. The compressed fits file is saved in the local path given by output_file. If this parameter is not set, the result is saved in the file “<working directory>/temp_<%Y%m%d_%H%M%S>/<source_id>.fits.zip”. In any case, the content of the zip file is automatically extracted.
- Parameters:
- source_idstr, mandatory, default None
source id for the spectrum
- schemastr, mandatory, default ‘sedm’
the data release
- retrieval_typestr, optional, default ‘ALL’ to retrieve all data from the list of sources
retrieval type identifier. Possible values are: ‘SPECTRA_BGS’ for the blue spectrum and ‘SPECTRA_RGS’ for the red one.
- output_filestr, optional
output file name. If no value is provided, a temporary one is created with the name “<working directory>/temp_<%Y%m%d_%H%M%S>/<source_id>.fits”
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- A list of files: the files contained in the downloaded compressed fits file. The format of the file is
- SPECTRA_<colour>-<schema> <source_id>.fits’, where <colour> is BGS or RGS, and <schema> and <source_id> are
- taken from the input parameters.
- get_status_messages(verbose=False)[source]¶
Retrieve the messages to inform users about the status of Euclid TAP
- Parameters:
- verbosebool, optional, default ‘False’
flag to display information about the process
- launch_job(query, *, name=None, dump_to_file=False, output_file=None, output_format='csv', verbose=False, upload_resource=None, upload_table_name=None)[source]¶
Launches a synchronous job
- Parameters:
- querystr, mandatory
query to be executed
- namestr, optional, default None
custom name defined by the user for the job that is going to be created
- dump_to_filebool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
- output_filestr, optional, default None
File name where the results are saved if dump_to_file is True. If this parameter is not provided, the job id is used instead
- output_formatstr, optional, default ‘csv’
output format for the output file
- verbosebool, optional, default ‘False’
flag to display information about the process
- upload_resource: str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
- upload_table_name: str, required if uploadResource is provided, default None
resource temporary table name associated to the uploaded resource
- Returns:
- A Job object
- launch_job_async(query, *, name=None, dump_to_file=False, output_file=None, output_format='csv', verbose=False, background=False, upload_resource=None, upload_table_name=None, autorun=True)[source]¶
Launches an asynchronous job
- Parameters:
- querystr, mandatory
query to be executed
- namestr, optional, default None
custom name defined by the user for the job that is going to be created
- dump_to_filebool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
- output_filestr, optional, default None
file name where the results are saved if dump_to_file is True. if this parameter is not provided, the jobid is used instead
- output_formatstr, optional, default ‘csv’
format of the results for the output file
- verbosebool, optional, default ‘False’
flag to display information about the process
- backgroundbool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
- upload_resource: str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
- upload_table_name: str, required if uploadResource is provided, default None
resource temporary table name associated to the uploaded resource
- autorunboolean, optional, default True
if ‘True’, sets ‘phase’ parameter to ‘RUN’, so the framework can start the job.
- Returns:
- A Job object
- login(*, user=None, password=None, credentials_file=None, verbose=False)[source]¶
Performs a login
User and password can be used or a file that contains username and password (2 lines: one for username and the following one for the password)
- Parameters:
- userstr, mandatory if ‘file’ is not provided, default None
login name
- passwordstr, mandatory if ‘file’ is not provided, default None
user password
- credentials_filestr, mandatory if no ‘user’ & ‘password’ are provided
file containing user and password in two lines
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- None
- login_gui(verbose=False)[source]¶
Performs a login using a GUI dialog
- Parameters:
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- None
- logout(verbose=False)[source]¶
Performs a logout
- Parameters:
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns:
- None
- query_object(coordinate, *, radius=None, width=None, height=None, async_job=False, verbose=False, columns=None)[source]¶
Searches for objects around a given position with the default catalog sascat_pvpr01.mer_final_cat_pvpr01
- Parameters:
- coordinateastropy.coordinate, mandatory
coordinates center point
- radiusastropy.units, required if no ‘width’ nor ‘height’ are provided
radius (deg)
- widthastropy.units, required if no ‘radius’ is provided
box width
- heightastropy.units, required if no ‘radius’ is provided
box height
- async_jobbool, optional, default ‘False’
executes the query (job) in asynchronous/synchronous mode (default synchronous)
- verbosebool, optional, default ‘False’
flag to display information about the process
- columns: list, optional, default None
if empty, all columns will be selected
- Returns:
- The job results (astropy.table)