karabo.imaging.backends package

Submodules

karabo.imaging.backends.sdp_backend module

class SdpImager(config: SdpImagerConfig | None = None)

Bases: Imager

invert(vis: Visibility, image_spec: ImageSpec) → tuple[Image, Image]

Grid visibilities into dirty image and PSF images.

restore(model_or_dirty: Image, psf: Image) → Image

Perform CLEAN-style deconvolution + restore using ska-sdp-func-python.

Returns a restored image; model and residual are written to disk as a side effect for inspection (paths stored on instance attributes).

class SdpImagerConfig(combine_across_frequencies: 'bool' = True, weighting: 'str' = 'natural', context: 'str' = '2d', override_cellsize: 'bool' = False, clean_algorithm: 'str' = 'hogbom', clean_niter: 'int' = 100, clean_gain: 'float' = 0.1, clean_threshold: 'float' = 0.0, clean_preserve_facets: 'bool' = False, save_model_and_residual: 'bool' = True, clean_fractional_threshold: 'float | None' = None, clean_scales: 'tuple[int, ...] | None' = None)

Bases: object

clean_algorithm: str = 'hogbom'
clean_fractional_threshold: float | None = None
clean_gain: float = 0.1
clean_niter: int = 100
clean_preserve_facets: bool = False
clean_scales: tuple[int, ...] | None = None
clean_threshold: float = 0.0
combine_across_frequencies: bool = True
context: str = '2d'
override_cellsize: bool = False
save_model_and_residual: bool = True
weighting: str = 'natural'

karabo.imaging.backends.wsclean_backend module

class WscleanBackendConfig(combine_across_frequencies: 'bool' = True, weighting: 'Optional[WscleanWeighting]' = None, clean_niter: 'int' = 100, clean_mgain: 'float' = 0.8, clean_auto_threshold: 'int' = 3)

Bases: object

clean_auto_threshold: int = 3
clean_mgain: float = 0.8
clean_niter: int = 100
combine_across_frequencies: bool = True
weighting: Literal['natural', 'uniform'] | None = None
class WscleanBackendImager(config: WscleanBackendConfig | None = None)

Bases: Imager

Adapter exposing WSClean through the backend-agnostic imager API.

invert(vis: Visibility, image_spec: ImageSpec) → tuple[Image, Image]

Grid visibilities into dirty image and PSF images.

last_dirty_image: Image | None
last_image_spec: ImageSpec | None
last_psf_image: Image | None
last_visibility: Visibility | None
restore(model_or_dirty: Image, psf: Image) → Image

Return a restored image using the provided PSF.

Module contents

Backend-specific imager adapters.

class SdpImager(config: SdpImagerConfig | None = None)

Bases: Imager

invert(vis: Visibility, image_spec: ImageSpec) → tuple[Image, Image]

Grid visibilities into dirty image and PSF images.

restore(model_or_dirty: Image, psf: Image) → Image

Perform CLEAN-style deconvolution + restore using ska-sdp-func-python.

Returns a restored image; model and residual are written to disk as a side effect for inspection (paths stored on instance attributes).

class SdpImagerConfig(combine_across_frequencies: 'bool' = True, weighting: 'str' = 'natural', context: 'str' = '2d', override_cellsize: 'bool' = False, clean_algorithm: 'str' = 'hogbom', clean_niter: 'int' = 100, clean_gain: 'float' = 0.1, clean_threshold: 'float' = 0.0, clean_preserve_facets: 'bool' = False, save_model_and_residual: 'bool' = True, clean_fractional_threshold: 'float | None' = None, clean_scales: 'tuple[int, ...] | None' = None)

Bases: object

clean_algorithm: str = 'hogbom'
clean_fractional_threshold: float | None = None
clean_gain: float = 0.1
clean_niter: int = 100
clean_preserve_facets: bool = False
clean_scales: tuple[int, ...] | None = None
clean_threshold: float = 0.0
combine_across_frequencies: bool = True
context: str = '2d'
override_cellsize: bool = False
save_model_and_residual: bool = True
weighting: str = 'natural'
class WscleanBackendConfig(combine_across_frequencies: 'bool' = True, weighting: 'Optional[WscleanWeighting]' = None, clean_niter: 'int' = 100, clean_mgain: 'float' = 0.8, clean_auto_threshold: 'int' = 3)

Bases: object

clean_auto_threshold: int = 3
clean_mgain: float = 0.8
clean_niter: int = 100
combine_across_frequencies: bool = True
weighting: Literal['natural', 'uniform'] | None = None
class WscleanBackendImager(config: WscleanBackendConfig | None = None)

Bases: Imager

Adapter exposing WSClean through the backend-agnostic imager API.

invert(vis: Visibility, image_spec: ImageSpec) → tuple[Image, Image]

Grid visibilities into dirty image and PSF images.

last_dirty_image: Image | None
last_image_spec: ImageSpec | None
last_psf_image: Image | None
last_visibility: Visibility | None
restore(model_or_dirty: Image, psf: Image) → Image

Return a restored image using the provided PSF.