karabo.imaging.backends package

Submodules

karabo.imaging.backends.rascil_backend module

class RascilBackendConfig(combine_across_frequencies: 'bool' = True, clean_algorithm: 'CleanAlgorithmType' = 'hogbom', clean_nmajor: 'int' = 1, clean_niter: 'int' = 100, clean_gain: 'float' = 0.1, clean_threshold: 'float' = 0.0001, clean_fractional_threshold: 'float' = 0.3, clean_scales: 'Tuple[int, ...]' = (0,), clean_nmoment: 'int' = 4, clean_psf_support: 'int' = 256, clean_restored_output: 'CleanRestoredOutputType' = 'list')

Bases: object

clean_algorithm: Literal['hogbom', 'msclean', 'mmclean'] = 'hogbom'
clean_fractional_threshold: float = 0.3
clean_gain: float = 0.1
clean_niter: int = 100
clean_nmajor: int = 1
clean_nmoment: int = 4
clean_psf_support: int = 256
clean_restored_output: Literal['taylor', 'list', 'integrated'] = 'list'
clean_scales: Tuple[int, ...] = (0,)
clean_threshold: float = 0.0001
combine_across_frequencies: bool = True
class RascilBackendImager(config: RascilBackendConfig | None = None)

Bases: Imager

Adapter exposing the legacy RASCIL imaging stack.

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

Return a restored image using the provided PSF.

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', 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'
save_model_and_residual: bool = True
weighting: str = 'natural'

karabo.imaging.backends.wsclean_backend module

class WscleanBackendConfig(combine_across_frequencies: 'bool' = True, 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
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.

restore(model_or_dirty: Image, psf: Image) Image

Return a restored image using the provided PSF.

Module contents

Backend-specific imager adapters.

class RascilBackendConfig(combine_across_frequencies: 'bool' = True, clean_algorithm: 'CleanAlgorithmType' = 'hogbom', clean_nmajor: 'int' = 1, clean_niter: 'int' = 100, clean_gain: 'float' = 0.1, clean_threshold: 'float' = 0.0001, clean_fractional_threshold: 'float' = 0.3, clean_scales: 'Tuple[int, ...]' = (0,), clean_nmoment: 'int' = 4, clean_psf_support: 'int' = 256, clean_restored_output: 'CleanRestoredOutputType' = 'list')

Bases: object

clean_algorithm: Literal['hogbom', 'msclean', 'mmclean'] = 'hogbom'
clean_fractional_threshold: float = 0.3
clean_gain: float = 0.1
clean_niter: int = 100
clean_nmajor: int = 1
clean_nmoment: int = 4
clean_psf_support: int = 256
clean_restored_output: Literal['taylor', 'list', 'integrated'] = 'list'
clean_scales: Tuple[int, ...] = (0,)
clean_threshold: float = 0.0001
combine_across_frequencies: bool = True
class RascilBackendImager(config: RascilBackendConfig | None = None)

Bases: Imager

Adapter exposing the legacy RASCIL imaging stack.

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

Return a restored image using the provided PSF.

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', 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'
save_model_and_residual: bool = True
weighting: str = 'natural'
class WscleanBackendConfig(combine_across_frequencies: 'bool' = True, 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
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.

restore(model_or_dirty: Image, psf: Image) Image

Return a restored image using the provided PSF.