cutout_fits.casda

Functions

casda_login(→ astroquery.casda.core.CasdaClass)

Login to CASDA.

cutout_from_casda(→ astropy.io.fits.HDUList)

Stage a file on CASDA and make a cutout.

get_casda_parser(→ argparse.ArgumentParser)

get_cutouts_from_casda(→ list[astropy.io.fits.HDUList])

Get cutouts from CASDA.

get_download_url(→ str)

Get the download URL for a file on CASDA.

get_staging_url(→ astropy.table.Table)

Get the staging URL for a file on CASDA.

main(→ None)

CLI

Module Contents

cutout_fits.casda.casda_login(username: str | None = None, store_password: bool = False, reenter_password: bool = False) astroquery.casda.core.CasdaClass

Login to CASDA.

Parameters:
  • username (str | None, optional) – CASDA username. Defaults to None.

  • store_password (bool, optional) – Stores the password securely in your keyring. Defaults to False.

  • reenter_password (bool, optional) – Asks for the password even if it is already stored in the keyring. This is the way to overwrite an already stored passwork on the keyring. Defaults to False.

Returns:

CASDA class

Return type:

CasdaClass

async cutout_fits.casda.cutout_from_casda(casda: astroquery.casda.core.CasdaClass, file_name: str, ra_deg: float, dec_deg: float, radius_arcmin: float, output_dir: pathlib.Path, freq_start_hz: float | None = None, freq_end_hz: float | None = None) astropy.io.fits.HDUList

Stage a file on CASDA and make a cutout.

Parameters:
  • casda (CasdaClass) – CASDA class

  • file_name (str) – File name to search for

  • ra_deg (float) – Centre RA in degrees

  • dec_deg (float) – Centre Dec in degrees

  • radius_arcmin (float) – Cutout radius in arcminutes

  • output_dir (Path) – Directory to save FITS cutouts

  • freq_start_hz (float | None, optional) – Starting frequency in Hz. Defaults to None.

  • freq_end_hz (float | None, optional) – Stopping frequency in Hz. Defaults to None.

Returns:

FITS HDU list

Return type:

fits.HDUList

cutout_fits.casda.get_casda_parser(parent_parser: bool = False) argparse.ArgumentParser
async cutout_fits.casda.get_cutouts_from_casda(file_name_list: list[str], ra_deg: float, dec_deg: float, radius_arcmin: float, output_dir: pathlib.Path | None = None, username: str | None = None, freq_start_hz: float | None = None, freq_end_hz: float | None = None, store_password: bool = False, reenter_password: bool = False) list[astropy.io.fits.HDUList]

Get cutouts from CASDA.

Parameters:
  • file_name_list (list[str]) – File name(s) to search for

  • ra_deg (float) – Centre RA in degrees

  • dec_deg (float) – Centre Dec in degrees

  • radius_arcmin (float) – Cutout radius in arcminutes

  • output_dir (Path | None, optional) – Output directory. Defaults to None.

  • username (str | None, optional) – CASDA username. Defaults to None.

  • freq_start_hz (float | None, optional) – Starting frequency in Hz. Defaults to None.

  • freq_end_hz (float | None, optional) – Stopping frequnecy in Hz. Defaults to None.

  • store_password (bool, optional) – Store CASDA password. Defaults to False.

  • reenter_password (bool, optional) – Force CASDA password prompt. Defaults to False.

Returns:

List of FITS HDU lists

Return type:

list[fits.HDUList]

async cutout_fits.casda.get_download_url(result_table: astropy.table.Table, casda: astroquery.casda.core.CasdaClass) str

Get the download URL for a file on CASDA.

Parameters:
  • result_table (Table) – Table of results

  • casda (CasdaClass) – CASDA class

Raises:
Returns:

Download URL

Return type:

str

async cutout_fits.casda.get_staging_url(file_name: str) astropy.table.Table

Get the staging URL for a file on CASDA.

Parameters:

file_name (str) – File name to search for

Raises:

ValueError – If no results are found

Returns:

Table of results

Return type:

Table

cutout_fits.casda.main() None

CLI