Source Finding¶
Current in flint the aegeantools package is the only source finder supported. Even so, it is only used through a container as a CLI callable and not directly accessed via its private API.
There are two reasons where aegeantools is currently used:
1 - background and noise maps 2 - slim source finding
Background and noise estimation¶
There are weak links to the BANE program packaged in aegeantools. The computation of the bkg and rms maps through a rolling sigma-clipping boxcar function produces reliable and easily accessible direction-dependent diagnostics. In early versions of flint these were used as the basis of our clean mask creation routines. The rms map is also used when creating a summary field figure.
We note that in the latest version of aegeantools that there is an ongoing bug that can lead to a deadlock issue. For these reason we only expose the cores argument and have logic to ensure that the stripes BANE parameters it always one less than this.
class BANEOptions(BaseOptions):
"""Container for basic BANE related options. Only a subclass of BANE options are supported."""
grid_size: tuple[int, int] | None = (16, 16)
"""The step interval of each box, in pixels"""
box_size: tuple[int, int] | None = (196, 196)
"""The size of the box in pixels"""
cores: int = 12
"""Number of cores to use. The number of stripes will be less than this number."""
flint_use_fft: bool = False
"""Use flint's FFT BANE (``flint.bane``) instead of the container's BANE, rejecting pixels beyond 3 sigma as BANE does and with a tophat kernel for its box. ``grid_size`` and ``box_size`` are translated to it, with the step capped at 4, and ``cores`` is not used"""
Source finding¶
Flint offers the aegean source finding tool to be executed after BANE has been invoked. These two tools will always run sequentially. A limited set of aegean options have been exposed.
Importantly the intention here is to obtain a set of diagnostic results with minimal computation. The AegeanOptions exposed correspond to equivalent aegean CLI arguments. Do not that the default value of noconv is True – this mode does not handle the correlation of adjacent pixels.
class AegeanOptions(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.
"""
nocov: bool = True
"""Whether aegean should attempt to model the co-variance of pixels. If true aegean does not. """
maxsummits: int = 4
"""The maximum number of components an island is allowed to have before it is ignored. """
autoload: bool = True
"""Attempt to load precomputed background and rms maps. """
Caution
The flint_aegean CLI will append options from both BANEOptions and AegeanOptions, and craft instances of these objects automatically. The default type of nocon and autoload will be translated to store_false options in argparse.ArgumentParser. If you want to use the quick version of aegean do not pass --noconv to the flint_aegean find CLI call.
Accessing via the CLI¶
The primary entry point for the source finding with aegean in flint is via flint_aegean:
A basic interface into aegean source finding routines.
usage: flint_aegean [-h] {find} ...
Positional Arguments¶
- mode
Possible choices: find
Sub-commands¶
find¶
Run BANE with default options.
flint_aegean find [-h] [--grid-size GRID_SIZE GRID_SIZE]
[--box-size BOX_SIZE BOX_SIZE] [--cores CORES]
[--flint-use-fft] [--nocov] [--maxsummits MAXSUMMITS]
[--autoload]
image container
Positional Arguments¶
- image
The image that BANE will process
- container
Path to container with AegeanTools
Inputs for BANEOptions¶
- --grid-size
The step interval of each box, in pixels
Default:
(16, 16)- --box-size
The size of the box in pixels
Default:
(196, 196)- --cores
Number of cores to use. The number of stripes will be less than this number.
Default:
12- --flint-use-fft
Use flint’s FFT BANE (
flint.bane) instead of the container’s BANE, rejecting pixels beyond 3 sigma as BANE does and with a tophat kernel for its box.grid_sizeandbox_sizeare translated to it, with the step capped at 4, andcoresis not usedDefault:
False
Inputs for AegeanOptions¶
- --nocov
Whether aegean should attempt to model the co-variance of pixels. If true aegean does not.
Default:
True- --maxsummits
The maximum number of components an island is allowed to have before it is ignored.
Default:
4- --autoload
Attempt to load precomputed background and rms maps.
Default:
True