diff --git a/news/smear_pdf_bug.rst b/news/smear_pdf_bug.rst new file mode 100644 index 00000000..1b897755 --- /dev/null +++ b/news/smear_pdf_bug.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* When transforming from the RDF to PDF in the smear-pdf morph, we incorrectly referenced the target grid zero point, when we should be referencing the morph grid zero point. This would lead to the morph PDF being set to zero on a point corresponding to when the target PDF grid value is zero. The correct behavior is for the morph PDF to be set to zero when the morph PDF grid value is zero. This has been fixed. + +**Security:** + +* diff --git a/src/diffpy/morph/morph_helpers/transformrdftopdf.py b/src/diffpy/morph/morph_helpers/transformrdftopdf.py index 495c7dda..54656ccf 100644 --- a/src/diffpy/morph/morph_helpers/transformrdftopdf.py +++ b/src/diffpy/morph/morph_helpers/transformrdftopdf.py @@ -57,7 +57,7 @@ def morph(self, x_morph, y_morph, x_target, y_target): self.y_morph_out = ( self.y_morph_in / self.x_morph_in + morph_baseline ) - self.y_morph_out[self.x_target_in == 0] = 0 + self.y_morph_out[self.x_morph_in == 0] = 0 return self.xyallout