Skip to content

Commit 7366ae7

Browse files
committed
Docstring fixes
1 parent 7037d20 commit 7366ae7

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

news/docstring.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Changed:**
66

7-
* Docstrings updated for better clarity
7+
* <news item>
88

99
**Deprecated:**
1010

@@ -16,7 +16,7 @@
1616

1717
**Fixed:**
1818

19-
* <news item>
19+
* Docstrings updated for better clarity.
2020

2121
**Security:**
2222

src/diffpy/morph/morphapp.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,29 @@ def custom_error(self, msg):
240240
type="float",
241241
dest="baselineslope",
242242
help=(
243-
"Slope of the baseline. This is used with the option "
243+
"Slope of the baseline. "
244+
"For a bulk material with scale factor 1, "
245+
"this will have value -4\u03C0 times the atomic density. "
246+
"Otherwise, you can estimate it by dividing the y "
247+
"position from the x position "
248+
"of the base of the first peak. "
249+
"This is used with the option "
244250
"--smear-pdf to convert from the PDF to RDF. "
245-
"It will be estimated if not provided."
251+
"It will be estimated as a number near"
252+
"-0.5 if not provided. "
246253
),
247254
)
248255
group.add_option(
249256
"--hshift",
250257
type="float",
251258
metavar="HSHIFT",
252-
help="Shift the PDF horizontally by HSHIFT to the right.",
259+
help="Shift the function horizontally by HSHIFT to the right.",
253260
)
254261
group.add_option(
255262
"--vshift",
256263
type="float",
257264
metavar="VSHIFT",
258-
help="Shift the PDF vertically by VSHIFT upward.",
265+
help="Shift the function vertically by VSHIFT upward.",
259266
)
260267
group.add_option(
261268
"--qdamp",
@@ -446,7 +453,7 @@ def custom_error(self, msg):
446453
metavar="SERIALFILE",
447454
dest="serfile",
448455
help=(
449-
"Look for FIELD in a serial file instead. "
456+
"Look for FIELD in a serialization file (e.g. .json) instead. "
450457
"Must specify name of serial file SERIALFILE."
451458
),
452459
)
@@ -456,14 +463,15 @@ def custom_error(self, msg):
456463
dest="snamesfile",
457464
help=(
458465
"Used when both -s and --multiple-<targets/morphs> are enabled. "
459-
"Specify names for each manipulated PDF when saving (see -s) "
460-
"using a serial file NAMESFILE. The format of NAMESFILE should "
461-
"be as follows: each target PDF is an entry in NAMESFILE. "
466+
"Specify names for each manipulated function when saving "
467+
"(see -s) using a serial file NAMESFILE. "
468+
"The format of NAMESFILE should be as follows: "
469+
"each target function is an entry in NAMESFILE. "
462470
"For each entry, there should be a key {__save_morph_as__} "
463471
"whose value specifies the name to save the manipulated "
464472
"function as."
465-
"An example .json serial file is included in the tutorial "
466-
"directory on the package GitHub repository."
473+
"An example .json serialization file is included in the "
474+
"tutorial directory on the package GitHub repository."
467475
),
468476
)
469477
group.add_option(

0 commit comments

Comments
 (0)