Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self.axes_manager.set_signal_dimension(2)
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
# check init dimension are correct
if 'current_basis_x' in kwargs.keys():
self.current_basis_x = kwargs['current_basis_x']
else:
self.current_basis_x = [1, 0]
self.current_basis_y = np.matmul(np.asarray([[0, 1], [-1, 0]]), self.current_basis_x)
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self.axes_manager.set_signal_dimension(1)
self.method = None
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self.vectors = None
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self.cartesian = None
self.hkls = None
def __init__(self, *args, **kwargs):
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
def __init__(self, *args, **kwargs):
"""
Create an Diffraction2D object from a hs.Signal2D or np.array.
Parameters
----------
*args :
Passed to the __init__ of Signal2D. The first arg should be
either a numpy.ndarray or a Signal2D
**kwargs :
Passed to the __init__ of Signal2D
"""
self, args, kwargs = push_metadata_through(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self.decomposition.__func__.__doc__ = BaseSignal.decomposition.__doc__
if len(azimuthal_integrals.data.shape) == 3:
ap = Diffraction1D(azimuthal_integrals.data[:, 1, :])
tth = azimuthal_integrals.data[0, 0, :] # tth is the signal axis
else:
ap = Diffraction1D(azimuthal_integrals.data[:, :, 1, :])
tth = azimuthal_integrals.data[0, 0, 0, :] # tth is the signal axis
scale = (tth[1] - tth[0]) * scaling_factor
offset = tth[0] * scaling_factor
ap.axes_manager.signal_axes[0].scale = scale
ap.axes_manager.signal_axes[0].offset = offset
ap.axes_manager.signal_axes[0].name = 'scattering'
ap.axes_manager.signal_axes[0].units = unit
transfer_navigation_axes(ap, self)
push_metadata_through(ap, self)
return ap
def __init__(self, *args, **kwargs):
"""
Create an Diffraction2D object from a hs.Signal2D or np.array.
Parameters
----------
*args :
Passed to the __init__ of Signal2D. The first arg should be
either a numpy.ndarray or a Signal2D
**kwargs :
Passed to the __init__ of Signal2D
"""
self,args,kwargs = push_metadata_through(self,*args,**kwargs)
super().__init__(*args, **kwargs)
self.decomposition.__func__.__doc__ = BaseSignal.decomposition.__doc__