Skip to content

Commit

Permalink
fix typos suggested by codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj committed Nov 8, 2024
1 parent 2acb52c commit 46c0697
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ socio-economic

;; Frobenius norm used in np.linalg.norm
fro

;; library used for Python package release, no longer used
rever
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ trying to commit again.

Improvements and fixes are always appreciated.

Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfmorph/blob/main/CODE_OF_CONDUCT.rst>`_.
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfmorph/blob/main/CODE_OF_CONDUCT.rst>`_.

Contact
-------
Expand Down
4 changes: 2 additions & 2 deletions TUTORIAL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Basic PDFmorph Workflow

We are getting closer to an acceptably close fit to our data!

8. Finally, we will examine the stretch factor. Provide an intial
8. Finally, we will examine the stretch factor. Provide an initial
guess by typing ::

pdfmorph --scale=0.8 --smear=-0.08 --stretch=0.5 --rmin=1.5 --rmax=30 -a darkSub_rh20_C_01.gr darkSub_rh20_C_44.gr
Expand Down Expand Up @@ -183,5 +183,5 @@ Enjoy the software!
Bug Reports
-----------

Please enjoy using our software! If you come accross any bugs in the
Please enjoy using our software! If you come across any bugs in the
application, please report them to [email protected]
2 changes: 1 addition & 1 deletion doc/manual/acknowledgements.texinfo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The PDFmorph app was developed by the Billinge group at Columbia University.
The examples in the tutorial part of the manual were made possible by data
collected by Soham Banerjee at Brookhaven National Laboratory,
Benjamin Frandsen during his PhD at Columbia Unversity,
Benjamin Frandsen during his PhD at Columbia University,
and Long Yang from Tonji University.

The DiffPy development team is the set of all contributors to DiffPy projects.
Expand Down
24 changes: 12 additions & 12 deletions doc/manual/pdfmorph.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ it has not been extensively tested beyond the PDF.
It runs on Windows, Mac OS, Linux, and all major Unix systems.
The source code is freely available at @url{https://github.com/diffpy/diffpy.pdfmorph}.

If you come accross any bugs in the application, please open an
If you come across any bugs in the application, please open an
@url{https://github.com/diffpy/diffpy.pdfmorph/issues, issue} or email
diffpy-dev@@googlegroups.com.

Expand Down Expand Up @@ -440,8 +440,8 @@ extra tutorial data @code{additionalData.zip}} before proceeding.
@cindex performing multiple morphs

It may be useful to morph a PDF against multiple targets: for example, you may want
to morph a PDF against a sequence of PDFs measured at various temepratures to determine
whether a phase change has occured. PDFmorph currently allows users to morph a PDF
to morph a PDF against a sequence of PDFs measured at various temperatures to determine
whether a phase change has occurred. PDFmorph currently allows users to morph a PDF
against all files in a selected directory and plot resulting @math{R_W} values from each morph.
It is advised that the lowest temperature PDF be that morphed and the higher temperature PDFs
act as targets as the smear morph is only able to account for increases in thermal motion.
Expand Down Expand Up @@ -619,15 +619,15 @@ Again, we can begin by plotting the bulk material against our nanoparticle.
@example
pdfmorph Ni_bulk.gr Ni_nano_spheroid.cgr
@end example
@item The nanoparticle shape of the calculated PDF is an oblate spheroid with equitorial
@item The nanoparticle shape of the calculated PDF is an oblate spheroid with equatorial
radius of about @math{12} and polar radius of about @math{6} (this information is contained
within the @code{Ni_nano_spheroid.cgr} file). To apply the spheroidal shape effects onto the
bulk, run
@example
pdfmorph Ni_bulk.gr Ni_nano_spheroid.cgr --radius=12 --pradius=6 -a
@end example
@itemize
@item The @code{--radius} option corresponds to the equitorial radius.
@item The @code{--radius} option corresponds to the equatorial radius.
@item The @code{--pradius} option corresponds to the polar radius.
@end itemize
@item Run the same command without @code{-a} to refine. Refining should give
Expand Down Expand Up @@ -792,24 +792,24 @@ using atomic pair distribution function analysis. Phys. Rev. B, 76(11), 115413.
The available shape morphs are listed below:
@itemize
@item @code{--radius=RADIUS} - Multiply the PDF by the nanoparticle form factor for a sphere of radius @code{RADIUS}.
If used with @code{--pradius}, multiply the PDF by the nanoparticle form factor for a spheroid of equitorial radius
If used with @code{--pradius}, multiply the PDF by the nanoparticle form factor for a spheroid of equatorial radius
@code{RADIUS} and polar radius @code{PRADIUS}.
@itemize
@item The sphere form factor was computed by Kodama et al. @footnote{Kodama, K., Iikubo, S., Taguchi, T., &
Shamoto, S. (2006). Finite size effects of nanoparticles on the atomic pair distribution functions.
Acta Crystallographica Section A, 62(6), 444–453. @url{https://doi.org/10.1107/S0108767306034635}}.
@end itemize
@item @code{--pradius=PRADIUS} - Multiply the PDF by the nanoparticle form factor for a spheroid of equitorial radius
@item @code{--pradius=PRADIUS} - Multiply the PDF by the nanoparticle form factor for a spheroid of equatorial radius
@code{RADIUS} and polar radius @code{PRADIUS}.
@itemize
@item The spheroid form factor was computed by Lei et al. @footnote{Lei, M., de Graff, A. M. R., Thorpe, M. F., Wells,
S. A., & Sartbaeva, A. (2009). Uncovering the intrinsic geometry from the atomic pair distribution function of
nanomaterials. Phys. Rev. B, 80(2), 024118. @url{https://doi.org/10.1103/PhysRevB.80.024118}}.
@end itemize
@item @code{--iradius=IRADIUS} - Divide the PDF by the nanoparticle form factor for a sphere of radius @code{IRADIUS}.
If used with @code{--ipradius}, divide the PDF by the nanoparticle form factor for a spheroid of equitorial radius
If used with @code{--ipradius}, divide the PDF by the nanoparticle form factor for a spheroid of equatorial radius
@code{IRADIUS} and polar radius @code{IPRADIUS}.
@item @code{--ipradius=IPRADIUS} - Divide the PDF by the nanoparticle form factor for a spheroid of equitorial radius
@item @code{--ipradius=IPRADIUS} - Divide the PDF by the nanoparticle form factor for a spheroid of equatorial radius
@code{IRADIUS} and polar radius @code{IPRADIUS}.
@end itemize

Expand Down Expand Up @@ -842,7 +842,7 @@ post-expansion. The volume of the nanoparticle also increases by a factor @math{
@displaymath
\gamma'_0(\vec{r}) = {1 \over {\alpha^3 V}} \int \int \int s'(\vec{r}')s'(\vec{r}'+\vec{r})d\vec{r}'.
@end displaymath
Aplying a change of variables @math{\vec{r}' \rightarrow \vec{r}' / \alpha} gives
Applying a change of variables @math{\vec{r}' \rightarrow \vec{r}' / \alpha} gives
@displaymath
\gamma'_0(\vec{r}) = {1 \over {\alpha^3 V}} \int \int \int s'(\alpha \vec{r}')s'(\alpha \vec{r}'+\vec{r})\alpha^3d\vec{r}',
@end displaymath
Expand Down Expand Up @@ -963,7 +963,7 @@ requires us to apply a Gaussian dampening envelope centered at @math{r=0} with w
@noindent @code{--radius=RADIUS}
@* @indent Apply the nanoparticle form factor @math{\gamma_0} for a sphere of radius @code{RADIUS}.
If @code{PRADIUS} is also specified, instead apply the characteristic function of a spheroid with
equitorial radius @code{RADIUS} and polar radius @code{PRADIUS}.
equatorial radius @code{RADIUS} and polar radius @code{PRADIUS}.

@noindent @code{--pradius=PRADIUS}
@* @indent If @code{RADIUS} is also specified, see @code{--radius}. Otherwise, apply the characteristic
Expand All @@ -972,7 +972,7 @@ function of a sphere with radius @code{PRADIUS}.
@noindent @code{--iradius=IRADIUS}
@* @indent Apply the inverse characteristic function @math{1/\gamma_0} of a sphere of radius @code{IRADIUS}/
If @code{IPRADIUS} is also specified, instead apply the characteristic function of a spheroid with
equitorial radius @code{IRADIUS} and polar radius @code{PRADIUS}.
equatorial radius @code{IRADIUS} and polar radius @code{PRADIUS}.

@noindent @code{--ipradius=IPRADIUS}
@* @indent If @code{IRADIUS} is also specified, see @code{--iradius}. Otherwise, apply the characteristic
Expand Down
8 changes: 4 additions & 4 deletions doc/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Basic PDFmorph Workflow

We are getting closer to an acceptably close fit to our data!

8. Finally, we will examine the stretch factor. Provide an intial
8. Finally, we will examine the stretch factor. Provide an initial
guess by typing ::

pdfmorph --scale=0.8 --smear=-0.08 --stretch=0.5 --rmin=1.5 --rmax=30 -a darkSub_rh20_C_01.gr darkSub_rh20_C_44.gr
Expand Down Expand Up @@ -193,7 +193,7 @@ Performing Multiple Morphs

It may be useful to morph a PDF against multiple targets:
for example, you may want to morph a PDF against multiple PDFs measured
at various temepratures to determine whether a phase change has occured.
at various temperatures to determine whether a phase change has occurred.
PDFmorph currently allows users to morph a PDF against all files in a
selected directory and plot resulting :math:`R_w` values from each morph.

Expand Down Expand Up @@ -285,7 +285,7 @@ Currently, the supported nanoparticle shapes include: spheres and spheroids.

pdfmorph Ni_bulk.gr Ni_nano_spheroid.cgr --radius=12 --pradius=6 -a

Note that the equitorial radius corresponds to the ``--radius`` parameter and polar radius to ``--pradius``.
Note that the equatorial radius corresponds to the ``--radius`` parameter and polar radius to ``--pradius``.
3. Remove the ``-a`` tag to refine.

There is also support for morphing from a nanoparticle to a bulk. When applying the inverse morphs,
Expand All @@ -294,5 +294,5 @@ it is recommended to set ``--rmax=psize`` where ``psize`` is the longest diamete
Bug Reports
===========

Please enjoy using our software! If you come accross any bugs in the
Please enjoy using our software! If you come across any bugs in the
application, please report them to [email protected].
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies = {file = ["requirements/pip.txt"]}
[tool.codespell]
exclude-file = ".codespell/ignore_lines.txt"
ignore-words = ".codespell/ignore_words.txt"
skip = "*.cif,*.dat"
skip = "*.cif,*.dat,*agr"

[tool.black]
line-length = 115
Expand Down
8 changes: 4 additions & 4 deletions src/diffpy/pdfmorph/pdfmorph_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def pdfmorph(
verbose=False,
**kwargs,
):
"""function to perfom PDF morphing.
"""function to perform PDF morphing.
Parameters
----------
Expand Down Expand Up @@ -142,7 +142,7 @@ def pdfmorph(
- morph_chain: diffpy.pdfmorph.morphs.morphchain.MorphChain
The instance of processed morph chain.
Calling ``x_morph, y_morph, x_target, y_target = morph_chain.xyallout``
will conviniently retrun morphed data and reference data
will conveniently return morphed data and reference data
- morphed_cfg: dict
A dictionary of refined morphing parameters
- rw: float
Expand Down Expand Up @@ -248,11 +248,11 @@ def plot_morph(chain, ax=None, **kwargs):
----------
chain: diffpy.pdfmorph.morphs.morphchain.MorphChain
An instance of processed morph chain.
ax: matplotlib.axes.Axes, optinal
ax: matplotlib.axes.Axes, optional
An instance of Axes class to plot the morphing result.
If ax is None, instances of new Figure and Axes will be created. Default to None.
kwargs:
Additional keyword arguements will be passed to ``ax.plot(...**kwargs)``
Additional keyword arguments will be passed to ``ax.plot(...**kwargs)``
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfmorph/pdfmorph_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def single_morph_output(
morph_results: dict
Resulting data after morphing.
save_file
Name of file to print to. If None (defualt) print to terminal.
Name of file to print to. If None (default) print to terminal.
morph_file
Name of the morphed PDF file. Required when printing to a non-terminal file.
param xy_out: list
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfmorph/refine.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _pearson(self, pvals):
"""Pearson correlation function.
This gives e**-p (vector), where p is the pearson correlation function.
We seek to minimize this, which occurrs when the correlation is the largest.
We seek to minimize this, which occurs when the correlation is the largest.
"""
self._update_chain(pvals)
_x_morph, _y_morph, _x_target, _y_target = self.chain(
Expand Down

0 comments on commit 46c0697

Please sign in to comment.