astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- ESA EUCLID Archive (`astroquery.esa.euclid`) »
- EuclidClass

# 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)

  Bases: `TapPlus`

  Constructor for EuclidClass.

  Parameters:
    environment str, 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_handler tap connection handler object, optional, default None

      HTTP(s) connection hander (creator). If no handler is provided, a new one is created.

    datalink_handler dataliink connection handler object, optional, default None

      HTTP(s) connection hander (creator). If no handler is provided, a new one is created.

    cutout_handler cutout connection handler object, optional, default None

      HTTP(s) connection hander (creator). If no handler is provided, a new one is created.

    verbose bool, optional, default ‘True’

      flag to display information about the process

    show_server_messages bool, optional, default ‘True’

      show the messages to inform users about the status of Euclid TAP

  Attributes Summary

  `EUCLID_MESSAGES` | Proxy class to default TapPlus object (pointing to the Euclid archive)
  `ROW_LIMIT` |

  Methods Summary

  `cone_search`(coordinate, radius, *[, ...]) |
  `cross_match_basic`(*, ...[, ...]) | Performs a positional cross-match between the specified tables.
  `get_cutout`(*[, file_path, instrument, id, ...]) |
  `get_datalinks`(ids, *[, linking_parameter, ...]) | Gets datalinks associated to the provided identifiers TAP+ only
  `get_observation_products`(*[, id, schema, ...]) |
  `get_product`(*[, file_name, product_id, ...]) |
  `get_product_list`(*[, observation_id, ...]) |
  `get_scientific_product_list`(*[, ...]) | Gets the LE3 products (the high-level science data products).
  `get_spectrum`(*, source_id[, schema, ...]) |
  `get_status_messages`([verbose]) |
  `is_gz_file`(filepath) |
  `launch_job`(query, *[, name, dump_to_file, ...]) |
  `launch_job_async`(query, *[, name, ...]) |
  `login`(*[, user, password, credentials_file, ...]) |
  `login_gui`([verbose]) |
  `logout`([verbose]) |
  `query_object`(coordinate, *[, radius, width, ...]) |

  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)
    Parameters:
      coordinate astropy.coordinate, mandatory

        coordinates center point

      radius astropy.units, mandatory

        radius

      table_name str, optional, default the table defined for the selected environment

        Table to search

      ra_column_name str, optional, default the column name defined for the selected environment

        Name of the RA column in the table

      dec_column_name str, optional, default the column name defined for the selected environment

        Name of the DEC column in the table

      async_job bool, optional, default ‘False’

        executes the job in asynchronous/synchronous mode (default synchronous)

      background bool, 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_file bool, optional, default ‘False’

        if True, the results are saved in a file instead of using memory

      output_file str, 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_format str, optional, default ‘csv’

        Output format for the output file

      columns: list, optional, default None

        if empty, all columns will be selected

      verbose bool, 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)

    Performs a positional cross-match between the specified tables.

    This method carries out the following steps in one step:

    > 1. updates the user table metadata to flag the positional RA/Dec columns;

    > 2. launches a positional cross-match as an asynchronous query;

    > 3. 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 the `table_b_full_qualified_name` parameter. TAP+ only

    Parameters:
      table_a_full_qualified_name str, mandatory

        a full qualified table name (i.e. schema name and table name)

      table_a_column_ra str, mandatory

        the ‘ra’ column in the table table_a_full_qualified_name

      table_a_column_dec str, mandatory

        the ‘dec’ column in the table table_a_full_qualified_name

      table_b_full_qualified_name str, 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_ra str, 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_dec str, default the main_table_dec_column associated to the selected environment

        the ‘dec’ column in the table table_b_full_qualified_name

      results_name str, optional, default None

        custom name defined by the user for the job that is going to be created

      radius float (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.

      background bool, optional, default ‘False’

        when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available

      verbose bool, 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)
    Parameters:
      file_path str, mandatory, default None

        file path for the product on the server

      instrument str, mandatory, default None

        instrument for the product, can be ‘VIS’ or ‘NISP’

      id str, mandatory, default None

        the observation id or tile index for MER products

      coordinate astropy.coordinate, mandatory

        coordinates center point

      radius astropy.units, mandatory

        the radius of the cutout to generate

      output_file str, optional

        output file. If no value is provided, a temporary one is created

      verbose bool, 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', verbose=False)

    Gets datalinks associated to the provided identifiers TAP+ only

    Parameters:
      ids str, int, list of str or list of int, mandatory

        list of identifiers

      linking_parameter str, optional, default SOURCE_ID, valid values: SOURCE_ID

        By default, all the identifiers are considered as source_id

      verbose bool, 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)
    Parameters:
      id str, mandatory

        observation identifier (observation id for observations, mosaic id for mosaics)

      schema str, optional

        schema name. Default value is ‘sedm’.

      product_type str, mandatory, default None

        list only products of the given type. possible values: ‘observation’, ‘mosaic’

      product_subtype str, 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’.

      filter str, optional, default ‘VIS’

        list products for this instrument, only for observations. Possible values: ‘VIS’, ‘NIR_J’, ‘NIR_H’, ‘NIR_Y’

      output_file str, optional

        output file, use zip extension when downloading multiple files if no value is provided, a temporary one is created

      verbose bool, 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)
    Parameters:
      file_name str, 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_id str, optional, default None

        product id. More than one can be specified between comma. Either file_name or product_id is mandatory

      schema str, optional, default ‘sedm’

        the data release name (schema) in which the product should be searched

      output_file str, optional

        output file, use zip extension when downloading multiple files if no value is provided, a temporary one is created

      verbose bool, 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)
    Parameters:
      observation_id str, 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_index str, 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_type str, mandatory, default None

        Available product types:

        1. Euclid LE1 observations:

           > 1. VIS

           >      DpdVisRawFrame: Vis Raw Frame Product

           > 2. NISP

           >      DpdNispRawFrame: NISP Raw Frame Product

        2. Euclid LE2 products:

           > 1. 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

           > 2. 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

           > 3. 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.

           > 4. 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

           > 5. SPE - We suggest to use ADQL to retrieve data from this product.

           >      dpdSpePfOutputCatalog: SPE PF output catalog product

           > 6. 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

           > 7. 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

           > 8. SLE - None of these product are available in Q1

           >      dpdSleDetectionOutput: SLE Detection Output dpdSleModelOutput: SLE Model Output

           > 9. SIR

           >      DpdSirCombinedSpectra: Combined Spectra Product - We suggest to use ADQL to retrieve data (spectra) from this dataset. dpdSirScienceFrame: Science Frame Product

      verbose bool, 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)

    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.
      group str, optional, default None
      product_type str, optional, default None
      dataset_release str, mandatory. Default REGREPROC1_R2

        Data release from which data should be taken.

      verbose bool, 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)
    Parameters:
      source_id str, mandatory, default None

        source id for the spectrum

      schema str, mandatory, default ‘sedm’

        the data release

      retrieval_type str, 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_file str, 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”

      verbose bool, 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)
    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

  static is_gz_file(filepath)
  launch_job(query, *, name=None, dump_to_file=False, output_file=None, output_format='csv', verbose=False, upload_resource=None, upload_table_name=None)
    Parameters:
      query str, mandatory

        query to be executed

      name str, optional, default None

        custom name defined by the user for the job that is going to be created

      dump_to_file bool, optional, default ‘False’

        if True, the results are saved in a file instead of using memory

      output_file str, 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_format str, optional, default ‘csv’

        output format for the output file

      verbose bool, 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)
    Parameters:
      query str, mandatory

        query to be executed

      name str, optional, default None

        custom name defined by the user for the job that is going to be created

      dump_to_file bool, optional, default ‘False’

        if True, the results are saved in a file instead of using memory

      output_file str, 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_format str, optional, default ‘csv’

        format of the results for the output file

      verbose bool, optional, default ‘False’

        flag to display information about the process

      background bool, 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

      autorun boolean, 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)
    Parameters:
      user str, mandatory if ‘file’ is not provided, default None

        login name

      password str, mandatory if ‘file’ is not provided, default None

        user password

      credentials_file str, mandatory if no ‘user’ & ‘password’ are provided

        file containing user and password in two lines

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      None
  login_gui(verbose=False)
    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      None
  logout(verbose=False)
    Parameters:
      verbose bool, 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)
    Parameters:
      coordinate astropy.coordinate, mandatory

        coordinates center point

      radius astropy.units, required if no ‘width’ nor ‘height’ are provided

        radius (deg)

      width astropy.units, required if no ‘radius’ is provided

        box width

      height astropy.units, required if no ‘radius’ is provided

        box height

      async_job bool, optional, default ‘False’

        executes the query (job) in asynchronous/synchronous mode (default synchronous)

      verbose bool, 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)