Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions news/replace-sft-by-type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Set the scattering factor table through the ``scatteringfactortable`` property in ``setScatteringType`` instead of the ``setScatteringFactorTableByType`` method deprecated in diffpy.srreal.

**Security:**

* <news item>
2 changes: 1 addition & 1 deletion src/diffpy/srfit/pdf/basepdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def setScatteringType(self, stype="X"):
ValueError
If stype is not a recognized scattering type.
"""
self._calc.setScatteringFactorTableByType(stype)
self._calc.scatteringfactortable = stype
# update the meta dictionary only if there was no exception
self.meta["stype"] = self.getScatteringType()
return
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def testGenerator(diffpy_srreal_available, datafile):
calc.rmin = r[0]
calc.rmax = r[-1] + 0.5 * calc.rstep
calc.qmax = qmax
calc.setScatteringFactorTableByType("N")
calc.scatteringfactortable = "N"
calc.eval(stru)
yref = calc.pdf

Expand Down
Loading