flint.bandpass¶
Procedure to calibrate bandpass observation
Functions¶
|
Entry point to extract the appropriate field from a bandpass observation, |
|
|
|
The typical bandpass style observation in ASKAP will shift each beam |
|
The typical bandpass style observation in ASKAP will shift each beam |
|
|
|
Plot solutions for AO-style solutions |
Module Contents¶
- flint.bandpass.calibrate_bandpass(ms_path: pathlib.Path, data_column: str, mode: str, calibrate_container: pathlib.Path, plot: bool = True, aoflagger_container: pathlib.Path | None = None, ms_out_dir: pathlib.Path | None = None) flint.options.MS[source]¶
Entry point to extract the appropriate field from a bandpass observation, run AO-style calibrate, and plot results. In its current form a new measurement set will be created container just the appropriate field to calibrate.
- Parameters:
ms_path (Path) – Path the the measurement set containing bandpass observations of B1934-638
data_column (str) – The column that will be calibrated.
mode (str) – The calibration approach to use. Currently only calibrate is supported.
calibrate_container (Path) – The path to the singularity container that holds the appropriate software.
plot (bool, optional) – Whether plotting should be performed. Defaults to True.
aoflagger_container (Path) – The path to the singularity container that holds aoflagger. If this is not None that flagging will be performed on the extracted field-specific measurement set.
ms_out_dir (Optional[Path], optional) – If not None, place the split field measurement sets into this directory. Defaults to None.
- Returns:
The calibrated measurement set with nominated column
- Return type:
- flint.bandpass.extract_correct_bandpass_pointing(ms: flint.options.MS | pathlib.Path, source_name_prefix: str = 'B1934-638', ms_out_dir: pathlib.Path | None = None) flint.options.MS[source]¶
The typical bandpass style observation in ASKAP will shift each beam so that it is centred on the bandpass-calibration object (here B1934-638). During each offset position all beams are recording data still. The trick here is that all 36 fields are still recorded in the measurement set, and are generally of the form:
>>> ['B1934-638_beam0', 'B1934-638_beam1', 'B1934-638_beam10', 'B1934-638_beam11', >>> 'B1934-638_beam12', 'B1934-638_beam13', 'B1934-638_beam14', 'B1934-638_beam15', >>> 'B1934-638_beam16', 'B1934-638_beam17', 'B1934-638_beam18', 'B1934-638_beam19', >>> 'B1934-638_beam2', 'B1934-638_beam20', 'B1934-638_beam21', 'B1934-638_beam22', >>> 'B1934-638_beam23', 'B1934-638_beam24', 'B1934-638_beam25', 'B1934-638_beam26', >>> 'B1934-638_beam27', 'B1934-638_beam28', 'B1934-638_beam29', 'B1934-638_beam3', >>> 'B1934-638_beam30', 'B1934-638_beam31', 'B1934-638_beam32', 'B1934-638_beam33', >>> 'B1934-638_beam34', 'B1934-638_beam35', 'B1934-638_beam4', 'B1934-638_beam5', >>> 'B1934-638_beam6', 'B1934-638_beam7', 'B1934-638_beam8', 'B1934-638_beam9']
This function will attempt to deduce the intended field name for the beam in question, and then create a new measurement set with just these data. It internally uses taql to create a selection statement:
>>> with table(ms_path) as tab: >>> sub_ms = taql("select * from $tab where FIELD_ID==field_idx") >>> sub_ms.copy(out_path, deep=True)
Therefore, some properties from other tables (e.g. FIELDS) may still contain references to other fields.
- Parameters:
ms (Union[MS, Path]) – Path or instance of MS describing the measurement set to flag all other bandpass field.
source_name_prefix (str, optional) – The beginning of the source name stored in the NAME column of the FIELD table. Field names are of the form B1934-638_beam1, where B1934-638 would be the prefix name, and beam is constructed based on the beam among the 36 observing the target source (for example).
ms_out_dir (Optional[Path], optional) – If not None, place the split field measurement sets into this directory. Defaults to None.
- Returns:
A description of the new measurement set created with the file name ending .beamN.ms.
- Return type:
- flint.bandpass.flag_bandpass_offset_pointings(ms: flint.options.MS | pathlib.Path) flint.options.MS[source]¶
The typical bandpass style observation in ASKAP will shift each beam so that it is centred on the bandpass-calibration object (here B1934-638). During each offset position all beams are recording data still. The trick here is that all 36 fields are still recorded in the measurement set, and are generally of the form:
>>> ['B1934-638_beam0', 'B1934-638_beam1', 'B1934-638_beam10', 'B1934-638_beam11', >>> 'B1934-638_beam12', 'B1934-638_beam13', 'B1934-638_beam14', 'B1934-638_beam15', >>> 'B1934-638_beam16', 'B1934-638_beam17', 'B1934-638_beam18', 'B1934-638_beam19', >>> 'B1934-638_beam2', 'B1934-638_beam20', 'B1934-638_beam21', 'B1934-638_beam22', >>> 'B1934-638_beam23', 'B1934-638_beam24', 'B1934-638_beam25', 'B1934-638_beam26', >>> 'B1934-638_beam27', 'B1934-638_beam28', 'B1934-638_beam29', 'B1934-638_beam3', >>> 'B1934-638_beam30', 'B1934-638_beam31', 'B1934-638_beam32', 'B1934-638_beam33', >>> 'B1934-638_beam34', 'B1934-638_beam35', 'B1934-638_beam4', 'B1934-638_beam5', >>> 'B1934-638_beam6', 'B1934-638_beam7', 'B1934-638_beam8', 'B1934-638_beam9']
This function will attempt to deduce the intended field name for the beam in question, and then flag all other fields.
- flint.bandpass.plot_solutions(solutions_path: pathlib.Path, ref_ant: int | None = 0) None[source]¶
Plot solutions for AO-style solutions
- Parameters:
solutions_path (Path) – Path to the solutions file
ref_ant (Optional[int], optional) – Reference antenna to use. If None is specified there is no division by a reference antenna. Defaults to 0.