flint.predict.crystalball ========================= .. py:module:: flint.predict.crystalball .. autoapi-nested-parse:: Items in and out the model visibility prediction using the `crystalball` python package. Classes ------- .. autoapisummary:: flint.predict.crystalball.CrystalBallOptions Functions --------- .. autoapisummary:: flint.predict.crystalball.cli flint.predict.crystalball.crystalball_predict flint.predict.crystalball.get_parser Module Contents --------------- .. py:class:: CrystalBallOptions(/, **data: Any) Bases: :py:obj:`flint.options.BaseOptions` Options related to running crystal ball .. py:attribute:: crystallball_wsclean_pol_mode :type: list[str] :value: ['i'] The polarisation of the wsclean model that was generated .. py:attribute:: memory_fraction :type: float :value: 0.75 The fraction of available memory to use to define the target chunk size .. py:attribute:: model_chunks :type: int :value: 0 Number of sky model components that are processed in a single chunk. If 0 it will be set automatically. Default is 0. .. py:attribute:: row_chunks :type: int :value: 0 Number of rows of input MS that are processed in a single chunk. If 0 it will be set automatically. Default is 0. .. py:function:: cli() -> None .. py:function:: crystalball_predict(ms: flint.ms.MS, crystalball_options: CrystalBallOptions, wsclean_source_list_path: pathlib.Path | None = None, dask_client: dask.distributed.Client | None = None, output_column: str = 'MODEL_DATA', update_crystalball_options: dict[str, Any] | None = None) -> flint.ms.MS A very simply wrapper around the `Crystalball.predict` function. Basic checks to ensure that the BB6 style source model path exists, which is the format used by the `wsclean -save-source-list` option. If no `wsclean_source_list_path` is specified one is guess from the name of the input MS.path. :param ms: The MS instance whose path is to the measurement set to predict into. :type ms: MS :param crystalball_options: Options that control the `crystalball.predict` call. :type crystalball_options: CrystalBallOptions :param wsclean_source_list_path: The path to the file with the model components to predict. If None an attempt is made to find it from the MS. Defaults to None. :type wsclean_source_list_path: Path | None, optional :param dask_client: A specialised Dask distributed task. If None one is created by `crystalball`. Defaults to None. :type dask_client: Client | None, optional :param output_column: The column to predict into. The `MS.model_column` will reflect this. Defaults to "MODEL_DATA". :type output_column: str, optional :param update_crystalball_options: Update options to the provided crystalball_options. Defaults to None. :type update_crystalball_options: dict[str, Any] | None, optional :returns: The MS that was predicted into, with the `model_column` set appropriately. :rtype: MS .. py:function:: get_parser() -> argparse.ArgumentParser