How to use the pyxem.signals.diffraction_variance.DiffractionVariance 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 / tests / test_signals / test_diffraction_variance.py View on Github external
def test_renormalize(self,
                        diffraction_pattern,
                        dqe):
        difvar = DiffractionVariance(diffraction_pattern)
        difvar.renormalize(dqe)
        assert isinstance(difvar,DiffractionVariance)
github pyxem / pyxem / tests / test_signals / test_diffraction_variance.py View on Github external
def diffraction_variance(diffraction_pattern):
    return DiffractionVariance(diffraction_pattern)
github pyxem / pyxem / tests / test_signals / test_diffraction_variance.py View on Github external
def test_get_diffraction_variance_signal(self,
                        diffraction_pattern):
        difvar = DiffractionVariance(diffraction_pattern)
        assert isinstance(difvar,DiffractionVariance)
github pyxem / pyxem / tests / test_signals / test_diffraction_variance.py View on Github external
def test_renormalize(self,
                        diffraction_pattern,
                        dqe):
        difvar = DiffractionVariance(diffraction_pattern)
        difvar.renormalize(dqe)
        assert isinstance(difvar,DiffractionVariance)
github pyxem / pyxem / tests / test_generators / test_variance_generator.py View on Github external
def test_get_diffraction_variance(
            self,
            variance_generator: VarianceGenerator,
            dqe
            ):

        vardps = variance_generator.get_diffraction_variance(dqe)
        assert isinstance(vardps, DiffractionVariance)

        mean_dp = np.array(
        [[0., 0., 0., 0., 0., 0., 0., 0.5],
         [0., 0., 0., 0., 0., 0., 0., 0.],
         [0., 0., 0., 0.5, 0., 0., 0., 0.],
         [0., 0., 0.5, 1., 1.25, 0., 0., 0.],
         [0., 0., 0., 1.25, 1., 0.75, 0., 0.],
         [0., 0., 0., 0., 0.75, 0., 0., 0.],
         [0., 0., 0., 0., 0., 0., 0., 0.],
         [0., 0., 0., 0., 0., 0., 0., 0.]]).reshape(8,8)
        meansq_dp = np.array(
        [[0., 0., 0., 0., 0., 0., 0., 1.],
         [0., 0., 0., 0., 0., 0., 0., 0.],
         [0., 0., 0., 0.5, 0., 0., 0., 0.],
         [0., 0., 0.5, 2., 1.75, 0., 0., 0.],
         [0., 0., 0., 1.75, 2., 1.25, 0., 0.],