cross_bones.unwise_align_catalogues

Attributes

Functions

_download_vizer_id_to_table(→ astropy.table.Table)

Internal method to download a Vizer catalogue around a region

_get_output_table_path(→ pathlib.Path)

Make the output table download path and perform some basic checks

add_offset_to_coords_skyframeoffset(...)

Add angular offsets to a SkyCoord object.

cli(→ None)

download_vizier_catalogue(→ astropy.table.Table)

Download tables from vizier given a catalogue ID and positions to query a region around.

get_offset_space(→ cross_bones.matching.OffsetGridSpace)

get_parser(→ argparse.ArgumentParser)

guess_sbid_and_field_racs(→ tuple[int, str])

Attempt to extract the SBID and field name from a file path.

unwise_shifts(, min_snr, min_iso, min_sources, ...)

Module Contents

cross_bones.unwise_align_catalogues._download_vizer_id_to_table(sky_coord_center: astropy.coordinates.SkyCoord, vizier_id: str, radius_deg: float, max_retries: int = 3) astropy.table.Table

Internal method to download a Vizer catalogue around a region

Parameters:
  • sky_coord_center (SkyCoord) – The position to center the region on

  • vizier_id (str) – The Vizer ID of the catalogue to download

  • radius_deg (float) – Radius to obtain data through

  • max_retries (int, optional) – The maximum number of attempts to download a table before a RunTimeError is raised

Raises:

RuntimeError – Raised when multiple attempts to download the table has failed

Returns:

The downloaded table

Return type:

Table

cross_bones.unwise_align_catalogues._get_output_table_path(output_dir: pathlib.Path | str, output_name: str, name_prefix: str | None = None) pathlib.Path

Make the output table download path and perform some basic checks

cross_bones.unwise_align_catalogues.add_offset_to_coords_skyframeoffset(sky_coords: astropy.coordinates.SkyCoord, offset: tuple[float, float]) astropy.coordinates.SkyCoord

Add angular offsets to a SkyCoord object.

Parameters:
  • sky_coords (SkyCoord) – The input positions that will be shifted

  • offset (tuple[float, float]) – The delta RA and Dec units

Returns:

The shifted units

Return type:

SkyCoord

cross_bones.unwise_align_catalogues.cli() None
cross_bones.unwise_align_catalogues.download_vizier_catalogue(field_name: str, beam_skycoords: list[astropy.coordinates.SkyCoord], radius_deg: float = 5.0, unwise_table_location: str | pathlib.Path = './', vizier_id: str = 'II/363/unwise', vizier_table_prefix: str | None = None) astropy.table.Table

Download tables from vizier given a catalogue ID and positions to query a region around. The tables will be concatenated together, removed of duplicates and returned.

Parameters:
  • field_name (str) – The field name of the region being downloaded.

  • beam_skycoords (list[SkyCoord]) – A collection of coordinates defining a region

  • radius_deg (float, optional) – The size of the region to download. Defaults to 5.0.

  • unwise_table_location (str | Path, optional) – Location of the path of the output table. Defaults to “./”.

  • vizier_id (str, optional) – The vizier catalogue ID to download. Defaults to “II/363/unwise”.

Returns:

_description_

Return type:

Table

cross_bones.unwise_align_catalogues.get_offset_space(catalogue: cross_bones.catalogue.Catalogue, unwise_table: astropy.table.Table, window: tuple[float, float, float, float, float], beam: int | None = None) cross_bones.matching.OffsetGridSpace
cross_bones.unwise_align_catalogues.get_parser() argparse.ArgumentParser
cross_bones.unwise_align_catalogues.guess_sbid_and_field_racs(catalogue_path: str | pathlib.Path) tuple[int, str]

Attempt to extract the SBID and field name from a file path. The filenames assumes some deliminted name scheme, with ‘.’ as the field marker.

The field name is the second item, and it taken as it. The SBID is taken as the first field, and requires a ‘SB’ prefix.

Parameters:

catalogue_path (str | Path) – The file path to extract

Raises:

RuntimeError – Raised when a path does not follow expectations

Returns:

And SBID and field name

Return type:

tuple[int, str]

cross_bones.unwise_align_catalogues.unwise_shifts(catalogue_paths: Paths, table_keys: cross_bones.catalogue.TableKeys, output_prefix: str | None = None, sbid: int | None = None, field_name: str | None = None, beam_table: str = 'closepack36_beams.fits', unwise_table_location: pathlib.Path = Path('./'), min_snr: float = 10.0, min_iso: float = 36.0, min_sources: int = 1, window_iter: int = 7, window_inc: float = 4.0, window_width: float = 25.0, window_delta: float = 5.0, plot_all_windows: bool = False, fill_value: float = np.nan) pathlib.Path
cross_bones.unwise_align_catalogues.MatchMatrix: typing_extensions.TypeAlias
cross_bones.unwise_align_catalogues.Paths