Wrapper project of plotly.py, extra functionalities for scientific plots
Project description
lime_internal_getter- A Data Handling Library for Lime.ai Documentation
Overview
This document provides a description of the functions defined in the lime_internal_getter package. The functions facilitate various operations including data fetching, IoT dashboard integration, data filtering, and process execution.
Functions
1. get_imei
Description: Retrieves the IMEI of a battery pack from the Lime.ai dashboard.
Parameters:
IMEI(str): The IMEI string of the device.
Returns:
- IMEI (str): Retrieved IMEI of the battery pack.
Example Usage:
imei = get_imei("MD0AIOALAA00638")
2. get_pimdata
Description: Retrieves and processes IoT dashboard data for Local PIM testing.(Only for developers of PIM)
Parameters:
IMEI(str): IMEI of the device.start_time(str): Start time inYYYY-MM-DD HH:MMformat.end_time(str): End time inYYYY-MM-DD HH:MMformat.filter_data(bool): Whether to filter data. Default isFalse.serial_no(bool): Whether the input is a serial number. Default isFalse.interpolation(bool): Whether to interpolate data. Default isTrue.period(float): Interpolation period in seconds. Default is0.1.nas(bool): Use NAS storage ifTrue. Default isTrue.
Returns:
- DataFrame: A pandas DataFrame containing processed data.
Example Usage:
pim_data = get_pimdata("MD0AIOALAA00638", "2024-10-25 14:30", "2024-10-26 02:17")
3. get_fwdata
Description: Fetches a list of packs with specific firmware versions.
Parameters:
fWVersion(str): Firmware version to filter.battery_prefix(str): Battery prefix for filtering.
Returns:
- DataFrame: A pandas DataFrame containing the filtered data.
Example Usage:
fw_data = get_fwdata(fWVersion="8183D", battery_prefix="MH")
4. get_data
Description: Fetches battery data from NAS storage or IoT dashboard.
Parameters:
imei(str): IMEI or serial number.start_time(str): Start time inYYYY-MM-DD HH:MMformat.end_time(str): End time inYYYY-MM-DD HH:MMformat.filter_data(bool): Whether to filter data. Default isFalse.skip(bool): Skip missing files ifTrue. Default isFalse.nas(bool): Use NAS storage ifTrue. Default isTrue.
Returns:
- DataFrame: A pandas DataFrame containing fetched data.
Example Usage:
battery_data = get_data("MD0AIOALAA00638", "2024-10-25 14:30", "2024-10-26 02:17")
5. pim_make
Description: Executes the PIM model after setting configurations in C code.(Only for developers of PIM)
Parameters:
directory_path(str): Path to the directory containing PIM configurations.model(int): Model type. Default is4.filename(str): File extension for the output. Default is"_iot_data.csv".
Example Usage:
pim_make("/path/to/directory", model=4, filename="_iot_data.csv")
6. PIMProcessor (Class)
Description: Class for processing PIM models and generating reports. (Not required for non-developers of PIM Model) results avaiable through some list of data through batch process as list
Methods:
__init__(directory_path, model,step): Initializes the processor.fetch_and_process_data(...): Processes data for a list of serial numbers.generate_final_table(save_csv): Generates the final data table.plot(): Plots SOH comparison for packs.
Example Usage:
processor = PIMProcessor("/path/to/directory", model=4)
processor.fetch_and_process_data([...], "2024-06-27", "2024-06-28")
processor.correction_monitor()
print(processor.bms_errors)
7. KalmanFilter (Class)
Description: Class for running PIM models implemented locally through python (Not required for non-developers of PIM Model but can be used) soc and soh available through internal variable parameters
Methods:
__init__(model): Initialises model parametersprocess_filter(data): Performs Kalman filter for the given datadataa dataframe variable which has the structure:[Time in s,Current(A), Voltage 1 , Voltage2 ....]
Example Usage:
import lime_internal_getter as ig
kf= ig.KalmanFilter(model=9)
kf.process_filter(ig.get_pimdata("863674072212077",'2025-01-26')) #Put actual parameters here
print(kf.soc[0])# print soc for cell 1 corresponding to voltage 1
print(kf.soh[0])# print soh for cell 1 corresponding to voltage 1
8. AbhishekReports (Class)
Description: Class for generating reports and corrections scripts for different firmware versions
Methods:
__init__(model): Generates a variable which has functionality of docx. Use df_todocx to update this and save using document.save(filpath+filename.docx)df_to_docx(data): Use this generate a table in the document for any dataframecorrection_script(fWlist,model,start_date): Use for running correction monitor with different correction scripts in PIMProcessor class for big data in batch mode for processing entire firm like for max errors, errors in soc_ranges etc. . Example Usage:
import pandas as pd
import lime_internal_getter as ig
ar=ig.AbhishekReports()
ar.df_to_docx(pd.DataFrame([1,2,3],[1.1,2.5,4.2]),save=True)
fWlist=["51828"]
ar.correction_script(fWlist,model=3,start_date="2025-01-21")
#### Process for atleast 5 Min
print(pd.read_csv('51828.csv'))
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lime_internal_getter-0.3.0.tar.gz.
File metadata
- Download URL: lime_internal_getter-0.3.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35ecb1e41528c2c46d4db7d6c06241ecd686977122046fafb744fd37969af2d0
|
|
| MD5 |
18237a1d82b4102dd32b1e0b50b0c2ae
|
|
| BLAKE2b-256 |
bc7be6255abe8225f08cd31baea3e1a289fa67333254c4521727dd30d8965a72
|
Provenance
The following attestation bundles were made for lime_internal_getter-0.3.0.tar.gz:
Publisher:
python-publish.yml on JonahTheDon/lime_internal_getter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lime_internal_getter-0.3.0.tar.gz -
Subject digest:
35ecb1e41528c2c46d4db7d6c06241ecd686977122046fafb744fd37969af2d0 - Sigstore transparency entry: 168891257
- Sigstore integration time:
-
Permalink:
JonahTheDon/lime_internal_getter@0266405fc4c9b00f31271f866b5c6dfb6bef229f -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/JonahTheDon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0266405fc4c9b00f31271f866b5c6dfb6bef229f -
Trigger Event:
release
-
Statement type:
File details
Details for the file lime_internal_getter-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lime_internal_getter-0.3.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
486b291dbc04fee91b78271fddcd03c0793339020e5323ed5d36fd624e777662
|
|
| MD5 |
d77bd8a78c47e45f1b208aa3d0e02e20
|
|
| BLAKE2b-256 |
4ada9c3a9d682d141f1e4ea40573420e7c6e7a3bd8f021d28c19d112f079e300
|
Provenance
The following attestation bundles were made for lime_internal_getter-0.3.0-py3-none-any.whl:
Publisher:
python-publish.yml on JonahTheDon/lime_internal_getter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lime_internal_getter-0.3.0-py3-none-any.whl -
Subject digest:
486b291dbc04fee91b78271fddcd03c0793339020e5323ed5d36fd624e777662 - Sigstore transparency entry: 168891259
- Sigstore integration time:
-
Permalink:
JonahTheDon/lime_internal_getter@0266405fc4c9b00f31271f866b5c6dfb6bef229f -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/JonahTheDon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0266405fc4c9b00f31271f866b5c6dfb6bef229f -
Trigger Event:
release
-
Statement type: