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
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
:target: https://github.com/diffpy/diffpy.morph/issues

Python package for manipulating and comparing diffraction data
Python package for manipulating and comparing diffraction data.

``diffpy.morph`` is a Python software package designed to increase the insight
researchers can obtain from measured data including diffraction data
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
diffpy.morph documentation
##########################

``diffpy.morph`` - Tools for manipulating and comparing PDF profiles
``diffpy.morph`` - Tools for manipulating and comparing 1D signals.

| Software version |release|
| Last updated |today|.
Expand Down
23 changes: 23 additions & 0 deletions news/save_pdf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Default labels for saving are now [x] and [fx] instead of [r] and [gr].

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
2 changes: 1 addition & 1 deletion src/diffpy/morph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See LICENSE.rst for license information.
#
##############################################################################
"""Python package for manipulating and comparing PDF profiles."""
"""Python package for manipulating and comparing 1D signals."""

# key used when saving multiple morphs
__save_morph_as__ = "save_morph_as"
Expand Down
6 changes: 3 additions & 3 deletions src/diffpy/morph/morph_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def single_morph_output(
path_name = "NO FILE PATH PROVIDED"
else:
path_name = str(Path(morph_file).resolve())
header = "# PDF created by diffpy.morph\n"
header = "# Function created by diffpy.morph\n"
header += f"# from {path_name}"

header_verbose = f"{morphs_in}\n{morphs_out}"
Expand All @@ -236,7 +236,7 @@ def single_morph_output(
print(header_verbose, file=outfile)

# Print table with label
print("\n# Labels: [r] [gr]", file=outfile)
print("\n# Labels: [x] [fx]", file=outfile)
numpy.savetxt(outfile, numpy.transpose(xy_out))

if stdout_flag:
Expand All @@ -246,7 +246,7 @@ def single_morph_output(

else:
# Just print table with label if save is to stdout
print("# Labels: [r] [gr]")
print("# Labels: [x] [fx]")
numpy.savetxt(sys.stdout, numpy.transpose(xy_out))


Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/funcy_target.cgr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from NO FILE PATH PROVIDED

# Input morphing parameters:
Expand Down Expand Up @@ -32,7 +32,7 @@ def quadratic(x, y, a0, a1, a2):
# Rw = 0.000000
# Pearson = 1.000000

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 1.000000000000000000e+00
1.000000000000000056e-01 1.229999999999999982e+00
2.000000000000000111e-01 1.520000000000000018e+00
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/squeeze_morph.cgr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000056e-01 2.016607210740701817e-01
2.000000000000000111e-01 4.012816425967311584e-01
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/squeeze_target.cgr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -24,7 +24,7 @@
# Rw = 0.000000
# Pearson = 1.000000

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 -8.357788796904224253e-08
1.000000000000000056e-01 9.983335989539958433e-02
2.000000000000000111e-01 1.986692882755068390e-01
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.127100
# Pearson = 0.992111

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.117595
# Pearson = 0.993160

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.105918
# Pearson = 0.994409

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.062392
# Pearson = 0.998077

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.034859
# Pearson = 0.999424

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.020141
# Pearson = 0.999810

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PDF created by diffpy.morph
# Function created by diffpy.morph
# from PATH

# Input morphing parameters:
Expand All @@ -15,7 +15,7 @@
# Rw = 0.127100
# Pearson = 0.992111

# Labels: [r] [gr]
# Labels: [x] [fx]
0.000000000000000000e+00 0.000000000000000000e+00
1.000000000000000021e-02 4.042510000000000027e-04
2.000000000000000042e-02 7.817419999999999838e-04
Expand Down
Loading