Skip to content

Commit 2a02733

Browse files
committed
Add docstring, rename function
1 parent ad0009d commit 2a02733

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/diffpy/morph/morph_io.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def custom_formatwarning(msg, *args, **kwargs):
3434
warnings.formatwarning = custom_formatwarning
3535

3636

37-
def get_morph_inputs(
37+
def build_morph_inputs_container(
3838
scale,
3939
stretch,
4040
smear_pdf,
@@ -62,6 +62,17 @@ def get_morph_inputs(
6262
opts.vshift
6363
squeeze
6464
opts.squeeze
65+
66+
Returns
67+
-------
68+
dict
69+
Dictionary of input morphing parameters.
70+
Only one of smear and smear_pdf is included
71+
(takes smear_pdf over smear when both exist).
72+
Does not include hshift if a degree zero
73+
or above squeeze is used.
74+
Does not include stretch if a degree one
75+
or above squeeze is used.
6576
"""
6677
squeeze_poly_deg = -1
6778
squeeze_in = None

src/diffpy/morph/morphapp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ def single_morph(
725725
# if you think there requires special handling
726726

727727
# Input morph parameters
728-
morph_inputs = io.get_morph_inputs(
728+
morph_inputs = io.build_morph_inputs_container(
729729
opts.scale,
730730
opts.stretch,
731731
opts.smear_pdf,
@@ -952,7 +952,7 @@ def multiple_targets(parser, opts, pargs, stdout_flag=True, python_wrap=False):
952952
for key in morph_results.keys():
953953
target_file_names.append(key)
954954

955-
morph_inputs = io.get_morph_inputs(
955+
morph_inputs = io.build_morph_inputs_container(
956956
opts.scale,
957957
opts.stretch,
958958
opts.smear_pdf,
@@ -1138,7 +1138,7 @@ def multiple_morphs(parser, opts, pargs, stdout_flag=True, python_wrap=False):
11381138
for key in morph_results.keys():
11391139
morph_file_names.append(key)
11401140

1141-
morph_inputs = io.get_morph_inputs(
1141+
morph_inputs = io.build_morph_inputs_container(
11421142
opts.scale,
11431143
opts.stretch,
11441144
opts.smear_pdf,

0 commit comments

Comments
 (0)