Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@typechecked
def _image_interpolation(image_in: np.ndarray) -> np.ndarray:
return _bad_pixel_interpolation(image_in,
bad_pixel_map,
self.m_iterations)
@typechecked()
@abc.abstractmethod
def listen(self, complete_message_callback: Callable[[str], bool], receive_message_callback: Callable[[str], None]):
pass
@typechecked
def icwt(X: np.ndarray,
scales: np.ndarray) -> np.ndarray:
"""
Inverse Continuous Wavelet Transform. The reconstruction factor is not applied.
Parameters
----------
X : numpy.ndarray
Transformed data (2D).
scales : numpy.ndarray
Scales (1D).
Returns
-------
numpy.ndarray
1D data.
@typechecked
def __setitem__(self,
key: Union[slice, int, tuple],
value: Union[np.ndarray, int]) -> None:
"""
Internal function needed to change data using slicing. See class documentation for an
example (:class:`~pynpoint.core.dataio.OutputPort`).
Parameters
----------
key : slice
Index slice to be changed.
value : np.ndarray
New data.
Returns
-------
@typechecked()
def get_all(self) -> Dict[str, BaseConfig]:
return {**self.__get_default_configurations(), **self.__get()}
@typechecked
def __init__(self,
name_in: str,
image_in_tag: str,
image_out_tag: str) -> None:
"""
Parameters
----------
name_in : str
Unique name of the module instance.
image_in_tag : str
Database tag with the input data.
image_out_tag : str
Database tag where the output data will be stored. Should be different from
``image_in_tag``.
Returns
@typechecked
def __init__(self,
name_in: str,
image_in_tag: str,
image_out_tag: str,
lines: Tuple[int, int, int, int]) -> None:
"""
Parameters
----------
name_in : str
Unique name of the module instance.
image_in_tag : str
Tag of the database entry that is read as input.
image_out_tag : str
Tag of the database entry that is written as output, including the images with
decreased size. Should be different from *image_in_tag*.
lines : tuple(int, int, int, int)
@typechecked
def median_filter(self) -> None:
"""
Applies a median filter on the internal 1d signal. Can be useful for cosmic ray correction
after temporal de-noising
Returns
-------
NoneType
None
"""
self._m_data = medfilt(self._m_data, 19)
@typechecked
def __ne__(self, other: '_array[T]') -> bool:
if isinstance(other, _array):
return self.l != other.l
fail("_array.__ne__ only works on two _arrays.")
@typechecked
def refine(t: type, f: Callable[[T], bool]) -> Tuple[type,Callable[[T],T]]:
def refine_check(x):
if not isinstance(x,t) or not f(x):
print("got :"+str(x))
print("expected : x:"+str(t)+"{"+str(f)+"}")
fail("refinement check failed")
return x
return (t,refine_check)