Fixing interpolation error

In some spectra there's discrepancy between
the number of points in spectrum (NPT variable),
and real number of points (shape of array)

In this commit we decide that REAL NUMBER is the value we should care about
This commit is contained in:
t2 2019-09-16 15:02:14 +02:00
parent dfb068fee1
commit 5f2ecbfc26
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,8 @@ class OpusData(dict):
param_key = f"{spec_name} Data Parameter"
fxv = self[param_key]["FXV"]
lxv = self[param_key]["LXV"]
npt = self[param_key]["NPT"]
# NPT and REAL NUMBER OF POINTS may differ
npt = self[spec_name].shape[0]
x_no_unit = np.linspace(fxv, lxv, npt)
if wavenums:
return x_no_unit

View File

@ -3,12 +3,11 @@ from distutils.core import setup
setup(
name="brukeropusreader",
version="1.3.3",
version="1.3.4",
description="Bruker OPUS File Reader",
author="QED",
author_email="brukeropusreader-dev@qed.ai",
packages=["brukeropusreader"],
python_requires=">=3",
install_requires=["numpy>=1.13.3", "scipy>=0.19.1"],
license="GPLv3",
url="https://github.com/qedsoftware/brukeropusreader",