Clean and add extra information to data produced by the battery cyclers from Novonix.
Project description
Prepare Novonix Data
This code handles common issues encountered in files generated with a range of Novonix software versions and it can add extra information. There is a master function prepare_novonix that can run at once all the available features, providing also flexibility to only choose some.
The code can be used to test if a file has the expected structure for a Novonix file (isnovoix function) and to read a specific column from a raw Novonix file (read_column function). Files can be cleanned from empty lines and characters added after the ‘]’ in the header and failed tests are handled by modifying the capacity column to start at the sum of the capacities from the failed tests, instead of 0 (cleannovonix function).
The extra information that can be created for cleaned files (functions: novonix_add_state and novonix_add_loopnr) is:
A ‘State’ column with 0 for the first measurement of a particular step, 1 for regular data points, 2 to indicate the last measurement in that series and -1 for single measurements.
A reduced protocol with one command per numerated line.
A ‘Protocol line’ column that makes reference to the reduced protocol lines.
A ‘Loop number’ column with 0s when commands are not repeated and monotoncally increasing integers starting from 1, to indicate the repetition number.
Requirements and Installation
This code has been developed in Python 3.7.1 and is compatible with Python above 3.4 versions. The code has been tested to run in both Windows and Linux OS. It has been tested to run within Matlab R2018a.
This code uses numpy and pathlib as specified in docs/requirements.txt.
The code can be run directly from a cloned repository or can also be installed as a python package through pip:
Example
The example.py runs over the given example data. To run this
example, simply type: python example.py
.
Running this code from MatLab
In your code add the ‘pycode’ folder to your search path:
addpath(genpath('pycode'))
Try to run the code catching exceptions:
try
py.pycode.novonix_add.prepare_novonix(file_to_open,pyargs('verbose','False','lprotocol','True'));
catch e e.message if(isa(e,'matlab.exception.PyException'))
e.ExceptionObject
end
Ensure that Matlab can see your installation of Python by running
pyversion. If Matlab cannot see python, once you know where your
Python executable is (within a python terminal you can do this by
typing: import os, sys ; os.path.dirname(sys.executable)
), type
within your MatLab interpreter pyversion [path to python executable]
and check that now the path to Python was recognised with
pyversion.
Compatibility
This code has been tested with data generated by different versions of the Novonix software. If you encounter issues running the code for any version of Novonix software report an issue. Note that an example file will be needed in order to improve the code. List of the Novonix software. If you encounter issues running the code for any version of Novonix software report an issue. Note that an example file will be needed in order to improve the code. List of the Novonix software versions the code has been tested against:
3.0.2.3
3.0.2.1
TO
2.0.0.7
1.9.4.0
Project details
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
Hashes for preparenovonix-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39605f8d3c7c64274163a63d8f0a220fcbfc0b7f1aec033c493105983b8703d1 |
|
MD5 | bde28df34f949daaf5d01af57184578c |
|
BLAKE2b-256 | a592685bf122695ce7cb9dc8b2db216103dce4fd94da706879d6ca82deec0577 |