How to use the pyxem.signals.push_metadata_through function in pyxem

To help you get started, we’ve selected a few pyxem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyxem / pyxem / pyxem / signals / indexation_results.py View on Github external
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)
github pyxem / pyxem / pyxem / signals / strain_map.py View on Github external
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)
github pyxem / pyxem / pyxem / signals / crystallographic_map.py View on Github external
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
github pyxem / pyxem / pyxem / signals / vdf_image.py View on Github external
def __init__(self, *args, **kwargs):
        self, args, kwargs = push_metadata_through(self, *args, **kwargs)
        super().__init__(*args, **kwargs)
        self.vectors = None
github pyxem / pyxem / pyxem / signals / diffraction_vectors.py View on Github external
def __init__(self, *args, **kwargs):
        self, args, kwargs = push_metadata_through(self, *args, **kwargs)
        super().__init__(*args, **kwargs)
        self.cartesian = None
        self.hkls = None
github pyxem / pyxem / pyxem / signals / diffraction1d.py View on Github external
def __init__(self, *args, **kwargs):
        self, args, kwargs = push_metadata_through(self, *args, **kwargs)
        super().__init__(*args, **kwargs)
github pyxem / pyxem / pyxem / signals / diffraction2d.py View on Github external
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__
github pyxem / pyxem / pyxem / signals / diffraction2d.py View on Github external
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
github pyxem / pyxem / pyxem / signals / diffraction2d.py View on Github external
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__