Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6da5a92
basepdfgenerator.py
cadenmyers13 Mar 18, 2026
090409e
characteristicfunctions.py
cadenmyers13 Mar 18, 2026
4118a1c
copy rest of modified srfit files here
cadenmyers13 Mar 18, 2026
67d8e7a
remove pdfparser in favor of ProfileParser
cadenmyers13 Mar 18, 2026
a0f55cd
setScatteringType --> set_scattering_type
cadenmyers13 Mar 18, 2026
f052128
getScatteringType --> get_scattering_type
cadenmyers13 Mar 18, 2026
7fe7f08
setQmax --> set_qmax
cadenmyers13 Mar 18, 2026
efae5b2
copy over test_pdf.py
cadenmyers13 Mar 18, 2026
f45e5cf
docstring improvement
cadenmyers13 Mar 18, 2026
dba8852
getQmax --> get_qmax
cadenmyers13 Mar 18, 2026
e27133a
setQmin --> set_qmin
cadenmyers13 Mar 18, 2026
4b41c42
getQmin --> get_qmin
cadenmyers13 Mar 18, 2026
fc56895
change stru to structure everywhere
cadenmyers13 Mar 18, 2026
d2dd56b
setPhase --> set_structure_from_parset
cadenmyers13 Mar 18, 2026
13abb50
spheroidalCF --> spheroidal_particle
cadenmyers13 Mar 19, 2026
f0851c3
lognormalSphericalCF --> lognormal_spherical_distribution
cadenmyers13 Mar 19, 2026
971fd7e
sheetCF --> sheet_particle
cadenmyers13 Mar 19, 2026
4c52841
shellCF --> spherical_shell
cadenmyers13 Mar 19, 2026
b742d4d
shellCF2 --> _calculate_shell_cf
cadenmyers13 Mar 19, 2026
70e8403
update parser testing
cadenmyers13 Mar 19, 2026
3c2073a
tests passing checkpoint 2
cadenmyers13 Mar 19, 2026
0f2ed66
all tests passing
cadenmyers13 Mar 19, 2026
f102f1b
rm unittest import
cadenmyers13 Mar 19, 2026
da8c24e
debyepdfpgenerator.py
cadenmyers13 Mar 19, 2026
768580b
pdfcontribution.py
cadenmyers13 Mar 19, 2026
10262a7
add method to generate a PDF from a structure
cadenmyers13 Mar 19, 2026
852ae74
break out tests into separate files
cadenmyers13 Mar 19, 2026
ed5b173
rm PDF generator functions, will put on another PR
cadenmyers13 Mar 19, 2026
3012727
news
cadenmyers13 Mar 19, 2026
688a5fa
add srreal srfit and structure to this conda.txt and pip.txt
cadenmyers13 Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debyepdfpgenerator.py
  • Loading branch information
cadenmyers13 committed Mar 19, 2026
commit da8c24eea9f31918808a3c15b72c70c702ad7c34
16 changes: 8 additions & 8 deletions src/diffpy/cmipdf/debyepdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def set_structure(self, structure, name="phase", periodic=False):

Parameters
----------
structure
diffpy.structure.Structure, pyobjcryst.crystal.Crystal or
pyobjcryst.molecule.Molecule instance. Default None.
name
structure : Structure object
The `diffpy.structure.Structure`, `pyobjcryst.crystal.Crystal` or
`pyobjcryst.molecule.Molecule` instance.
name : str, optional
A name to give to the managed ParameterSet that adapts structure
(default "phase").
periodic
periodic : bool, optional
The structure should be treated as periodic (default
False). Note that some structures do not support
periodicity, in which case this will have no effect on the
Expand All @@ -120,12 +120,12 @@ def set_structure_from_parset(self, parset, periodic=False):

Parameters
----------
parset
A SrRealParSet that holds the structural information.
parset : SrealParSet object
The SrRealParSet that holds the structural information.
This can be used to share the phase between multiple
BasePDFGenerators, and have the changes in one reflect in
another.
periodic
periodic : bool, optional
The structure should be treated as periodic (default True).
Note that some structures do not support periodicity, in
which case this will be ignored.
Expand Down
11 changes: 2 additions & 9 deletions tests/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
from diffpy.cmipdf import PDFContribution, PDFGenerator
from diffpy.srfit.exceptions import SrFitError
from diffpy.srfit.fitbase import ProfileParser
from diffpy.structure import Structure, loadStructure
from diffpy.srreal.pdfcalculator import PDFCalculator
from diffpy.structure import PDFFitStructure, Structure, loadStructure

# ----------------------------------------------------------------------------

Expand Down Expand Up @@ -145,14 +146,6 @@ def testParser2(datafile):
def testGenerator(
diffpy_srreal_available, diffpy_structure_available, datafile
):
if not diffpy_structure_available:
pytest.skip("diffpy.structure package not available")
if not diffpy_srreal_available:
pytest.skip("diffpy.srreal package not available")

from diffpy.srreal.pdfcalculator import PDFCalculator
from diffpy.structure import PDFFitStructure

qmax = 27.0
gen = PDFGenerator()
gen.set_scattering_type("N")
Expand Down