Skip to content
Merged
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
characteristicfunctions.py
  • Loading branch information
cadenmyers13 committed Mar 18, 2026
commit 090409e058bcb5f74506e952c0105a75905866e2
33 changes: 16 additions & 17 deletions src/diffpy/cmipdf/characteristicfunctions.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2025 Simon Billinge.
# All rights reserved.
# diffpy.srfit by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 The Trustees of Columbia University
# in the City of New York. All rights reserved.
#
# File coded by: Caden Myers, Simon Billinge, and members of the Billinge
# group.
# File coded by: Chris Farrow
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.cmipdf/graphs/contributors
#
# See LICENSE.rst for license information.
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE_DANSE.txt for license information.
#
##############################################################################
"""Form factors (characteristic functions) used in PDF nanoshape
Expand All @@ -22,7 +21,7 @@
function and Gcryst(f) is the crystal PDF.

These functions are meant to be imported and added to a FitContribution
using the 'registerFunction' method of that class.
using the 'register_function' method of that class.
"""

__all__ = [
Expand All @@ -49,7 +48,7 @@
def sphericalCF(r, psize):
"""Spherical nanoparticle characteristic function.

Attributes
Parameters
----------
r
distance of interaction
Expand All @@ -74,7 +73,7 @@ def spheroidalCF(r, erad, prad):

Spheroid with radii (erad, erad, prad)

Attributes
Parameters
----------
prad
polar radius
Expand All @@ -96,7 +95,7 @@ def spheroidalCF2(r, psize, axrat):

Form factor for ellipsoid with radii (psize/2, psize/2, axrat*psize/2)

Attributes
Parameters
----------
r
distance of interaction
Expand Down Expand Up @@ -207,7 +206,7 @@ def lognormalSphericalCF(r, psize, psig):
"""Spherical nanoparticle characteristic function with lognormal
size distribution.

Attributes
Parameters
----------
r
distance of interaction
Expand Down Expand Up @@ -264,7 +263,7 @@ def lognormalSphericalCF(r, psize, psig):
def sheetCF(r, sthick):
"""Nanosheet characteristic function.

Attributes
Parameters
----------
r
distance of interaction
Expand Down Expand Up @@ -294,7 +293,7 @@ def sheetCF(r, sthick):
def shellCF(r, radius, thickness):
"""Spherical shell characteristic function.

Attributes
Parameters
----------
radius
Inner radius
Expand All @@ -314,7 +313,7 @@ def shellCF(r, radius, thickness):
def shellCF2(r, a, delta):
"""Spherical shell characteristic function.

Attributes
Parameters
----------
a
Central radius
Expand Down Expand Up @@ -379,7 +378,7 @@ class SASCF(Calculator):
def __init__(self, name, model):
"""Initialize the generator.

Attributes
Parameters
----------
name
A name for the SASCF
Expand Down