How to use the pyxem.generators.pdf_generator.PDFGenerator 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_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_generators / test_pdf_generator.py View on Github external
def test_s_limits(reduced_intensity_profile):
    pdfgen = PDFGenerator(reduced_intensity_profile)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 12])
    pdf2 = pdfgen.get_pdf(s_cutoff=[0, 10])
    assert np.array_equal(pdf.data, pdf2.data)
github pyxem / pyxem / tests / test_generators / test_pdf_generator.py View on Github external
def test_signal_size():
    spectrum = np.array([5., 4., 3., 2., 2., 1., 1., 1., 0., 0.])
    ri = ReducedIntensityProfile(spectrum)
    pdfgen = PDFGenerator(ri)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 10])
    assert isinstance(pdf, PDFProfile)

    ri = ReducedIntensityProfile([spectrum])
    pdfgen = PDFGenerator(ri)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 10])
    assert isinstance(pdf, PDFProfile)

    ri = ReducedIntensityProfile([[spectrum]])
    pdfgen = PDFGenerator(ri)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 10])
    assert isinstance(pdf, PDFProfile)

    ri = ReducedIntensityProfile([[[spectrum]]])
    pdfgen = PDFGenerator(ri)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 10])
github pyxem / pyxem / tests / test_generators / test_pdf_generator.py View on Github external
def test_get_pdf(reduced_intensity_profile):
    pdfgen = PDFGenerator(reduced_intensity_profile)
    pdf = pdfgen.get_pdf(s_cutoff=[0, 9])
    assert isinstance(pdf, PDFProfile)