Skip to content

Commit da8c24e

Browse files
committed
debyepdfpgenerator.py
1 parent f102f1b commit da8c24e

2 files changed

Lines changed: 10 additions & 17 deletions

File tree

src/diffpy/cmipdf/debyepdfgenerator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ def set_structure(self, structure, name="phase", periodic=False):
9696
9797
Parameters
9898
----------
99-
structure
100-
diffpy.structure.Structure, pyobjcryst.crystal.Crystal or
101-
pyobjcryst.molecule.Molecule instance. Default None.
102-
name
99+
structure : Structure object
100+
The `diffpy.structure.Structure`, `pyobjcryst.crystal.Crystal` or
101+
`pyobjcryst.molecule.Molecule` instance.
102+
name : str, optional
103103
A name to give to the managed ParameterSet that adapts structure
104104
(default "phase").
105-
periodic
105+
periodic : bool, optional
106106
The structure should be treated as periodic (default
107107
False). Note that some structures do not support
108108
periodicity, in which case this will have no effect on the
@@ -120,12 +120,12 @@ def set_structure_from_parset(self, parset, periodic=False):
120120
121121
Parameters
122122
----------
123-
parset
124-
A SrRealParSet that holds the structural information.
123+
parset : SrealParSet object
124+
The SrRealParSet that holds the structural information.
125125
This can be used to share the phase between multiple
126126
BasePDFGenerators, and have the changes in one reflect in
127127
another.
128-
periodic
128+
periodic : bool, optional
129129
The structure should be treated as periodic (default True).
130130
Note that some structures do not support periodicity, in
131131
which case this will be ignored.

tests/test_pdf.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
from diffpy.cmipdf import PDFContribution, PDFGenerator
2626
from diffpy.srfit.exceptions import SrFitError
2727
from diffpy.srfit.fitbase import ProfileParser
28-
from diffpy.structure import Structure, loadStructure
28+
from diffpy.srreal.pdfcalculator import PDFCalculator
29+
from diffpy.structure import PDFFitStructure, Structure, loadStructure
2930

3031
# ----------------------------------------------------------------------------
3132

@@ -145,14 +146,6 @@ def testParser2(datafile):
145146
def testGenerator(
146147
diffpy_srreal_available, diffpy_structure_available, datafile
147148
):
148-
if not diffpy_structure_available:
149-
pytest.skip("diffpy.structure package not available")
150-
if not diffpy_srreal_available:
151-
pytest.skip("diffpy.srreal package not available")
152-
153-
from diffpy.srreal.pdfcalculator import PDFCalculator
154-
from diffpy.structure import PDFFitStructure
155-
156149
qmax = 27.0
157150
gen = PDFGenerator()
158151
gen.set_scattering_type("N")

0 commit comments

Comments
 (0)