Version 0.4.0 — Improved API and examples
What's Changed
AmplitudeResultnow includes abaselinefield (waveform minimum)ResultsCollectorrecords and Excel output now include thebaselinecolumn__str__()added to allAnalysisRecordsubclasses for human-readableprint()output:SessionInfo: participant name and session date/time rangeAmplitudeResult: amplitude and baseline valuesMidpointResult: DLMOn, DLMOff and Midpoint timesAreaCogResult: area and COG timeFitResult: function name, parameters and R²AnalysisRecordbase: generic fallback derived fromto_dict()
- Example scripts updated to use
print(meta),print(res),print(mid, ac)directly via the new__str__representations - Unit tests extended to cover the new
baselinefield andResultsCollectorcolumn - All example scripts simplified to
import melafit as mf(single top-level import replaces multiplefrom melafit.xxx import ...lines) - New minimal getting-started example
example_one_fit.py: single-participant fit withbsbcf,area_cog, result collection, plot and Excel export os.makedirs(result_path, exist_ok=True)added toexample_dlmo.pyandexample_full_profile.pyso result directories are created automatically- README: collapsible getting-started example with output figure added to the Getting Started section
- Version is now managed in a single source of truth:
melafit/_version.pycontains__version__;pyproject.tomlusesdynamic = ["version"]with[tool.setuptools.dynamic]pointing tomelafit._version.__version__;melafit/__init__.pyimports and re-exports__version__from._version - Fixed citation author in module docstring: "Ruf et al. (1992)" → "Ruf (1992)"
See the README for installation instructions and getting started.