A comprehensive package for the analysis of kinetic data.
Project description
KiMoPack
KiMoPack is a project for the handling of spectral data measure at multiple time-points. The current design is optimised for the use with optical transient absorption data, but it has been successfully adapted for the use with transient x-ray emission and spectro-electro chemistry data.
It focuses on the main tasks an experimentator has: Loading and shaping of experiments, plotting of experiments, comparing of experiments, analysing experiments with fast and/or advanced fitting routines and saving/exporting/presenting the results.
For typical use a series of juypter notebooks are provided that guide through the a number of different use scenarios, and are suggesting the parameter that are typically set.
Installation
The basis of the program is a module called “plot_func.py” that contains all the necessary functions and classes. We recommend to use a package manager to install the program.
Install using “pip”:
$ pip install KiMoPack
Install and update using “conda” from the channel erdzeichen:
$ conda install -c erdzeichen kimopack
Hint: the pip version is usually more recent than the conda version The files can also be downloaded from the github directory https://github.com/erdzeichen/KiMoPack or zenodo (see below)
These commands are installing only KiMoPack and the absolutely needed dependencies. However, there are several modules that work better if additional packages are installed. In general one should try to install all packages at the same time. Additional packages that I generally recommend are h5py and tables (for saving files), python-pptx (for saving power point slides) and keyboard (Window only, for interrupting the fits). Quite useful is also nbopen that allows you to double click on the notebook files. nbopen requires an activation at the end.
(leave away keyboard for Linux!) .. code-block:: text
- $ pip install KiMoPack h5py tables nbopen python-pptx
(windows) python -m nbopen.install_win (Linux) python3 -m nbopen.install_xdg (MacOS) Clone the repository and run ./osx-install.sh
Upgrade if already installed:
$ pip install KiMoPack -U
In general it is a good idea to create a local environment to install files in python if you are using python for many tasks. In a local environment only the packages that are needed are installed, which usually avoids that conflicts can appear. It is very easy to do that.
Under Windows: open the anaconda command prompt or power shell (type anaconda under windows start) Under Linuxs: open a console
$ conda create --name kimoPack
$ conda activate kimokack
$ pip install KiMoPack h5py tables keyboard nbopen python-pptx
Or if you also want make sure to have a later version of python
$ conda create --name kimopack python=3.11 ipython jupyterlab jupyter
$ conda activate kimopack
$ pip install KiMoPack h5py tables keyboard nbopen python-pptx
Error: insufficient rights: If one of the installs complains (error) that the user does not has sufficient rights, this installation can be done attaching “–user”
$ conda create --name kimoPack
$ conda activate kimokack
$ pip install KiMoPack h5py tables keyboard nbopen python-pptx --user
- Error: pytables:
in some versions I have been running in a problem with pytables when loading saved data. Using the conda forge version solved this problem for me
conda install -c conda-forge pytables
Best usage
While KiMoPack is a python library, we facilitate its use with Jupyter notebooks. For the typical analysis tasks we have developed a series of Notebooks that guide through the tasks.n These notebooks can be downloaded from https://github.com/erdzeichen/KiMoPack/tree/main/Workflow_tools or by command line.
You can try either of these “lazy” oneliners
ipython -c "import KiMoPack; KiMoPack.download_notebooks()"
python -c "import KiMoPack; KiMoPack.download_notebooks()"
python3 -c "import KiMoPack; KiMoPack.download_notebooks()"
If none of these work then start any console (under windows e.g. type “cmd” and hit enter). In the console you then start python by typing “python” and hit enter, lastly you import Kimopack and run a function that downloads the files for you by typing “import KiMoPack; KiMoPack.download_all()” This downloads the notebooks and tutorials from github for you. If you instead use “import KiMoPack; KiMoPack.download_notebooks()” then only the workflow tools are downloaded. Please copy one of these notebooks into your data analysis folder and rename them to create a analysis log of your session. For more information please see the publication https://doi.org/10.1021/acs.jpca.2c00907, the tutorial videos, or the tutorial notebooks under https://github.com/erdzeichen/KiMoPack/tree/main/Tutorial_Notebooks_for_local_use.
Citation
We have published a paper introducing the toolbox under https://doi.org/10.1021/acs.jpca.2c00907
Links
Overview talk: I gave a recent overview talk at the LaserLab Europe meeting: https://youtu.be/z9QqVLFWYrs
Publication: https://pubs.acs.org/doi/10.1021/acs.jpca.2c00907
Documentation: https://kimopack.readthedocs.io/
PyPI Releases: https://pypi.org/project/KiMoPack/
Source Code: https://github.com/erdzeichen/KiMoPack
Issue Tracker: https://github.com/erdzeichen/KiMoPack/issues
Website: https://www.chemphys.lu.se/research/projects/kimopack/
Tutorial videos: https://www.youtube.com/channel/UCmhiK0P9wXXjs_PJaitx8BQ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kimopack-7.11.3.tar.gz
.
File metadata
- Download URL: kimopack-7.11.3.tar.gz
- Upload date:
- Size: 49.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25cd0ab9966e24c82a9133e00868cd4c1382c7240f33f6d331a925aa0ba34570 |
|
MD5 | 94bef067e011d90d515adce00ac4050f |
|
BLAKE2b-256 | 8d778b1f4ff789048851b5697aec550074c667c143d2fc2a7f38a896fee75c21 |
File details
Details for the file KiMoPack-7.11.3-py3-none-any.whl
.
File metadata
- Download URL: KiMoPack-7.11.3-py3-none-any.whl
- Upload date:
- Size: 111.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1559a59c2ac6b762d6fb8fd696cf776582f6502531f6e9b77a0427de9627568 |
|
MD5 | ddf6f83e5c03423766a0d386af7248bd |
|
BLAKE2b-256 | e34c78bdbf18a6c5bf775ed7a70993be71d9f510584cddc27a07b8773178f5b1 |