diff --git a/news/config_order.rst b/news/config_order.rst new file mode 100644 index 00000000..718a0f61 --- /dev/null +++ b/news/config_order.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* The interpolation of the morphed/objective function onto the target function grid is now done at the end of the morphing chain. Prior, it was done before. This change is desirable as the target function grid may be much smaller/larger than that of the objective, but a morph (e.g. stretch) accounts for that difference. Then, we ensure the morph is done before we regrid for comparison. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/morph/morphapp.py b/src/diffpy/morph/morphapp.py index 70737bf2..43f71ce1 100755 --- a/src/diffpy/morph/morphapp.py +++ b/src/diffpy/morph/morphapp.py @@ -506,8 +506,6 @@ def single_morph( # Set up the morphs chain = morphs.MorphChain(config) - # Add the r-range morph, we will remove it when saving and plotting - chain.append(morphs.MorphRGrid()) refpars = [] # Python-Specific Morphs @@ -632,6 +630,10 @@ def single_morph( refpars.append("qdamp") config["qdamp"] = opts.qdamp + # Add the r-range morph, we will remove it when saving and plotting + mrg = morphs.MorphRGrid() + chain.append(mrg) + # Now remove non-refinable parameters if opts.exclude is not None: refpars = list(set(refpars) - set(opts.exclude)) @@ -674,7 +676,8 @@ def single_morph( rw = tools.getRw(chain) pcc = tools.get_pearson(chain) # Replace the MorphRGrid with Morph identity - chain[0] = morphs.Morph() + # This removes the r-range morph as mentioned above + mrg = morphs.Morph() chain(x_morph, y_morph, x_target, y_target) # FOR FUTURE MAINTAINERS