flint.source_finding.aegean

A basic interface into aegean source finding routines.

Classes

AegeanOptions

Container for basic aegean options. Only a subclass of aegean options are supported.

AegeanOutputs

Somple structure to represent output aegean products

BANEOptions

Container for basic BANE related options. Only a subclass of BANE options are supported.

Functions

_bane_output_callback(→ None)

Callback handler for the BANE program. Will raise an error

_get_aegean_command(→ str)

Create the aegean command to run

_get_bane_command(→ str)

Create the BANE command to run

cli(→ None)

get_parser(→ argparse.ArgumentParser)

run_bane_and_aegean(→ AegeanOutputs)

Run BANE, the background and noise estimator, and aegean, the source finder,

Module Contents

class flint.source_finding.aegean.AegeanOptions(/, **data: Any)[source]

Bases: flint.options.BaseOptions

Container for basic aegean options. Only a subclass of aegean options are supported.

Of note is the lack of a tables option (corresponding to –tables). This is dependent on knowing the base output name and relying on aegean to also append a suffix of sorts to the outputs. For that reason the aegean command generated will always create the table option.

autoload: bool = True[source]

Attempt to load precomputed background and rms maps.

maxsummits: int = 4[source]

The maximum number of components an island is allowed to have before it is ignored.

nocov: bool = True[source]

Whether aegean should attempt to model the co-variance of pixels. If true aegean does not.

class flint.source_finding.aegean.AegeanOutputs[source]

Bases: NamedTuple

Somple structure to represent output aegean products

beam_shape: tuple[float, float, float][source]

The BMAJ, BMIN and BPA that were stored in the image header that Aegen searched

bkg: pathlib.Path[source]

Background map created by BANE

comp: pathlib.Path[source]

Source component catalogue created by Aegean

image: pathlib.Path[source]

The input image that was used to source find against

rms: pathlib.Path[source]

RMS map created by BANE

class flint.source_finding.aegean.BANEOptions(/, **data: Any)[source]

Bases: flint.options.BaseOptions

Container for basic BANE related options. Only a subclass of BANE options are supported.

box_size: tuple[int, int] | None = (196, 196)[source]

The size of the box in pixels

cores: int = 12[source]

Number of cores to use. The number of stripes will be less than this number.

grid_size: tuple[int, int] | None = (16, 16)[source]

The step interval of each box, in pixels

flint.source_finding.aegean._bane_output_callback(line: str) None[source]

Callback handler for the BANE program. Will raise an error on the ‘deadlock’ issue.

flint.source_finding.aegean._get_aegean_command(image: pathlib.Path, base_output: str, aegean_options: AegeanOptions) str[source]

Create the aegean command to run

flint.source_finding.aegean._get_bane_command(image: pathlib.Path, bane_options: BANEOptions) str[source]

Create the BANE command to run

flint.source_finding.aegean.cli() None[source]
flint.source_finding.aegean.get_parser() argparse.ArgumentParser[source]
flint.source_finding.aegean.run_bane_and_aegean(image: pathlib.Path, aegean_container: pathlib.Path, bane_options: BANEOptions | None = None, aegean_options: AegeanOptions | None = None, update_bane_options: dict[str, Any] | None = None, update_aegean_options: dict[str, Any] | None = None) AegeanOutputs[source]

Run BANE, the background and noise estimator, and aegean, the source finder, against an input image. This function attempts to hook into the AegeanTools module directly, which does not work with dask daemon processes.

Parameters:
  • image (Path) – The input image that BANE will calculate a background and RMS map for

  • aegean_container (Path) – Path to a singularity container that was the AegeanTools packages installed.

  • bane_options (Optional[BANEOptions], optional) – The options that are provided to BANE. If None defaults of BANEOptions are used. Defaults to None.

  • aegean_options (Optional[AegeanOptions], optional) – The options that are provided to Aegean. if None defaults of AegeanOptions are used. Defaults to None.

  • update_bane_options (dict[str, Any] | None, optional) – Over-ride any default options of BANEOptions. If None defaults are used. Defaults to None.

  • update_aegean_options (dict[str, Any] | None, optional) – Over-ride any default options of AegeanOptions. If None defaults are used. Defaults to None.

Returns:

The newly created BANE products

Return type:

AegeanOutputs