Skip to content

Commit e469694

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 191286e commit e469694

File tree

3 files changed

+47
-47
lines changed

3 files changed

+47
-47
lines changed

doc/manual/source/extending.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ subpackges, as shown below.
2727
* .. py:class:: BaseFunction
2828

2929
+ .. py:class:: BaselineFunction
30-
30+
3131
- .. py:class:: FromSequence
3232
- .. py:class:: NanoSpherical
3333
- .. py:class:: Polynomial
3434
- *etc.*
35-
35+
3636
+ .. py:class:: PeakFunction
37-
37+
3838
- .. py:class:: Gaussian
3939
- .. py:class:: GaussianOverR
4040
- *etc.*
@@ -57,7 +57,7 @@ for examples.
5757
.. py:method:: estimate_parameters(r, y)
5858
5959
Return a Numpy array of parameters estimated from the data.
60-
60+
6161
:param r: Grid on which the data are defined.
6262
:param y: The data.
6363
:type r: `Sequence`
@@ -69,9 +69,9 @@ for examples.
6969

7070

7171
.. py:method:: _jacobian_raw(pars, r, free)
72-
72+
7373
Return Jacobian for parameters evaluated over `r`.
74-
74+
7575
:param pars: The parameters of the baseline.
7676
:param r: Scalar or grid on which to calculate the Jacobian.
7777
:param free: Boolean values indicating if corresponding parameter is free (True) or fixed (False).
@@ -84,7 +84,7 @@ for examples.
8484
.. py:method:: _transform_derivativesraw(pars, in_format, out_format)
8585
8686
Return the gradient matrix of `pars` represented in format 'out_format'.
87-
87+
8888
:param pars: The parameters of the baseline.
8989
:param in_format: The format of `pars`.
9090
:param out_format: The desired format of `pars`.
@@ -97,7 +97,7 @@ for examples.
9797
.. py:method:: _transform_parametersraw(pars, in_format, out_format)
9898
9999
Return parameters transformed into format 'out_format'.
100-
100+
101101
:param pars: The parameters of the baseline.
102102
:param in_format: The format of `pars`.
103103
:param out_format: The desired format of `pars`.
@@ -106,11 +106,11 @@ for examples.
106106
:type out_format: `str`
107107
:returns: The transformed parameters.
108108
:rtype: `numpy.ndarray`
109-
109+
110110
.. py:method:: _valueraw(pars, r)
111111
112112
Return value of baseline with given parameters at r.
113-
113+
114114
:param pars: The parameters of the baseline.
115115
:param r: Scalar or grid on which to calculate the baseline.
116116
:type pars: `Sequence(float)`
@@ -130,12 +130,12 @@ following differences:
130130
1) The ``estimate_parameters`` method is required.
131131
2) The "position" key must be defined in the ``parameterdict`` class member.
132132
3) Peak functions must implement the additional method ``scale_at``.
133-
133+
134134
.. py:method:: scale_at(pars, r, scale)
135135
136136
Return peak parameters such that the value at ``r`` is scaled by ``scale``
137137
while the position of the peak's maxima remains unchanged.
138-
138+
139139
:param pars: The parameters of the peak.
140140
:param r: Position where the peak will be rescaled.
141141
:param scale: A scale factor > 0.

doc/manual/source/index.rst

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,38 @@ Last updated |today|.
1010

1111
Tool for unbiased peak extraction from atomic pair distribution functions.
1212

13-
The diffpy.srmise package is an implementation of the `ParSCAPE algorithm
14-
<https://dx.doi.org/10.1107/S2053273315005276>`_ for peak extraction from
15-
atomic pair distribution functions (PDFs). It is designed to function even
16-
when *a priori* knowledge of the physical sample is limited, utilizing the
17-
Akaike Information Criterion (AIC) to estimate whether peaks are
18-
statistically justified relative to alternate models. Three basic use cases
19-
are anticipated for diffpy.srmise. The first is peak fitting a user-supplied
20-
collections of peaks. The second is peak extraction from a PDF with no (or
21-
only partial) user-supplied peaks. The third is an AIC-driven multimodeling
22-
analysis where the output of multiple diffpy.srmise trials are ranked.
23-
24-
The framework for peak extraction defines peak-like clusters within the data,
25-
extracts a single peak within each cluster, and iteratively combines nearby
26-
clusters while performing a recursive search on the residual to identify
27-
occluded peaks. Eventually this results in a single global cluster
28-
containing many peaks fit over all the data. Over- and underfitting are
29-
discouraged by use of the AIC when adding or removing (during a pruning step)
30-
peaks. Termination effects, which can lead to physically spurious peaks in
31-
the PDF, are incorporated in the mathematical peak model and the pruning step
32-
attempts to remove peaks which are fit better as termination ripples due to
33-
another peak.
34-
35-
Where possible, diffpy.srmise provides physically reasonable default values
36-
for extraction parameters. However, the PDF baseline should be estimated by
37-
the user before extraction, or by performing provisional peak extraction with
38-
varying baseline parameters. The package defines a linear (crystalline)
39-
baseline, arbitrary polynomial baseline, a spherical nanoparticle baseline,
40-
and an arbitrary baseline interpolated from a list of user-supplied values.
41-
In addition, PDFs with accurate experimentally-determined uncertainties are
42-
necessary to provide the most reliable results, but historically such PDFs
43-
are rare. In the absence of accurate uncertainties an ad hoc uncertainty
44-
must be specified.
13+
The diffpy.srmise package is an implementation of the `ParSCAPE algorithm
14+
<https://dx.doi.org/10.1107/S2053273315005276>`_ for peak extraction from
15+
atomic pair distribution functions (PDFs). It is designed to function even
16+
when *a priori* knowledge of the physical sample is limited, utilizing the
17+
Akaike Information Criterion (AIC) to estimate whether peaks are
18+
statistically justified relative to alternate models. Three basic use cases
19+
are anticipated for diffpy.srmise. The first is peak fitting a user-supplied
20+
collections of peaks. The second is peak extraction from a PDF with no (or
21+
only partial) user-supplied peaks. The third is an AIC-driven multimodeling
22+
analysis where the output of multiple diffpy.srmise trials are ranked.
23+
24+
The framework for peak extraction defines peak-like clusters within the data,
25+
extracts a single peak within each cluster, and iteratively combines nearby
26+
clusters while performing a recursive search on the residual to identify
27+
occluded peaks. Eventually this results in a single global cluster
28+
containing many peaks fit over all the data. Over- and underfitting are
29+
discouraged by use of the AIC when adding or removing (during a pruning step)
30+
peaks. Termination effects, which can lead to physically spurious peaks in
31+
the PDF, are incorporated in the mathematical peak model and the pruning step
32+
attempts to remove peaks which are fit better as termination ripples due to
33+
another peak.
34+
35+
Where possible, diffpy.srmise provides physically reasonable default values
36+
for extraction parameters. However, the PDF baseline should be estimated by
37+
the user before extraction, or by performing provisional peak extraction with
38+
varying baseline parameters. The package defines a linear (crystalline)
39+
baseline, arbitrary polynomial baseline, a spherical nanoparticle baseline,
40+
and an arbitrary baseline interpolated from a list of user-supplied values.
41+
In addition, PDFs with accurate experimentally-determined uncertainties are
42+
necessary to provide the most reliable results, but historically such PDFs
43+
are rare. In the absence of accurate uncertainties an ad hoc uncertainty
44+
must be specified.
4545

4646

4747
===================
@@ -81,7 +81,7 @@ Where next?
8181

8282
tutorial/index.rst
8383
extending.rst
84-
84+
8585
======================================
8686
API
8787
======================================

doc/source/license.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT
99
=============================
1010
BSD 3-Clause License
1111

12-
Copyright (c) 2024, The Trustees of Columbia University in
12+
Copyright (c) 2024, The Trustees of Columbia University in
1313
the City of New York.
14-
All Rights Reserved.
14+
All Rights Reserved.
1515

1616
Redistribution and use in source and binary forms, with or without
1717
modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)