Giter Club home page Giter Club logo

spectrochempy / spectrochempy Goto Github PK

View Code? Open in Web Editor NEW
120.0 120.0 24.0 483.56 MB

SpectroChemPy is a framework for processing, analyzing and modeling spectroscopic data for chemistry with Python

Home Page: https://www.spectrochempy.fr

License: Other

Python 99.92% Dockerfile 0.05% Shell 0.03%
chemistry data-analysis datasets ftir ftir-data-analysis infrared nmr nmr-data nmr-spectroscopy processing python raman raman-spectra raman-spectroscopy spectroscopy uv-vis

spectrochempy's Introduction


SpectroChemPy

Tests Actions Status Maintainability Test Coverage Conda PyPI version Docs DOI Conda

What is SpectroChemPy?

SpectroChemPy (SCPy) is a framework for processing, analyzing and modeling Spectroscopic data for Chemistry with Python. It is a cross-platform software, running on Linux, Windows or OS X.

Features

Among its major features:

  • A NDDataset object embedding array of data with labeled axes and metadata.
  • A Project manager to work on multiple NDDataset simultaneously.
  • Physical Units for NDDataset.
  • Mathematical operations over NDDataset such addition, multiplication and many more ...
  • Import functions to read data from experiments or modeling programs ...
  • Display functions such as plot for 1D or nD datasets ...
  • Export functions to csv, xls formats ...
  • Preprocessing functions such as baseline correction, automatic subtraction and many more ...
  • Fitting capabilities for single or multiple datasets ...
  • Exploratory analysis such as SVD, PCA, MCR_ALS, EFA ...

Warning:

 SpectroChemPy is still experimental and under active development.
 Its current design is subject to major changes, reorganizations, bugs and crashes!!!.
 Please report any issues to the Issue Tracker.

Documentation

The online Html documentation is available here: HTML documentation

Examples, tutorials

A zip archive of all the notebooks corresponding to the documentation can be found here

Installation

Follow the instructions here: Installation guide

Issue Tracker

You find a problem, want to suggest enhancements or want to look at the current issues and milestones, you can go there: Issue Tracker

Citing SpectroChemPy

When using SpectroChemPy for your own work, you are kindly requested to cite using the recommandation here.

Source repository

The sources are versioned using the git system and hosted on the GitHub platform: https://github.com/spectrochempy/spectrochempy

License

CeCILL-B FREE SOFTWARE LICENSE AGREEMENT

spectrochempy's People

Contributors

atravert avatar dependabot[bot] avatar fernandezc avatar github-actions[bot] avatar mailaender avatar web-flow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spectrochempy's Issues

Doc building using sphinx generates some warnings

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 6, https://redmine.spectrochempy.fr/issues/6


WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoclass' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'automodule' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoattribute' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autodata' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoattribute' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'automodule' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoclass' is already registered, it will be overridden

We should try to fix it.

pca reconstruction for an omnic dataset

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 15, https://redmine.spectrochempy.fr/issues/15


code to generate the Error:

from spectrochempy import *

X = read_omnic('irdata/nh4y-activation.spg')
mypca = PCA(X)
xhat = mypca.reconstruct(n_pc=3)

provisional fix: replace X += self._center by X += self._center.dataat line ~391 (pca.py)

Apparently due tu units/pint issue. debuggr output:

Traceback (most recent call last):
File "C:\Users\Arnaud\Dropbox\Programmes\spectrochempy\spectrochempy\core\dataset\ndarray.py", line 1476, in to
q = Quantity(1., self._units).to(units)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\quantity.py", line 375, in to
magnitude = self._convert_magnitude_not_inplace(other, *contexts, **ctx_kwargs)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\quantity.py", line 343, in _convert_magnitude_not_inplace
return self._REGISTRY.convert(self._magnitude, self._units, other)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\registry.py", line 711, in convert
return self._convert(value, src, dst, inplace)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\registry.py", line 1242, in _convert
return super(ContextRegistry, self)._convert(value, src, dst, inplace)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\registry.py", line 990, in _convert
dst_offset_unit = self._validate_and_extract(dst)
File "C:\Miniconda3\envs\scpy-dev\lib\site-packages\pint\registry.py", line 940, in _validate_and_extract
nonmult_units = [(u, e) for u, e in units.items()
AttributeError: 'NoneType' object has no attribute 'items'
sys:1: ResourceWarning: unclosed <socket.socket fd=848, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53915), raddr=('127.0.0.1', 53913)>

Deprecation warning with numpy elementwise == comparison

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 44, https://redmine.spectrochempy.fr/issues/44


Turning DeprecationWarnings to Error for test result in one problem to solve (Numpy deprecation warning)

FAILED [ 95%]testing ../docs/user/userguide/dataset/2_ndpanel.py
env base
1 SpectroChemPy's API - v.0.1.17-dev.82
© Copyright 2014-2020 - A.Travert & C.Fernandez @ LCS
 None
Loading SpectroChemPy API: 100%|██████████| 1211/1211 [00:05<00:00, 242.11it/s]
ValueError: operands could not be broadcast together with shapes (10,) (6,) 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "../docs/user/userguide/dataset/2_ndpanel.py", line 75, in <module>
    ndp = NDPanel(nda, ndb)
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py", line 126, in __init__
    self._set_datasets(datasets, merge=merge, align=align)
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py", line 344, in _set_datasets
    self.add_dataset(dataset, merge=merge, align=align)
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py", line 465, in add_dataset
    if merge and self._do_merge_or_align(self._dataset_to_be_added, dim, merge, align):
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py", line 401, in _do_merge_or_align
    can_merge, can_align = self._equal_dim_properties(prop, curprop)
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py", line 375, in _equal_dim_properties
    return can_merge_or_align(this['coord'], other['coord'])
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/align.py", line 51, in can_merge_or_align
    if (coord1 == coord2):
  File "/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndarray.py", line 281, in __eq__
    eq &= np.all(sattr == oattr)
DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.

test_utils/test_py_in_docs.py:18 (test_example[../docs/user/userguide/dataset/2_ndpanel.py])
test_utils/test_py_in_docs.py:42: in test_example
    assert not e, message.decode('utf8')
E   AssertionError: SpectroChemPy's API - v.0.1.17-dev.82
E     © Copyright 2014-2020 - A.Travert & C.Fernandez @ LCS
E     
E   assert not 1

Fix doc RST syntax

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 4, https://redmine.spectrochempy.fr/issues/4


Some errors during building of the doc needs to be corrected before releasing 0.1.17

looking for now-outdated files... none found
pickling environment... /Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:46: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:48: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:50: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:51: WARNING: Inline emphasis start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:51: WARNING: Inline emphasis start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:54: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:54: WARNING: Inline emphasis start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:59: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/mcrals.py:docstring of spectrochempy.MCRALS:61: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.detrend:6: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.diag:1: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.diag:15: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.detrend:22: WARNING: Unexpected section title.

Returns
-------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.diag:19: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.detrend:26: WARNING: Unexpected section title.

Examples
--------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.fft:52: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.find_peaks:8: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.find_peaks:51: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.find_peaks:61: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.find_peaks:104: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.find_peaks:118: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.read_matlab:24: WARNING: Inline literal start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.set_complex:20: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/nddataset.py:docstring of spectrochempy.NDDataset.savgol_filter:67: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.detrend:6: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.diag:1: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.diag:15: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.detrend:22: WARNING: Unexpected section title.

Returns
-------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.diag:19: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.detrend:26: WARNING: Unexpected section title.

Examples
--------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.fft:52: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.find_peaks:8: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.find_peaks:51: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.find_peaks:61: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.find_peaks:104: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.find_peaks:118: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.read_matlab:24: WARNING: Inline literal start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.set_complex:20: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/dataset/ndpanel.py:docstring of spectrochempy.NDPanel.savgol_filter:67: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/simplisma.py:docstring of spectrochempy.SIMPLISMA.reconstruct:6: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/simplisma.py:docstring of spectrochempy.SIMPLISMA.reconstruct:6: WARNING: Unexpected section title or transition.

=======
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/simplisma.py:docstring of spectrochempy.SIMPLISMA.reconstruct:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:6: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:21: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:22: WARNING: Unexpected section title.

Returns
-------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:25: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.detrend:26: WARNING: Unexpected section title.

Examples
--------
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/fft.py:docstring of spectrochempy.fft:10: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/peakfinding.py:docstring of spectrochempy.find_peaks:8: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/peakfinding.py:docstring of spectrochempy.find_peaks:9: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/peakfinding.py:docstring of spectrochempy.find_peaks:61: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/peakfinding.py:docstring of spectrochempy.find_peaks:62: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/peakfinding.py:docstring of spectrochempy.find_peaks:76: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/analysis/cantera_utilities.py:docstring of spectrochempy.fit_to_concentrations:2: WARNING: Inline strong start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/readers/readjdx.py:docstring of spectrochempy.read_jdx:25: WARNING: Inline literal start-string without end-string.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.savgol_filter:64: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/christian/Dropbox/SCP/spectrochempy/spectrochempy/core/processors/filter.py:docstring of spectrochempy.savgol_filter:67: WARNING: Unexpected indentation.
/Users/christian/Dropbox/SCP/spectrochempy/docs/user/tutorials/index.rst:28: WARNING: Unexpected indentation.
done
checking consistency... done
preparing documents... done
writing output... [  0%] api/generated/index
/Users/christian/Dropbox/SCP/spectrochempy/docs/user/tutorials/nmr/1_nmr.ipynb: WARNING: document isn't included in any toctree
/Users/christian/Dropbox/SCP/spectrochempy/docs/user/tutorials/nmr/2_isotope_database.ipynb: WARNING: document isn't included in any toctree

implement the numpy equivalent method `astype`

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 51, https://redmine.spectrochempy.fr/issues/51


The astype method is not yet implemented, but can be useful. IT should behaves as the numpy method:

a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])   # Create a rank 1 array
a.dtype  # prints "dtype('int64')"
nd = scp.NDDataset(a)
nd.dtype  # prints "dtype('int64')"
a = a.astype('float64')
a.dtype  # prints "dtype('float64')"

Similarly we should have

nd = nd.astype('float64')
nd.dtype  # prints "dtype('float64')"

for now it works if we play with the data attribute:

nd.data = nd.data.astype('float64')
nd.dtype  # prints "dtype('float64')"

Conda install is not working on linux (sometimes!)

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 57, https://redmine.spectrochempy.fr/issues/57


The issue is with quadprog, while quadprog was compiled on the same platform.

(base) parallels@parallels-Parallels-Virtual-Platform:~$ conda activate scpy
(scpy) parallels@parallels-Parallels-Virtual-Platform:~$ conda install spectrochempy
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/parallels/miniconda3/envs/scpy

  added / updated specs:
    - spectrochempy


The following NEW packages will be INSTALLED:

  _libgcc_mutex      conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-1_llvm
  attrs              conda-forge/noarch::attrs-19.3.0-py_0
  backcall           conda-forge/noarch::backcall-0.1.0-py_0
  bleach             conda-forge/noarch::bleach-3.1.5-pyh9f0ad1d_0
  brotlipy           conda-forge/linux-64::brotlipy-0.7.0-py37h8f50634_1000
  ca-certificates    conda-forge/linux-64::ca-certificates-2020.4.5.1-hecc5488_0
  cantera            cantera/linux-64::cantera-2.4.0-np115py37_2
  certifi            conda-forge/linux-64::certifi-2020.4.5.1-py37hc8dfbb8_0
  cffi               conda-forge/linux-64::cffi-1.14.0-py37hd463f26_0
  chardet            conda-forge/linux-64::chardet-3.0.4-py37hc8dfbb8_1006
  colorama           conda-forge/noarch::colorama-0.4.3-py_0
  cryptography       conda-forge/linux-64::cryptography-2.9.2-py37hb09aad4_0
  cycler             conda-forge/noarch::cycler-0.10.0-py_2
  cython             conda-forge/linux-64::cython-0.29.17-py37h3340039_0
  dbus               conda-forge/linux-64::dbus-1.13.6-he372182_0
  decorator          conda-forge/noarch::decorator-4.4.2-py_0
  defusedxml         conda-forge/noarch::defusedxml-0.6.0-py_0
  entrypoints        conda-forge/linux-64::entrypoints-0.3-py37hc8dfbb8_1001
  expat              conda-forge/linux-64::expat-2.2.9-he1b5a44_2
  fontconfig         conda-forge/linux-64::fontconfig-2.13.1-h86ecdb6_1001
  freetype           conda-forge/linux-64::freetype-2.10.1-he06d7ca_0
  gettext            conda-forge/linux-64::gettext-0.19.8.1-hc5be6a0_1002
  glib               conda-forge/linux-64::glib-2.64.2-h6f030ca_0
  gst-plugins-base   conda-forge/linux-64::gst-plugins-base-1.14.5-h0935bb2_2
  gstreamer          conda-forge/linux-64::gstreamer-1.14.5-h36ae1b5_2
  icu                conda-forge/linux-64::icu-64.2-he1b5a44_1
  idna               conda-forge/noarch::idna-2.9-py_1
  importlib-metadata conda-forge/linux-64::importlib-metadata-1.6.0-py37hc8dfbb8_0
  importlib_metadata conda-forge/noarch::importlib_metadata-1.6.0-0
  ipykernel          conda-forge/linux-64::ipykernel-5.2.1-py37h43977f1_0
  ipympl             conda-forge/noarch::ipympl-0.5.6-pyh9f0ad1d_1
  ipython            conda-forge/linux-64::ipython-7.14.0-py37hc8dfbb8_0
  ipython_genutils   conda-forge/noarch::ipython_genutils-0.2.0-py_1
  ipywidgets         conda-forge/noarch::ipywidgets-7.5.1-py_0
  jedi               conda-forge/linux-64::jedi-0.17.0-py37hc8dfbb8_0
  jinja2             conda-forge/noarch::jinja2-2.11.2-pyh9f0ad1d_0
  jpeg               conda-forge/linux-64::jpeg-9c-h14c3975_1001
  json5              conda-forge/noarch::json5-0.9.0-py_0
  jsonschema         conda-forge/linux-64::jsonschema-3.2.0-py37hc8dfbb8_1
  jupyter_client     conda-forge/noarch::jupyter_client-6.1.3-py_0
  jupyter_core       conda-forge/linux-64::jupyter_core-4.6.3-py37hc8dfbb8_1
  jupyterlab         conda-forge/noarch::jupyterlab-2.1.2-py_0
  jupyterlab_server  conda-forge/noarch::jupyterlab_server-1.1.3-py_0
  kiwisolver         conda-forge/linux-64::kiwisolver-1.2.0-py37h99015e2_0
  ld_impl_linux-64   conda-forge/linux-64::ld_impl_linux-64-2.34-h53a641e_0
  libblas            conda-forge/linux-64::libblas-3.8.0-16_openblas
  libcblas           conda-forge/linux-64::libcblas-3.8.0-16_openblas
  libclang           conda-forge/linux-64::libclang-9.0.1-default_hde54327_0
  libffi             conda-forge/linux-64::libffi-3.2.1-he1b5a44_1007
  libgcc-ng          conda-forge/linux-64::libgcc-ng-9.2.0-h24d8f2e_2
  libgfortran-ng     conda-forge/linux-64::libgfortran-ng-7.3.0-hdf63c60_5
  libiconv           conda-forge/linux-64::libiconv-1.15-h516909a_1006
  liblapack          conda-forge/linux-64::liblapack-3.8.0-16_openblas
  libllvm8           conda-forge/linux-64::libllvm8-8.0.1-hc9558a2_0
  libllvm9           conda-forge/linux-64::libllvm9-9.0.1-he513fc3_1
  libopenblas        conda-forge/linux-64::libopenblas-0.3.9-h5ec1e0e_0
  libpng             conda-forge/linux-64::libpng-1.6.37-hed695b0_1
  libsodium          conda-forge/linux-64::libsodium-1.0.17-h516909a_0
  libstdcxx-ng       conda-forge/linux-64::libstdcxx-ng-9.2.0-hdf63c60_2
  libuuid            conda-forge/linux-64::libuuid-2.32.1-h14c3975_1000
  libuv              conda-forge/linux-64::libuv-1.34.0-h516909a_0
  libxcb             conda-forge/linux-64::libxcb-1.13-h14c3975_1002
  libxkbcommon       conda-forge/linux-64::libxkbcommon-0.10.0-he1b5a44_0
  libxml2            conda-forge/linux-64::libxml2-2.9.10-hee79883_0
  llvm-openmp        conda-forge/linux-64::llvm-openmp-10.0.0-hc9558a2_0
  llvmlite           conda-forge/linux-64::llvmlite-0.31.0-py37h5202443_1
  markupsafe         conda-forge/linux-64::markupsafe-1.1.1-py37h8f50634_1
  matplotlib         conda-forge/linux-64::matplotlib-3.2.1-0
  matplotlib-base    conda-forge/linux-64::matplotlib-base-3.2.1-py37h30547a4_0
  mistune            conda-forge/linux-64::mistune-0.8.4-py37h8f50634_1001
  mkl                conda-forge/linux-64::mkl-2020.1-217
  nbconvert          conda-forge/linux-64::nbconvert-5.6.1-py37hc8dfbb8_1
  nbformat           conda-forge/noarch::nbformat-5.0.6-py_0
  ncurses            conda-forge/linux-64::ncurses-6.1-hf484d3e_1002
  nodejs             conda-forge/linux-64::nodejs-13.13.0-hf5d1a2b_0
  notebook           conda-forge/linux-64::notebook-6.0.3-py37hc8dfbb8_0
  nspr               conda-forge/linux-64::nspr-4.25-he1b5a44_0
  nss                conda-forge/linux-64::nss-3.47-he751ad9_0
  numba              conda-forge/linux-64::numba-0.48.0-py37hb3f55d8_0
  numpy              conda-forge/linux-64::numpy-1.15.4-py37h8b7e671_1002
  openssl            conda-forge/linux-64::openssl-1.1.1g-h516909a_0
  packaging          conda-forge/noarch::packaging-20.1-py_0
  pandas             conda-forge/linux-64::pandas-1.0.3-py37h0da4684_1
  pandoc             conda-forge/linux-64::pandoc-2.9.2.1-0
  pandocfilters      conda-forge/noarch::pandocfilters-1.4.2-py_1
  parso              conda-forge/noarch::parso-0.7.0-pyh9f0ad1d_0
  pcre               conda-forge/linux-64::pcre-8.44-he1b5a44_0
  pexpect            conda-forge/linux-64::pexpect-4.8.0-py37hc8dfbb8_1
  pickleshare        conda-forge/linux-64::pickleshare-0.7.5-py37hc8dfbb8_1001
  pint               conda-forge/linux-64::pint-0.9-py37_2
  pip                conda-forge/noarch::pip-20.1-pyh9f0ad1d_0
  prometheus_client  conda-forge/noarch::prometheus_client-0.7.1-py_0
  prompt-toolkit     conda-forge/noarch::prompt-toolkit-3.0.5-py_0
  pthread-stubs      conda-forge/linux-64::pthread-stubs-0.4-h14c3975_1001
  ptyprocess         conda-forge/noarch::ptyprocess-0.6.0-py_1001
  pycparser          conda-forge/noarch::pycparser-2.20-py_0
  pygments           conda-forge/noarch::pygments-2.6.1-py_0
  pyopenssl          conda-forge/noarch::pyopenssl-19.1.0-py_1
  pyparsing          conda-forge/noarch::pyparsing-2.4.7-pyh9f0ad1d_0
  pyqt               conda-forge/linux-64::pyqt-5.12.3-py37h8685d9f_3
  pyrsistent         conda-forge/linux-64::pyrsistent-0.16.0-py37h8f50634_0
  pysocks            conda-forge/linux-64::pysocks-1.7.1-py37hc8dfbb8_1
  python             conda-forge/linux-64::python-3.7.6-h8356626_5_cpython
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.1-py_0
  python_abi         conda-forge/linux-64::python_abi-3.7-1_cp37m
  pytz               conda-forge/noarch::pytz-2020.1-pyh9f0ad1d_0
  pyzmq              conda-forge/linux-64::pyzmq-19.0.1-py37hac76be4_0
  qt                 conda-forge/linux-64::qt-5.12.5-hd8c4c69_1
  quadprog           spectrocat/linux-64::quadprog-0.1.7-py37_0
  quaternion         conda-forge/linux-64::quaternion-2020.5.1.9.54.41-py37h03ebfcd_0
  readline           conda-forge/linux-64::readline-8.0-hf8c457e_0
  requests           conda-forge/noarch::requests-2.23.0-pyh8c360ce_2
  scipy              conda-forge/linux-64::scipy-1.4.1-py37ha3d9a3c_3
  send2trash         conda-forge/noarch::send2trash-1.5.0-py_0
  setuptools         conda-forge/linux-64::setuptools-46.1.3-py37hc8dfbb8_0
  setuptools-scm     conda-forge/noarch::setuptools-scm-3.5.0-py_1
  setuptools_scm     conda-forge/noarch::setuptools_scm-3.5.0-1
  six                conda-forge/noarch::six-1.14.0-py_1
  spectrochempy      spectrocat/noarch::spectrochempy-0.1.17-pyh53a4f4f_0
  sqlite             conda-forge/linux-64::sqlite-3.30.1-hcee41ef_0
  terminado          conda-forge/linux-64::terminado-0.8.3-py37hc8dfbb8_1
  testpath           conda-forge/noarch::testpath-0.4.4-py_0
  tk                 conda-forge/linux-64::tk-8.6.10-hed695b0_0
  tornado            conda-forge/linux-64::tornado-6.0.4-py37h8f50634_1
  tqdm               conda-forge/noarch::tqdm-4.46.0-pyh9f0ad1d_0
  traitlets          conda-forge/linux-64::traitlets-4.3.3-py37hc8dfbb8_1
  urllib3            conda-forge/noarch::urllib3-1.25.9-py_0
  wcwidth            conda-forge/noarch::wcwidth-0.1.9-pyh9f0ad1d_0
  webencodings       conda-forge/noarch::webencodings-0.5.1-py_1
  wheel              conda-forge/noarch::wheel-0.34.2-py_1
  widgetsnbextension conda-forge/linux-64::widgetsnbextension-3.5.1-py37_0
  xlrd               conda-forge/noarch::xlrd-1.2.0-py_0
  xorg-libxau        conda-forge/linux-64::xorg-libxau-1.0.9-h14c3975_0
  xorg-libxdmcp      conda-forge/linux-64::xorg-libxdmcp-1.1.3-h516909a_0
  xz                 conda-forge/linux-64::xz-5.2.5-h516909a_0
  zeromq             conda-forge/linux-64::zeromq-4.3.2-he1b5a44_2
  zipp               conda-forge/noarch::zipp-3.1.0-py_0
  zlib               conda-forge/linux-64::zlib-1.2.11-h516909a_1006


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: / b'Enabling notebook extension jupyter-js-widgets/extension...\n      - Validating: \x1b[32mOK\x1b[0m\n'
done
(scpy) parallels@parallels-Parallels-Virtual-Platform:~$ ipython
Python 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from spectrochempy import *                                             
Loading SpectroChemPy API:  60%|███████▏    | 721/1211 [00:02<00:02, 164.84it/s][SpectroChemPy] ERROR | ModuleNotFoundError: No module named 'quadprog'

Loading SpectroChemPy API:  60%|███████▏    | 721/1211 [00:20<00:02, 164.84it/s]

make changelog automatic when making the doc

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 35, https://redmine.spectrochempy.fr/issues/35


For this ideally most of the commit in the git repository should be labelle with an issues number and a type for the modification:
example
DEV: for new feature
FIX: for bug, issues fixing
DOC: for documentation update
MAINT: for tasks such as small refactoring, etc...
WIP: for temporary changes not included in change log

Can be completed.


Add new numpy equivalent functions such as np.eyes, np.identity.

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 50, https://redmine.spectrochempy.fr/issues/50


The function should behave as the already implemented function (in npy.py) such as:

scp.full((2,3,4), 100.)

which allows creation of new NDDataset:

name	NDDataset_13c087c4
author	christian
created	2020-05-10 04:29:30.388877
DATA	
title	
values	
[[[ 100 100 100 100]
[ 100 100 100 100]
[ 100 100 100 100]]

[[ 100 100 100 100]
[ 100 100 100 100]
[ 100 100 100 100]]]
shape	(z:2, y:3, x:4)

loose coord when slicing by integer array

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 20, https://redmine.spectrochempy.fr/issues/20


Example:

X = read_omnic(os.path.join('irdata', 'CO@Mo_Al2O3.SPG'))

1. slicing a NDDataset with an integer is OK for the coord:
X[:,100].x
Out[4]: Coord: [float64] cm^-1

1. but not with an integer array :
X[:,[100, 120]].x
Out[5]: Coord: [int32] unitless

1. on the other hand, the explicit slicing of the coord is OK !
X.x[[100,120]]
Out[6]: Coord: [float64] cm^-1

Update of the sphinx version

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 3, https://redmine.spectrochempy.fr/issues/3


make of doc is running 1.8.5.

We probably need to update this to a more recent version - and some warning related to autodocsum needs to be solved

Running Sphinx v1.8.5
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoclass' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'automodule' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoattribute' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autodata' is already registered, it will be overridden
WARNING: while setting up extension spectrochempy.sphinxext.autodocsumm: directive 'autoattribute' is already registered, it will be overridden

Choose the correct licence and make the code fully compatible

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 24, https://redmine.spectrochempy.fr/issues/24


Pour le moment, j’avais choisi CeCILL B, mais pour être sur il est nécessaire de faire l’inventaire de tous les emprunts, et determiner si elle est compatible:

Je cite https://cecill.info/placer.fr.html#emprunt

“““

Inventaire des morceaux de code ou bibliothèques que vous utilisez

Il est indispensable de faire l'inventaire des différentes bibliothèques ou morceaux de code que vous utilisez dans votre logiciel et que vous n'avez pas écrits (que vous les ayez modifiés ou non) ainsi que de leurs licences respectives. Ceci s'applique aussi aux éventuelles traductions (dans un langage de programmation différent) que vous auriez pu réaliser.

Pour pouvoir placer votre logiciel sous la licence que vous avez choisie dans la famille CeCILL, il est nécessaire que les licences de ces emprunts ne rentrent pas en conflit avec la licence choisie, c'est à dire qu'elles soient compatibles avec elle. Sont compatibles avec CeCILL les licences compatibles avec la GNU GPL (que l'on peut trouver sur cette page de la FSF), à l'exception de la GNU GPL elle-même. Si l'un des emprunts est sous GNU GPL, votre logiciel ne peut être distribué que sous la licence GNU GPL (pourvu que les autres emprunts soient compatibles avec la GNU GPL, bien évidemment). D'autres licences peuvent être compatibles avec CeCILL, mais elles requièrent une analyse au cas par cas qui peut être très complexe.

Il faut noter que même si la licence d'un emprunt empêche la mise sous CeCILL, CeCILL-B ou CeCILL-C du tout, il est toujours possible de distribuer le reste (i.e. le logiciel sans l'emprunt qui pose problème) sous la licence que vous souhaitez. Ce sera alors à votre licencié de réaliser le logiciel "final". Ceci s'applique bien au cas d'un logiciel qui utiliserait une bibliothèque sous une licence non compatible avec CeCILL, particulièrement si la liaison peut se faire dynamiquement. Il est aussi possible de demander une autorisation exceptionnelle aux titulaires des droits sur l'emprunt (mais cela peut être difficile voire impossible en pratique).

“““

Vérifier ce point rapidement pour stabiliser la licence.

Sous-tache: isoler les bouts incompatibles pour les distribuer sous leur licence originale.

Make a Docker image for an easy and portable installation.

Author: @fernandezc (Christian Fernandez )

Redmine Issue: 7, https://redmine.spectrochempy.fr/issues/7


Pytest ne s.execute pas. Pas trouve encore pourquoi warning

pytest tests/
============================= test session starts ==============================
platform linux -- Python 3.7.1, pytest-4.0.2, py-1.7.0, pluggy-0.8.0 -- /opt/conda/bin/python
cachedir: .pytest_cache
rootdir: /opt/atlassian/pipelines/agent/build/tests, inifile: pytest.ini
plugins: console-scripts-0.1.5
collecting ...
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

units of a coord are changed to default after binary operation.

Author: @atravert (Arnaud TRAVERT)

Redmine Issue: 58, https://redmine.spectrochempy.fr/issues/58


Title

units of a coord are changed to default after binary operation.

Description

System information

  • SpectroChemPy version: [0.1.18]
  • OS: [e.g. Windows 10]
  • Python version: 3.7

Expected behavior

if 2 is added to an axis in minutes, we expect to still have the values given in minute after the operation. e.g. 0 min => 2 min

Actual behavior

the values are correctly changed, but the units are changed back to seconds, e.g. 0 min => 120 s

To Reproduce

X   = scp.read_omnic('irdata\\CO@Mo_Al2O3.SPG')
X.y = X.y - X.y[0]                              #subtract the acquisition timestamp of the first spectrum 
X.y = X.y.to('minute')                          #convert to minutes
print('unit before: {}'.format(X.y.units))                                
X.y += 2                                        #add 2 minutes
print('unit after: {}'.format(X.y.units))         
print('time of 1st spectrum after shift: {}'.format(X.y[0].data))    #check that the addition is correctly done 2 min => 120 s

which gives the output:

unit before: minute
unit after: second
time of 1st spectrum after shift: [     120]

Additional context
NB: this is much better than the default behaviour of pint which do not allows adding dimensionless values (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.