Skip to content

Commit ef3ff93

Browse files
committed
Fix data flipping logic and update version to 8.7.4
Commented out data reversal in nmr_preprocess.py and corrected data flipping logic in get_data(). Updated package version and download URL in setup.py to 8.7.4.
1 parent c72780f commit ef3ff93

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

metbit/nmr_preprocess.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __init__(self, data_path: str, bin_size: float = 0.0003,
212212
phase = [dic['procs']['PHC0'], dic['procs']['PHC1']]
213213

214214
data = ng.proc_base.di(data)
215-
data = ng.proc_base.rev(data)
215+
#data = ng.proc_base.rev(data)
216216

217217

218218

@@ -271,12 +271,18 @@ def __init__(self, data_path: str, bin_size: float = 0.0003,
271271
self.ppm = ppm
272272
self.dic_array = dic_list
273273
self.phase_data = phase_data
274+
self.nmr_data = nmr_data
274275
print("[DEBUG] Type of nmr_data:", type(self.nmr_data))
275276

276277

277278
def get_data(self, flip_data=True):
278279
print("[DEBUG] get_data() called")
279-
nmr_data = self.nmr_data.sort_index(inplace=True)
280+
nmr_data = self.nmr_data
281+
nmr_data.sort_index(inplace=True)
282+
if self.flip_data:
283+
nmr_data = nmr_data.iloc[:, ::-1]
284+
else:
285+
nmr_data = nmr_data
280286
return nmr_data
281287

282288
def get_ppm(self):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
setup(
1313
name = 'metbit',
1414
packages = ['metbit'],
15-
version = '8.7.3',
15+
version = '8.7.4',
1616
license='MIT',
1717
description = 'Metabolomics data analysis and visualization tools.',
1818
author = 'aeiwz',
1919
author_email = 'theerayut_aeiw_123@hotmail.com',
2020
url = 'https://github.com/aeiwz/metbit.git',
21-
download_url = 'https://github.com/aeiwz/metbit/archive/refs/tags/V8.7.3.tar.gz',
21+
download_url = 'https://github.com/aeiwz/metbit/archive/refs/tags/V8.7.4.tar.gz',
2222
keywords = ['Omics', 'Multivariate analysis', 'Visualization', 'Data Analysis', 'Metabolomics', 'Chemometrics'],
2323
install_requires=[
2424
'scikit-learn',

0 commit comments

Comments
 (0)