Skip to content

Commit 36957e0

Browse files
committed
change rebinArray to rebin_array
1 parent 80d0f4b commit 36957e0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

news/profile-dep.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Added ``load_parsed_data`` in replace of ``loadParsedData`` in ``Profile`` and ``SimpleRecipe``.
44
* Added ``set_observed_profile`` in replace of ``setObservedProfile`` in ``Profile`` and ``SimpleRecipe``.
55
* Added ``set_calculation_range`` in replace of ``setCalculationRange`` in ``Profile`` and ``SimpleRecipe``.
6+
* Added ``set_calculation_points`` in replace of ``setCalculationPoints`` in ``Profile`` and ``SimpleRecipe``.
67

78
**Changed:**
89

@@ -13,6 +14,7 @@
1314
* Deprecated ``loadParsedData`` in ``Profile`` and ``SimpleRecipe`` for removal in 4.0.0.
1415
* Deprecated ``setObservedProfile`` in ``Profile`` and ``SimpleRecipe`` for removal in 4.0.0.
1516
* Deprecated ``setCalculationRange`` in ``Profile`` and ``SimpleRecipe`` for removal in 4.0.0.
17+
* Deprecated ``setCalculationPoints`` in ``Profile`` and ``SimpleRecipe`` for removal in 4.0.0.
1618

1719
**Removed:**
1820

src/diffpy/srfit/fitbase/profile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,15 @@ def set_calculation_points(self, x):
361361
x = x[x <= self.xobs[-1] + epsilon]
362362
self.x = x
363363
if self.yobs is not None:
364-
self.y = rebinArray(self.yobs, self.xobs, self.x)
364+
self.y = rebin_array(self.yobs, self.xobs, self.x)
365365
if self.dyobs is not None:
366366
# work around for interpolation issue making some of these non-1
367367
if (self.dyobs == 1).all():
368368
self.dy = numpy.ones_like(self.x)
369369
else:
370370
# FIXME - This does not follow error propagation rules and it
371371
# introduces (more) correlation between the data points.
372-
self.dy = rebinArray(self.dyobs, self.xobs, self.x)
372+
self.dy = rebin_array(self.dyobs, self.xobs, self.x)
373373

374374
return
375375

@@ -500,7 +500,7 @@ def _validate(self):
500500
# End class Profile
501501

502502

503-
def rebinArray(A, xold, xnew):
503+
def rebin_array(A, xold, xnew):
504504
"""Rebin the an array by interpolating over the new x range.
505505
506506
Parameters

0 commit comments

Comments
 (0)