Skip to content

Version 0.4.0 — Improved API and examples

Choose a tag to compare

@vitaliy-ch25 vitaliy-ch25 released this 24 May 08:32
fc83cd0

What's Changed

  • AmplitudeResult now includes a baseline field (waveform minimum)
  • ResultsCollector records and Excel output now include the baseline column
  • __str__() added to all AnalysisRecord subclasses for human-readable print() output:
    • SessionInfo: participant name and session date/time range
    • AmplitudeResult: amplitude and baseline values
    • MidpointResult: DLMOn, DLMOff and Midpoint times
    • AreaCogResult: area and COG time
    • FitResult: function name, parameters and R²
    • AnalysisRecord base: generic fallback derived from to_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 baseline field and ResultsCollector column
  • All example scripts simplified to import melafit as mf (single top-level import replaces multiple from melafit.xxx import ... lines)
  • New minimal getting-started example example_one_fit.py: single-participant fit with bsbcf, area_cog, result collection, plot and Excel export
  • os.makedirs(result_path, exist_ok=True) added to example_dlmo.py and example_full_profile.py so 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.py contains __version__; pyproject.toml uses dynamic = ["version"] with [tool.setuptools.dynamic] pointing to melafit._version.__version__; melafit/__init__.py imports 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.