Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle GC layout #201

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chem_spectra/lib/composer/ni.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def tf_img(self):
plt.plot(self.core.xs, self.core.ys)
x_max, x_min = self.core.boundary['x']['max'], self.core.boundary['x']['min'] # noqa: E501

xlim_left, xlim_right = [x_min, x_max] if (self.core.is_tga or self.core.is_uv_vis or self.core.is_hplc_uv_vis or self.core.is_xrd or self.core.is_cyclic_volta or self.core.is_sec or self.core.is_cds or self.core.is_aif or self.core.is_emissions or self.core.is_dls_acf or self.core.is_dls_intensity) else [x_max, x_min] # noqa: E501
xlim_left, xlim_right = [x_min, x_max] if (self.core.is_tga or self.core.is_gc or self.core.is_uv_vis or self.core.is_hplc_uv_vis or self.core.is_xrd or self.core.is_cyclic_volta or self.core.is_sec or self.core.is_cds or self.core.is_aif or self.core.is_emissions or self.core.is_dls_acf or self.core.is_dls_intensity) else [x_max, x_min] # noqa: E501
plt.xlim(xlim_left, xlim_right)
y_max, y_min = np.max(self.core.ys), np.min(self.core.ys)
h = y_max - y_min
Expand Down
6 changes: 5 additions & 1 deletion chem_spectra/lib/converter/fid/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __set_properties(self):
self.is_em_wave = self.__is_em_wave()
self.is_ir = self.__is_ir()
self.is_tga = self.__is_tga()
self.is_gc = self.__is_gc()
self.is_uv_vis = self.__is_uv_vis()
self.is_hplc_uv_vis = self.__is_hplc_uv_vis()
self.is_xrd = self.__is_xrd()
Expand All @@ -82,14 +83,17 @@ def __is_em_wave(self):
return self.typ in ['INFRARED', 'RAMAN', 'UVVIS']

def __non_nmr(self):
return self.typ in ['INFRARED', 'RAMAN', 'UVVIS', 'HPLC UVVIS', 'THERMOGRAVIMETRIC ANALYSIS', 'MS', 'X-RAY DIFFRACTION', 'CYCLIC VOLTAMMETRY', 'CIRCULAR DICHROISM SPECTROSCOPY'] # noqa: E501
return self.typ in ['INFRARED', 'RAMAN', 'UVVIS', 'HPLC UVVIS', 'THERMOGRAVIMETRIC ANALYSIS', 'MS', 'X-RAY DIFFRACTION', 'CYCLIC VOLTAMMETRY', 'CIRCULAR DICHROISM SPECTROSCOPY', 'GAS CHROMATOGRAPHY'] # noqa: E501

def __is_ir(self):
return self.typ in ['INFRARED']

def __is_tga(self):
return self.typ in ['THERMOGRAVIMETRIC ANALYSIS']

def __is_gc(self):
return self.typ in ['GAS CHROMATOGRAPHY']

def __is_uv_vis(self):
return self.typ in ['UVVIS']

Expand Down
4 changes: 4 additions & 0 deletions chem_spectra/lib/converter/jcamp/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, path, params=False):
self.is_em_wave = self.__is_em_wave()
self.is_ir = self.__is_ir()
self.is_tga = self.__is_tga()
self.is_gc = self.__is_gc()
self.is_uv_vis = self.__is_uv_vis()
self.is_hplc_uv_vis = self.__is_hplc_uv_vis()
self.is_xrd = self.__is_xrd()
Expand Down Expand Up @@ -128,6 +129,9 @@ def __is_ir(self):
def __is_tga(self):
return self.typ in ['THERMOGRAVIMETRIC ANALYSIS']

def __is_gc(self):
return self.typ in ['GAS CHROMATOGRAPHY']

def __is_uv_vis(self):
return self.typ in ['UVVIS']

Expand Down
3 changes: 2 additions & 1 deletion chem_spectra/lib/converter/jcamp/data_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Emissions": ["Emissions", "EMISSIONS", "FLUORESCENCE SPECTRUM", "FL SPECTRUM"],
"DLS ACF": ["DLS ACF"],
"DLS intensity": ["DLS INTENSITY", "DLS intensity"],
"DIFFERENTIAL SCANNING CALORIMETRY": ["DIFFERENTIAL SCANNING CALORIMETRY"]
"DIFFERENTIAL SCANNING CALORIMETRY": ["DIFFERENTIAL SCANNING CALORIMETRY"],
"GAS CHROMATOGRAPHY": ["GAS CHROMATOGRAPHY"]
}
}
3 changes: 2 additions & 1 deletion chem_spectra/lib/converter/jcamp/data_type.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Emissions": ["Emissions", "EMISSIONS", "FLUORESCENCE SPECTRUM", "FL SPECTRUM"],
"DLS ACF": ["DLS ACF"],
"DLS intensity": ["DLS INTENSITY", "DLS intensity"],
"DIFFERENTIAL SCANNING CALORIMETRY": ["DIFFERENTIAL SCANNING CALORIMETRY"]
"DIFFERENTIAL SCANNING CALORIMETRY": ["DIFFERENTIAL SCANNING CALORIMETRY"],
"GAS CHROMATOGRAPHY": ["GAS CHROMATOGRAPHY"]
}
}
1 change: 1 addition & 0 deletions chem_spectra/lib/converter/jcamp/ni.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, base):
self.is_em_wave = base.is_em_wave
self.is_ir = base.is_ir
self.is_tga = base.is_tga
self.is_gc = base.is_gc
self.is_xrd = base.is_xrd
self.is_uv_vis = base.is_uv_vis
self.is_hplc_uv_vis = base.is_hplc_uv_vis
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
- astroid==2.15.8
- atomicwrites==1.4.1
- attrs==23.2.0
- certifi==2024.2.2
- certifi==2024.7.4
- cftime==1.6.3
- chardet==5.2.0
- charset-normalizer==3.3.2
Expand Down Expand Up @@ -87,6 +87,6 @@ dependencies:
- urllib3==1.26.19
- werkzeug==3.0.3
- wrapt==1.16.0
- zipp==0.5.2
- zipp==3.19.2
- -e git+https://github.com/ComPlat/nmrglue.git@e6e8a63b1848ae0525f07de0a6ec0cfdb900ba60#egg=nmrglue
prefix: /home/eln/anaconda3/envs/python-v38
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rdkit==2023.9.1
atomicwrites==1.4.1
attrs==23.2.0
certifi==2024.2.2
certifi==2024.7.4
chardet==5.2.0
Click==8.1.7
coverage==7.5.1
Expand Down Expand Up @@ -39,7 +39,7 @@ scipy==1.7.3
six==1.11.0
urllib3==1.26.19
Werkzeug==3.0.3
zipp==0.5.2
zipp==3.19.2
pyopenms==2.6.0
PyJWT==2.8.0
flask-jwt-extended==4.5.2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='chem-spectra-app',
version='1.2.2',
version='1.2.3',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
Expand Down
Loading