https://github.com/c0sogi/python-dcm
A high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Keywords
Repository
A high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.
Statistics
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
python-dcm
A high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.
Quick Start
```python from dcm import DCM
Read a DCM file
dcm = DCM.from_file('calibration.dcm')
Access calibration data
parametervalue = dcm.parameters['ENGINESPEED'].value mapdata = dcm.maps['FUELMAP'].dataframe curvedata = dcm.curves['BOOSTCURVE'].series
Interpolate values
xpoints = [1000, 1500, 2000] # RPM ypoints = [50, 75, 100] # Load % interpolated = dcm.maps['FUELMAP'].asfunction(xpoints, ypoints)
Visualize data
dcm.maps['FUELMAP'].tofigure() ```
Key Features
- Easy Data Access: Directly access parameters, curves, and maps with Pandas integration
- Interpolation: Built-in 1D/2D linear interpolation for real-time value calculation
- Visualization: One-line plotting of characteristic curves and maps
- Excel Integration: Import/export calibration data from Excel spreadsheets
- Set Operations: Compare and merge DCM files with
|,-,&, and%operators - Type Support: Handle all DCM data types including fixed/group characteristics
Installation
Requires Python ≥ 3.10
bash
pip install python-dcm
Common Use Cases
Data Access & Manipulation
```python
Get parameter value
rpmlimit = dcm.parameters['MAXRPM'].value
Access map as DataFrame
fuelmap = dcm.maps['FUELMAP'].dataframe fuel_map.iloc[0, 0] = 14.7 # Modify value
Get curve data
boostcurve = dcm.curves['BOOSTCURVE'].series maxboost = boostcurve.max() ```
Excel Integration
```python
Load calibration data from Excel
dcm.loadfromexcel( mapspath='maps.xlsx', curvespath='curves.xlsx', parameters_path='params.xlsx' )
Each sheet name becomes the calibration object name
```
Visualization
```python import matplotlib.pyplot as plt
Plot a map with custom settings
fig, ax = dcm.maps['FUELMAP'].tofigure( cmap='viridis', fontsize=12 ) plt.show()
Plot multiple curves
fig, ax = plt.subplots() dcm.curves['BOOSTLOW'].tofigure(ax=ax, label='Low') dcm.curves['BOOSTHIGH'].tofigure(ax=ax, label='High') plt.legend() ```
Advanced Features
Parameter Type Conversion
python
param = dcm.parameters['CONTROL_BITS']
binary = param.as_bin() # [1, 3, 5] (bits set to 1)
hex_val = param.as_hex() # [A, F, 1] (hexadecimal digits)
DCM File Comparison
```python
Find differences between calibrations
modified = olddcm % newdcm print(modified.parameters.keys()) # Changed parameters
Merge calibrations
combined = dcm1 | dcm2 ```
Supported Data Types
- Parameters (FESTWERT)
- Parameter Blocks (FESTWERTEBLOCK)
- Characteristic Lines (KENNLINIE/FESTKENNLINIE/GRUPPENKENNLINIE)
- Characteristic Maps (KENNFELD/FESTKENNFELD/GRUPPENKENNFELD)
- Distributions (STUETZSTELLENVERTEILUNG)
- Text Strings (TEXTSTRING)
Dependencies
- NumPy ≥ 1.20.0
- Pandas ≥ 1.5.0
- Matplotlib ≥ 3.0.0
- OpenPyXL ≥ 3.1.0
License
MIT License
Contributing
Contributions welcome! Please format code with ruff before submitting PRs.
Contact
- Author: c0sogi
- Email: dcas@naver.com or cosogi1@gmail.com
Feel free to reach out for questions or suggestions.
For detailed documentation and examples, visit our GitHub repository.
Owner
- Login: c0sogi
- Kind: user
- Location: Suwon, South Korea
- Repositories: 2
- Profile: https://github.com/c0sogi
SKKU undergraduate, majoring in Mechanical Engineering
GitHub Events
Total
- Release event: 4
- Watch event: 1
- Push event: 12
- Fork event: 2
- Create event: 5
Last Year
- Release event: 4
- Watch event: 1
- Push event: 12
- Fork event: 2
- Create event: 5
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| c0sogi | d****s@n****m | 15 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,296 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 11
- Total maintainers: 1
pypi.org: python-dcm
A high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.
- Documentation: https://python-dcm.readthedocs.io/
- License: MIT
-
Latest release: 0.1.10
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- contourpy 1.3.1
- cycler 0.12.1
- et-xmlfile 2.0.0
- fonttools 4.55.0
- kiwisolver 1.4.7
- matplotlib 3.9.2
- numpy 2.1.3
- openpyxl 3.1.5
- packaging 24.2
- pandas 2.2.3
- pillow 11.0.0
- pyparsing 3.2.0
- python-dateutil 2.9.0.post0
- pytz 2024.2
- ruff 0.8.0
- six 1.16.0
- tzdata 2024.2
- ruff ^0.8.0 develop
- matplotlib >=3.0.0,<4
- numpy >=1.20.0,<3
- openpyxl ^3.1.0
- pandas >=1.5.0,<3
- python >=3.11