Commit dcdfcfe6 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Merge branch 'fix_cuda_ccd_distortion' into 'master'

Add distortion_correction to CudaFlatField API

See merge request !124
parents b908da06 4a87d8c3
Pipeline #44671 passed with stages
in 6 minutes and 40 seconds
__version__ = "2020.5.12-dev"
__version__ = "2020.5.13-dev"
__nabu_modules__ = [
"app",
"cuda",
......
......@@ -18,6 +18,7 @@ def CudaFlatFieldDataUrls(
darks: dict,
radios_indices=None,
interpolation: str = "linear",
distortion_correction=None,
cuda_options: Union[dict, None] = None,
**chunk_reader_kwargs
):
......@@ -30,6 +31,7 @@ def CudaFlatFieldDataUrls(
darks_arrays_dict,
radios_indices=radios_indices,
interpolation=interpolation,
distortion_correction=distortion_correction,
cuda_options=cuda_options
)
......@@ -43,6 +45,7 @@ class CudaFlatFieldArrays(FlatFieldArrays):
darks: dict,
radios_indices=None,
interpolation: str = "linear",
distortion_correction=None,
cuda_options: Union[dict, None] = None,
):
"""
......@@ -50,12 +53,19 @@ class CudaFlatFieldArrays(FlatFieldArrays):
Please read the documentation of nabu.preproc.ccd.FlatField for help
on the parameters.
"""
#
if distortion_correction is not None:
raise NotImplementedError(
"Flats distortion correction is not implemented with the Cuda backend"
)
#
super().__init__(
radios_shape,
flats,
darks,
radios_indices=radios_indices,
interpolation=interpolation,
distortion_correction=distortion_correction
)
self._set_cuda_options(cuda_options)
self._init_cuda_kernels()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment