Version 0.3.0 — Cleaner API
What's Changed
AnalysisResultrenamed toAnalysisRecordAnalysisInforenamed toSessionInfo; describes the data acquisition
session only (participant,start,end);funcandr2removedSessionInfoconstructor simplified: accepts a singlep_dataDataFrame
(as returned byprepare_part_data());participant,startandend
are derived automaticallyFitResult.to_dict()now includesfunc(waveform function name) andr2
(R² goodness of fit), both computed automatically at the end offit()r2is no longer a field ofSessionInfo;fit()computes and stores it
inFitResultdirectlycompute_wave()eliminated; replaced by thegen_time_range()+
waveform-function pattern:gen_time_range()accepts a Timestamp series or
explicittmin/tmaxbounds and a pandas offset string forstep, and
returns a time axis as float days since the Unix UTC epoch, which is
then passed directly to the waveform function (e.g.
bsbcf(t=gen_time_range(series, step="1min"), p=fit_result))- New helper
to_days()converts timestamps to float days since the Unix UTC
epoch; timezone-naive input is treated as UTC, timezone-aware input is
converted to UTC first - New helper
from_days()is the inverse ofto_days(); returns a
UTC-awarepd.DatetimeIndex day_profile(),midpoint()andarea_cog()now accept a float days
array (as returned bygen_time_range()) in addition topd.DatetimeIndexfit()now accepts adatetime64array or pandasTimestampSeries for
time_fit; conversion viato_days()is automaticprepare_part_data()no longer adds aTimedayscolumn to the returned
DataFrame; time handling is done internally viato_days()prepare_part_data()returns an independent copy of the participant's data;
mutations to the returned DataFrame do not affect the original; redundant
DateandTimecolumns are dropped (both are combined inTimestamp)
See the README for installation instructions and getting started.