flint.summary¶
Summary containers intended to hold general information obtained throughout a processing run.
Classes¶
Structure intended to collect components from a measurement set |
|
The main information about a processed field. This structure is |
Functions¶
|
Helper to get the appropriate pol_axis out of a MS. Prioritises the instrumental third-axis imprinted from fixms |
|
Extract the path of the linmos fits image from the LinmosResult |
|
Obtain a MSSummary instance to add to a FieldSummary |
|
Add information derived from an RMS image and component catalogue |
|
Create a summary of a beam |
|
Create a field summary object using a measurement set. |
|
Update an existing FieldSummary instance with additional information. |
Module Contents¶
- class flint.summary.BeamSummary[source]¶
Bases:
NamedTupleStructure intended to collect components from a measurement set as it is being processed through a continuum imaging pipeline
- with_options(**kwargs) BeamSummary[source]¶
- components: flint.source_finding.aegean.AegeanOutputs | None = None[source]¶
The source finding components from the aegean source finder
- image_set: flint.imager.wsclean.ImageSet | None = None[source]¶
A set of images that have been created from the measurement set represented by summary
- ms_summary: flint.ms.MSSummary[source]¶
A summary object of a measurement set
- class flint.summary.FieldSummary[source]¶
Bases:
NamedTupleThe main information about a processed field. This structure is intended to store critical components that might be accumulated throughout processing of a pipeline, and may be most useful when data-products are zipped (or removed) throughout. Its intended usage is to hold key components that might be used in stages like validation plotting. It is not intended to become a catch-all to replace passing through items into functions directly.
There are known issues around serialising astropy units within a dask/prefect environment, for example: https://github.com/astropy/astropy/issues/11317, This could become important if an instance of this object is exchanged between many prefect or dask like delayed tasks. Ye be warned.
- with_options(**kwargs) FieldSummary[source]¶
- beam_summaries: list[BeamSummary] | None = None[source]¶
Summary information from each beam. Contains MSSummary, ImageSet and other information.
- centre: astropy.coordinates.SkyCoord | None = None[source]¶
Centre of the field, which is calculated as the mean position of all phase directions of the mss measurement sets
- location: astropy.coordinates.EarthLocation | None = None[source]¶
The location of the telescope stored as (X,Y,Z) in meters
- ms_summaries: tuple[flint.ms.MSSummary, Ellipsis] | None = None[source]¶
Summaries of measurement sets used in the processing of the filed
- flint.summary._get_pol_axis_as_rad(ms: flint.ms.MS | pathlib.Path) float[source]¶
Helper to get the appropriate pol_axis out of a MS. Prioritises the instrumental third-axis imprinted from fixms
- flint.summary.add_linmos_fits_image(field_summary: FieldSummary, linmos_command: flint.coadd.linmos.LinmosResult) FieldSummary[source]¶
Extract the path of the linmos fits image from the LinmosResult the co-added the field
- Parameters:
field_summary (FieldSummary) – Existing field summary to update
linmos_command (LinmosResult) – Instance of a completed linmos command that coadded a field
- Returns:
The updated field summary object with the linmos fits image added
- Return type:
- flint.summary.add_ms_summaries(field_summary: FieldSummary, mss: list[flint.ms.MS]) FieldSummary[source]¶
Obtain a MSSummary instance to add to a FieldSummary
Quantities derived from the field centre (hour angles, elevations) are also calculated. The field centre position is estimated by taking the mean position of all phase directions.
See flint.utils.estimate_skycoord_centre
- Parameters:
field_summary (FieldSummary) – Existing field summary object to update
mss (List[MS]) – Set of measurement sets to describe
- Returns:
Results from the inspected set of measurement sets
- Return type:
Tuple[MSSummary]
- flint.summary.add_rms_information(field_summary: FieldSummary, aegean_outputs: flint.source_finding.aegean.AegeanOutputs) FieldSummary[source]¶
Add information derived from an RMS image and component catalogue to an existing FieldSummary instance. Some properteries, such as the center position, number of components etc, are taken directly from source finder products.
On the center position – there is not (at the moment) a simple way of getting the center position of a field. So the image itself is used to grab it.
Other properties that require components of a measurement set, including the time and position, are also derived using existing fields which are created when a new instance is made.
- Parameters:
field_summary (FieldSummary) – Existing field summary object to update
aegean_outputs (AegeanOutputs) – Products of a source finding run
- Returns:
Updated field summary object
- Return type:
- flint.summary.create_beam_summary(ms: flint.ms.MS | pathlib.Path, image_set: flint.imager.wsclean.ImageSet | flint.imager.wsclean.WSCleanResult | None = None, components: flint.source_finding.aegean.AegeanOutputs | None = None) BeamSummary[source]¶
Create a summary of a beam
- Parameters:
ms (Union[MS, Path]) – The measurement set being considered
image_set (Optional[ImageSet], optional) – Images produced from an imager. Defaults to None.
components (Optional[AegeanOutputs], optional) – Source finding output components. Defaults to None.
- Returns:
Summary object of a beam
- Return type:
- flint.summary.create_field_summary(mss: list[flint.ms.MS | pathlib.Path], cal_sbid_path: pathlib.Path | None = None, holography_path: pathlib.Path | None = None, aegean_outputs: flint.source_finding.aegean.AegeanOutputs | None = None, **kwargs) FieldSummary[source]¶
Create a field summary object using a measurement set.
All other keyword arguments are passed directly through to FieldSummary
- Parameters:
ms (Union[MS, Path]) – Measurement set information will be pulled from
cal_sbid_path (Optional[Path], optional) – Path to an example of a bandpass measurement set. Defaults to None.
holography_path (Optional[Path], optional) – The holography fits cube used (or will be) to linmos. Defaults to None.
aegean_outputs (Optional[AegeanOutputs], optional) – Should RMS / source information be added to the instance. Defaults to None.
mss (Optional[Collection[MS]], optionals) – Set of measurement sets to describe
- Returns:
A summary of a field
- Return type:
- flint.summary.update_field_summary(field_summary: FieldSummary, aegean_outputs: flint.source_finding.aegean.AegeanOutputs | None = None, mss: list[flint.ms.MS] | None = None, linmos_command: flint.coadd.linmos.LinmosResult | None = None, **kwargs) FieldSummary[source]¶
Update an existing FieldSummary instance with additional information.
If special steps are required to be carried out based on a known input they will be. Otherwise all additional keyword arguments are passed through to the FieldSummary.with_options.
- Parameters:
field_summary (FieldSummary) – Field summary object to update
aegean_outputs (Optional[AegeanOutputs], optional) – Will add RMS and aegean related properties. Defaults to None.
mss (Optional[Collection[MS]], optionals) – Set of measurement sets to describe
linmos_command (Optional[LinmosResult], optional) – The linmos command created when co-adding all beam images together
- Returns:
An updated field summary objects
- Return type: