How to use the pyxem.generators.vdf_generator.VDFGenerator 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_generators / test_vdf_generator.py View on Github external
def vdf_generator(diffraction_pattern, diffraction_vectors):
    return VDFGenerator(diffraction_pattern, diffraction_vectors)
github pyxem / pyxem / tests / test_generators / test_vdf_generator.py View on Github external
def test_vdf_generator_from_map(diffraction_pattern):
    dvm = DiffractionVectors(np.array([[np.array([[1, 1],
                                                  [2, 2]]),
                                        np.array([[1, 1],
                                                  [2, 2],
                                                  [1, 2]])],
                                       [np.array([[1, 1],
                                                  [2, 2]]),
                                        np.array([[1, 1],
                                                  [2, 2]])]], dtype=object))
    dvm.axes_manager.set_signal_dimension(0)

    vdfgen = VDFGenerator(diffraction_pattern, dvm)
    assert isinstance(vdfgen, VDFGenerator)
github pyxem / pyxem / tests / test_generators / test_vdf_generator.py View on Github external
def test_vdf_generator_init_with_vectors(self, diffraction_pattern):
        dvm = DiffractionVectors(np.array([[np.array([[1, 1],
                                                      [2, 2]]),
                                            np.array([[1, 1],
                                                      [2, 2],
                                                      [1, 2]])],
                                           [np.array([[1, 1],
                                                      [2, 2]]),
                                            np.array([[1, 1],
                                                      [2, 2]])]], dtype=object))
        dvm.axes_manager.set_signal_dimension(0)

        vdfgen = VDFGenerator(diffraction_pattern, dvm)
        assert isinstance(vdfgen.signal, ElectronDiffraction)
        assert isinstance(vdfgen.vectors, DiffractionVectors)
github pyxem / pyxem / tests / test_generators / test_vdf_generator.py View on Github external
def test_vector_vdfs_without_vectors(self, diffraction_pattern):
        vdfgen = VDFGenerator(diffraction_pattern)
        vdfgen.get_vector_vdf_images(radius=2.)
github pyxem / pyxem / tests / test_generators / test_vdf_generator.py View on Github external
def test_vdf_generator_init_without_vectors(self, diffraction_pattern):

        vdfgen = VDFGenerator(diffraction_pattern)
        assert isinstance(vdfgen.signal, ElectronDiffraction)
        assert isinstance(vdfgen.vectors, type(None))