Add instrument readers and Friedman method#25
Merged
Conversation
Adds firescipy.instruments with parsers for three instrument export formats commonly used in fire science research: Netzsch STA/DSC/TGA, DEATAK MCC, and Netzsch Cone Calorimeter. A generic reader with automatic file type detection is provided via read_instrument_file(). Also adds a tests/ structure with minimal fixture files and 26 pytest tests covering metadata parsing, data table shape, special character handling, and error cases. Documentation page added to docs/reference/instruments.rst. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Functions added used for data analysis. interpolate_experiment_data() - generic funtion to interpolate experimental datathat consits of time, temperature and two signal data series. get_window_points() - used to smooth data series over a window based on physical units, by determining the number of points of the desired window size. get_peak_value() - to find maximum values inside an array. cubic_max_exact() - finds the maximum of a cubic function. Functions added for reproducibility and data formatting get_git_commit_hash() - retrieves the commit hash of a local Git repository to improve reproducibility. format_export_df() - sets the number of digits for pandas DataFrames to be exported as csv files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reflects the addition of six utility functions in utils.py (get_git_commit_hash, get_window_points, get_peak_value, cubic_max_exact, interpolate_experiment_data, format_export_df). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Implement Ea_Friedman and compute_Ea_Friedman in pyrolysis/kinetics.py - compute_conversion now computes dAlpha_dt directly from raw signal for differential data (avoids noise amplification from numerical differentiation) - compute_conversion_levels interpolates dAlpha_dt for differential data - compute_Ea_Friedman raises ValueError with explanation when called on integral data, guiding users to differentiate manually - Rename KAS_Ea to Ea_KAS for consistent naming with compute_Ea_KAS; autocomplete now groups all Ea_* and compute_Ea_* functions together - Signal column in compute_conversion is now dynamic (from general_info), no longer hardcoded as Mass_Avg - Add tests/test_kinetics.py: round-trip and error tests for Friedman method - Fix variable names in mock_kinetics_computation.rst (time_model/temp_model -> t_array/T_array) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deatak MCC, and Netzsch Cone (v0.0.7)
compute_Ea_Friedman) to pyrolysis/kinetics (v0.0.9)
Versions
Test plan