DataFrame to Sweep conversion

Converter routine to create a sweep definition from a given DataFrame

DMT.core.df_to_sweep.df_to_sweep(df_to_convert: ~DMT.core.data_frame.DataFrame, temperature: float = 300.0, name: str | None = None, from_forced: bool = True, SweepDefClass: ~typing.Type = <class 'DMT.core.sweep_def.SweepDef'>, decimals_potentials: int = 3)[source]

Create a sweepdefinition which simulates the same forced values as the given measurement data frame.

For the moment only voltage sweeps…

Parameters:
df_to_convertDataFrame

DataFrame with voltages which define the sweep.

temperaturefloat, optional

Temperature of the measurement in Kelvin, defaults to 300.0

namestr, optional

Name of the sweep to create. If None, automatic generation of a name is tried.

from_forced{True, False}, optional

If True, the forced voltages are used to create the sweepdef.

SweepDefClassSweepDef

SweepDef class for the sweep to create from

decimals_potentialsint

Round the potentials to this x decimals, defaults to 3

Returns:
Sweep