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¶
|
Extract the path of the linmos fits image from the LinmosResult |
|
Obtain a MSSummary instance to add to a FieldSummary. If existing |
|
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(/, **data: Any)[source]¶
Bases:
capn_crunch.BaseOptionsStructure intended to collect components from a measurement set as it is being processed through a continuum imaging pipeline
- components: flint.source_finding.aegean.AegeanOutputs | None = None[source]¶
The source finding components from the aegean source finder
- image_set: flint.imageset.ImageSet | None = None[source]¶
A set of images that have been created from the measurement set represented by summary
- class flint.summary.FieldSummary(/, **data: Any)[source]¶
Bases:
capn_crunch.BaseOptionsThe 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.
- 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, ...] | None = None[source]¶
Summaries of measurement sets used in the processing of the filed
- 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] | None = None, ms_summaries: list[flint.ms.MSSummary] | None = None) FieldSummary[source]¶
Obtain a MSSummary instance to add to a FieldSummary. If existing
MSSummaryinstances are provided than the internal creation will be skipped.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
ms_summaries (list[MSSumarry] | None, optional) – Precomputed
MSSummaryobjects. Defaults to None.
- Returns:
The updated field summary object with addition information from individual MS objects
- Return type:
- 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 | None = None, image_set: flint.imageset.ImageSet | flint.imager.wsclean.WSCleanResult | None = None, components: flint.source_finding.aegean.AegeanOutputs | None = None, ms_summary: flint.ms.MSSummary | None = None) BeamSummary[source]¶
Create a summary of a beam
- Parameters:
ms (MS | Path | None, optional) – The measurement set being considered and used to generate a summary object. Defaults to None.
image_set (Optional[ImageSet], optional) – Images produced from an imager. Defaults to None.
components (Optional[AegeanOutputs], optional) – Source finding output components. Defaults to None.
ms_summary (MSSummary | None, optional) – A precomputed summary object. This should be specified if
msis None. Defaults to None.
- Raises:
ValueError – Raised when both column and ms.column are None.
- Returns:
Summary object of a beam
- Return type:
- flint.summary.create_field_summary(mss: list[flint.ms.MS | pathlib.Path] | None = None, cal_sbid_path: pathlib.Path | None = None, holography_path: pathlib.Path | None = None, aegean_outputs: flint.source_finding.aegean.AegeanOutputs | None = None, ms_summaries: list[flint.ms.MSSummary] | None = None, **kwargs) FieldSummary[source]¶
Create a field summary object using a measurement set.
If a set of
MSSummaryinstances are provided then the (sometimes costly) process to compute theMSSummaryobjects internally will be skipped.All other keyword arguments are passed directly through to FieldSummary
- Parameters:
mss (Union[MS, Path | None, optional]) – Set of measurement sets to describe/ The first will be used to set information will be pulled from. If
Noneinformation is drawn fromms_summaries. Defaults to None.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.
ms_summaries (list[MSSummary] | None, optional) – Pre-computed MSSummary objects for each of the input mss. Defaults to None.
- 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: