thunderboltz.ThunderBoltz.get_ss_params
- ThunderBoltz.get_ss_params(ss_func=None, fits=False)[source]
Get steady-state transport parameter values by averaging last section of time series. By default, the last fourth of the available data is considered to be steady-state. Standard deviations over this interval will be computed for each parameter in a new column with a “_std” suffix added to the column name.
- :param ss_func (callable[
pandas.DataFrame:TBParameters]->:class:pandas.DataFrame): A function that takes in numerical time series data and returns a new frame with only data that is considered to be at steady state. For example,
ss_func=lambda df: df[df.t > 1e-6]would select only times in the simulation after one microsecond for steady state calculations, orss_func=lambda df: df.iloc[50:,:]would select the last 50 time steps.- :param
TBParameters]->:class:pandas.DataFrame): A function that takes in numerical time series data and returns a new frame with only data that is considered to be at steady state. For example,
ss_func=lambda df: df[df.t > 1e-6]would select only times in the simulation after one microsecond for steady state calculations, orss_func=lambda df: df.iloc[50:,:]would select the last 50 time steps.
- Parameters:
fits (bool) – Option to use a line of best fit over the steady state window to calculate time dependent parameters (bulk swarm parameters and rate coefficients). rather than averaging derivatives with the forward difference formula.
Truedoes so for all rate parameters. Default is False.- Returns:
The aggregated steady-state data for each output parameter along with columns specifying the input parameters.
- Return type:
- Raises:
RuntimeWarning – if not enough steps are available to compute steady state statistics.
Warning
Currently, the last quarter of the time series data is assumed to be in steady-state by default when calculating these steady-state parameters. One can verify that this is true by viewing the figures produced by
plot_timeseries(). Otherwise, one may run the simulation for longer, or provide the appropriate steady state criteria viass_func.- :param ss_func (callable[