{"id":22159110,"url":"https://github.com/c0sogi/python-dcm","last_synced_at":"2025-08-12T06:47:37.157Z","repository":{"id":265076615,"uuid":"895062305","full_name":"c0sogi/python-dcm","owner":"c0sogi","description":"A high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.","archived":false,"fork":false,"pushed_at":"2024-12-20T15:18:51.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T01:34:02.302Z","etag":null,"topics":["automotive","dcm","ecu-calibration","etas","inca","numpy","pandas","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c0sogi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T13:47:11.000Z","updated_at":"2025-01-12T14:34:18.000Z","dependencies_parsed_at":"2024-11-27T19:17:19.025Z","dependency_job_id":null,"html_url":"https://github.com/c0sogi/python-dcm","commit_stats":null,"previous_names":["c0sogi/python-dcm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c0sogi/python-dcm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0sogi%2Fpython-dcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0sogi%2Fpython-dcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0sogi%2Fpython-dcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0sogi%2Fpython-dcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c0sogi","download_url":"https://codeload.github.com/c0sogi/python-dcm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0sogi%2Fpython-dcm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270016705,"owners_count":24512964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automotive","dcm","ecu-calibration","etas","inca","numpy","pandas","python"],"created_at":"2024-12-02T03:43:50.849Z","updated_at":"2025-08-12T06:47:37.094Z","avatar_url":"https://github.com/c0sogi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-dcm\n\nA high-performance Python package for handling ETAS DCM(Data Conversion Format) files used in engine calibration tools like INCA, MDA, EHANDBOOK, and CANape.\n\n## Quick Start\n\n```python\nfrom dcm import DCM\n\n# Read a DCM file\ndcm = DCM.from_file('calibration.dcm')\n\n# Access calibration data\nparameter_value = dcm.parameters['ENGINE_SPEED'].value\nmap_data = dcm.maps['FUEL_MAP'].dataframe\ncurve_data = dcm.curves['BOOST_CURVE'].series\n\n# Interpolate values\nx_points = [1000, 1500, 2000]  # RPM\ny_points = [50, 75, 100]       # Load %\ninterpolated = dcm.maps['FUEL_MAP'].as_function(x_points, y_points)\n\n# Visualize data\ndcm.maps['FUEL_MAP'].to_figure()\n```\n\n## Key Features\n\n- **Easy Data Access**: Directly access parameters, curves, and maps with Pandas integration\n- **Interpolation**: Built-in 1D/2D linear interpolation for real-time value calculation\n- **Visualization**: One-line plotting of characteristic curves and maps\n- **Excel Integration**: Import/export calibration data from Excel spreadsheets\n- **Set Operations**: Compare and merge DCM files with `|`, `-`, `\u0026`, and `%` operators\n- **Type Support**: Handle all DCM data types including fixed/group characteristics\n\n## Installation\n\nRequires Python ≥ 3.10\n\n```bash\npip install python-dcm\n```\n\n## Common Use Cases\n\n### Data Access \u0026 Manipulation\n```python\n# Get parameter value\nrpm_limit = dcm.parameters['MAX_RPM'].value\n\n# Access map as DataFrame\nfuel_map = dcm.maps['FUEL_MAP'].dataframe\nfuel_map.iloc[0, 0] = 14.7  # Modify value\n\n# Get curve data\nboost_curve = dcm.curves['BOOST_CURVE'].series\nmax_boost = boost_curve.max()\n```\n\n### Excel Integration\n```python\n# Load calibration data from Excel\ndcm.load_from_excel(\n    maps_path='maps.xlsx',\n    curves_path='curves.xlsx',\n    parameters_path='params.xlsx'\n)\n\n# Each sheet name becomes the calibration object name\n```\n\n### Visualization\n```python\nimport matplotlib.pyplot as plt\n\n# Plot a map with custom settings\nfig, ax = dcm.maps['FUEL_MAP'].to_figure(\n    cmap='viridis',\n    fontsize=12\n)\nplt.show()\n\n# Plot multiple curves\nfig, ax = plt.subplots()\ndcm.curves['BOOST_LOW'].to_figure(ax=ax, label='Low')\ndcm.curves['BOOST_HIGH'].to_figure(ax=ax, label='High')\nplt.legend()\n```\n\n### Advanced Features\n\n#### Parameter Type Conversion\n```python\nparam = dcm.parameters['CONTROL_BITS']\nbinary = param.as_bin()    # [1, 3, 5] (bits set to 1)\nhex_val = param.as_hex()   # [A, F, 1] (hexadecimal digits)\n```\n\n#### DCM File Comparison\n```python\n# Find differences between calibrations\nmodified = old_dcm % new_dcm\nprint(modified.parameters.keys())  # Changed parameters\n\n# Merge calibrations\ncombined = dcm1 | dcm2\n```\n\n## Supported Data Types\n\n- Parameters (FESTWERT)\n- Parameter Blocks (FESTWERTEBLOCK)\n- Characteristic Lines (KENNLINIE/FESTKENNLINIE/GRUPPENKENNLINIE)\n- Characteristic Maps (KENNFELD/FESTKENNFELD/GRUPPENKENNFELD)\n- Distributions (STUETZSTELLENVERTEILUNG)\n- Text Strings (TEXTSTRING)\n\n## Dependencies\n\n- NumPy ≥ 1.20.0\n- Pandas ≥ 1.5.0\n- Matplotlib ≥ 3.0.0\n- OpenPyXL ≥ 3.1.0\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions welcome! Please format code with [ruff](https://docs.astral.sh/ruff/) before submitting PRs.\n\n## Contact\n\n- Author: c0sogi\n- Email: dcas@naver.com or cosogi1@gmail.com\n\nFeel free to reach out for questions or suggestions.\n\n---\n\nFor detailed documentation and examples, visit our [GitHub repository](https://github.com/c0sogi/python-dcm).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0sogi%2Fpython-dcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc0sogi%2Fpython-dcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0sogi%2Fpython-dcm/lists"}