Skip to content

Commit 742643c

Browse files
authored
Bug fix for --smear-pdf (#234)
* Bug fix for smear-pdf * News
1 parent f8ee98a commit 742643c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

news/smear_pdf_bug.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* 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.
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/morph/morph_helpers/transformrdftopdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def morph(self, x_morph, y_morph, x_target, y_target):
5757
self.y_morph_out = (
5858
self.y_morph_in / self.x_morph_in + morph_baseline
5959
)
60-
self.y_morph_out[self.x_target_in == 0] = 0
60+
self.y_morph_out[self.x_morph_in == 0] = 0
6161
return self.xyallout
6262

6363

0 commit comments

Comments
 (0)