shapepipe.modules.match_external_package.match_external

shapepipe.modules.match_external_package.match_external

MATCH EXTERNAL.

This module matches an external catalogue to a ShapePipe (SExtractor) catalogue.

Authors

Martin Kilbinger, Xavier Jimenez

get_cat(path)[source]

Get Catalogue.

Open a FITS catalogue.

Parameters

path (str) – Path to catalogue

Returns

Open FITS catalogue object

Return type

file_io.FITSCatalogue

get_data(path, hdu_no)[source]

Get Data.

Extract data from a given catalogue HDU.

Parameters
  • path (str) – Path to catalogue

  • hdu_no (int) – HDU number

Returns

Data, column names and extension names

Return type

tuple

get_ra_dec(data, col_ra, col_dec)[source]

Get RA and Dec.

Get RA and Dec from input data array.

Parameters
  • data (numpy.ndarray) – Input data array

  • col_ra (int) – Column number for RA

  • col_dec (int) – Column number for Dec

Returns

RA and Dec values

Return type

tuple

class MatchCats(input_file_list, output_path, w_log, tolerance, col_match, hdu_no, mode, external_cat_path, external_col_match, external_col_copy, external_hdu_no=1, mark_non_matched=None, output_distance=False)[source]

Bases: object

Match Catalogues.

Parameters
  • input_file_list (list) – List of input catalogue paths to be pasted

  • output_path (str) – Output file path of pasted catalogue

  • w_log (logging.Logger) – Logging instance

  • tolerance (astropy.units.quantity.Quantity) – Tolerance in arcsec

  • col_match (list) – (Internal data) column name(s) to copy into matched output catalogue

  • hdu_no (int) – (Internal) catalogue HDU number

  • mode (str) – Run mode, CLASSIC or MULTI-EPOCH

  • external_cat_path (str) – External catalogue path

  • external_col_match (list) – External data column name(s) for matching

  • external_col_copy (list) – Column name(s) to copy into matched output catalogue

  • external_hdu_no (int, optional) – External catalogue hdu number, default is 1

  • mark_non_matched (float, optional) – If not None, output not only matched but all objects, and mark non-matched objects with this value

  • output_distance (bool, optional) – Output distance between matches if True, default is False

process()[source]

Process.

Process catalogues.