Skip to content

Commit 0f8af4a

Browse files
committed
Change order in which r-grid is compared
1 parent 8364a94 commit 0f8af4a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/diffpy/morph/morphapp.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ def custom_error(self, msg):
106106
type="float",
107107
help="Maximum r-value to use for PDF comparisons.",
108108
)
109+
parser.add_option(
110+
"--rgrid",
111+
dest="rgrid",
112+
metavar="GRID",
113+
help="Choose the to refine on. ",
114+
)
109115
parser.add_option(
110116
"--tolerance",
111117
"-t",
@@ -506,8 +512,6 @@ def single_morph(
506512

507513
# Set up the morphs
508514
chain = morphs.MorphChain(config)
509-
# Add the r-range morph, we will remove it when saving and plotting
510-
chain.append(morphs.MorphRGrid())
511515
refpars = []
512516

513517
# Python-Specific Morphs
@@ -632,6 +636,10 @@ def single_morph(
632636
refpars.append("qdamp")
633637
config["qdamp"] = opts.qdamp
634638

639+
# Add the r-range morph, we will remove it when saving and plotting
640+
mrg = morphs.MorphRGrid()
641+
chain.append(mrg)
642+
635643
# Now remove non-refinable parameters
636644
if opts.exclude is not None:
637645
refpars = list(set(refpars) - set(opts.exclude))
@@ -674,7 +682,8 @@ def single_morph(
674682
rw = tools.getRw(chain)
675683
pcc = tools.get_pearson(chain)
676684
# Replace the MorphRGrid with Morph identity
677-
chain[0] = morphs.Morph()
685+
# This removes the r-range morph as mentioned above
686+
mrg = morphs.Morph()
678687
chain(x_morph, y_morph, x_target, y_target)
679688

680689
# FOR FUTURE MAINTAINERS

0 commit comments

Comments
 (0)