How to use pyxem - 10 common examples

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_reduced_intensity_profile.py View on Github external
def test_reduced_intensity_profile_init(RedIntData):
    ri = ReducedIntensityProfile(RedIntData)
    assert isinstance(ri, ReducedIntensityProfile)
github pyxem / pyxem / tests / test_components / test_scattering_fit_component.py View on Github external
def test_function_xtables(ri_model):
    elements = ['Cu']
    fracs = [1]
    sc_component = ScatteringFitComponent(elements, fracs, N=1., C=0., type='xtables')
    ri_model.append(sc_component)
    ri_model.fit()
    return
github pyxem / pyxem / tests / test_components / test_scattering_fit_component.py View on Github external
def test_function_lobato(ri_model):
    elements = ['Cu']
    fracs = [1]
    sc_component = ScatteringFitComponent(elements, fracs, N=1., C=0., type='lobato')
    ri_model.append(sc_component)
    ri_model.fit()
    return
github pyxem / pyxem / tests / test_generators / test_pdf_generator.py View on Github external
def test_pdf_gen_init(reduced_intensity_profile):
    pdfgen = PDFGenerator(reduced_intensity_profile)
    assert isinstance(pdfgen, PDFGenerator)
github pyxem / pyxem / tests / test_generators / test_pdf_generator.py View on Github external
def test_pdf_gen_init(reduced_intensity_profile):
    pdfgen = PDFGenerator(reduced_intensity_profile)
    assert isinstance(pdfgen, PDFGenerator)
github pyxem / pyxem / tests / test_signals / test_diffraction_vectors.py View on Github external
def diffraction_vectors_map(request):
    dvm = DiffractionVectors(request.param)
    dvm.axes_manager.set_signal_dimension(0)
    return dvm
github pyxem / pyxem / tests / test_peak_finders.py View on Github external
def test_findpeaks_runs_without_error(sample,method):
    assert type(sample.find_peaks(method)) == DiffractionVectors
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_utils / test_expt_utils.py View on Github external
def diffraction_pattern_one_dimension(request):
    """
    1D (in navigation space) diffraction pattern <1|8,8>
    """
    return ElectronDiffraction(request.param)
github pyxem / pyxem / tests / test_signals / test_electron_diffraction.py View on Github external
def test_remove_dead_pixels(self, diffraction_pattern, method):
        dpr = diffraction_pattern.remove_deadpixels([[1, 2], [5, 6]], method,
                                                    inplace=False)
        assert isinstance(dpr, ElectronDiffraction)