arrakis.linmos
Run LINMOS on cutouts in parallel
Attributes
Classes
Class to hold image paths |
Functions
|
Command-line interface |
|
Find the images and weights for a given field and stokes parameter |
|
Generate parset for LINMOS |
|
Pull yandasoft image from dockerhub. |
|
Run linmos |
|
|
|
LINMOS flow |
|
|
|
Smooth cubelets to a common resolution |
Module Contents
- arrakis.linmos.find_images(field: str, beams_row: Tuple[int, pandas.Series], stoke: str, datadir: pathlib.Path) ImagePaths [source]
Find the images and weights for a given field and stokes parameter
- Parameters:
field (str) – Field name.
beams (dict) – Beam information.
stoke (str) – Stokes parameter.
datadir (Path) – Data directory.
- Raises:
Exception – If no files are found.
- Returns:
List of images and weights.
- Return type:
- arrakis.linmos.genparset(image_paths: ImagePaths, stoke: str, datadir: pathlib.Path, holofile: pathlib.Path | None = None) str [source]
Generate parset for LINMOS
- Parameters:
image_paths (ImagePaths) – List of images and weights.
stoke (str) – Stokes parameter.
datadir (Path) – Data directory.
holofile (Path, optional) – Path to the holography file to include in the bind list. Defaults to None.
- Raises:
Exception – If no files are found.
- Returns:
Path to parset file.
- Return type:
str
- arrakis.linmos.get_yanda(version='1.3.0') str [source]
Pull yandasoft image from dockerhub.
- Parameters:
version (str, optional) – Yandasoft version. Defaults to “1.3.0”.
- Returns:
Path to yandasoft image.
- Return type:
str
- arrakis.linmos.linmos(parset: str | None, fieldname: str, image: str, holofile: pathlib.Path) pymongo.UpdateOne | None [source]
Run linmos
- Parameters:
parset (str) – Path to parset file.
fieldname (str) – Name of RACS field.
image (str) – Name of Yandasoft image.
holofile (Path) – Path to the holography file to include in the bind list.
verbose (bool, optional) – Verbose output. Defaults to False.
- Raises:
Exception – If LINMOS fails.
Exception – LINMOS output not found.
- Returns:
Mongo update object.
- Return type:
pymongo.UpdateOne
- arrakis.linmos.main(field: str, datadir: pathlib.Path, host: str, epoch: int, sbid: int | None = None, holofile: pathlib.Path | None = None, username: str | None = None, password: str | None = None, yanda: str = '1.3.0', yanda_img: pathlib.Path | None = None, stokeslist: List[str] | None = None, limit: int | None = None) None [source]
LINMOS flow
- Parameters:
field (str) – RACS field name.
datadir (str) – Data directory.
host (str) – MongoDB host IP.
holofile (str) – Path to primary beam file.
username (str, optional) – Mongo username. Defaults to None.
password (str, optional) – Mongo password. Defaults to None.
yanda (str, optional) – Yandasoft version. Defaults to “1.3.0”.
yanda_img (Path, optional) – Path to a yandasoft singularirt image. If None, the container version yanda will be downloaded. Defaults to None.
stokeslist (List[str], optional) – Stokes parameters to process. Defaults to None.
limit (int, optional) – Limit the number of islands to process. Defaults to None.
- arrakis.linmos.serial_loop(field: str, beams_row: Tuple[int, pandas.Series], stokeslist: List[str], cutdir: pathlib.Path, holofile: pathlib.Path, image: pathlib.Path) List[pymongo.UpdateOne | None] [source]
- arrakis.linmos.smooth_images(image_dict: Dict[str, ImagePaths]) Dict[str, ImagePaths] [source]
Smooth cubelets to a common resolution
- Parameters:
image_list (ImagePaths) – List of cubelets to smooth.
- Returns:
Smoothed cubelets.
- Return type: