From 641b5e7de84e5766fcd0a78f2eef23e81469d9b7 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Tue, 12 Nov 2024 17:35:25 -0500 Subject: [PATCH] Prevent duplication of morphshift --- src/diffpy/pdfmorph/pdfmorphapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diffpy/pdfmorph/pdfmorphapp.py b/src/diffpy/pdfmorph/pdfmorphapp.py index 8f99c04..2a25a5f 100755 --- a/src/diffpy/pdfmorph/pdfmorphapp.py +++ b/src/diffpy/pdfmorph/pdfmorphapp.py @@ -364,14 +364,14 @@ def single_morph(parser, opts, pargs, stdout_flag=True): config["stretch"] = stretch_in refpars.append("stretch") # Shift + if opts.hshift is not None or opts.vshift is not None: + chain.append(morphs.MorphShift()) if opts.hshift is not None: hshift_in = opts.hshift - chain.append(morphs.MorphShift()) config["hshift"] = hshift_in refpars.append("hshift") if opts.vshift is not None: vshift_in = opts.vshift - chain.append(morphs.MorphShift()) config["vshift"] = vshift_in refpars.append("vshift") # Smear