openlifu.bf.pulse.Pulse

class openlifu.bf.pulse.Pulse(frequency: Annotated[float, OpenLIFUFieldData(name='Frequency (Hz)', description='Frequency of the pulse in Hz')] = 1.0, amplitude: Annotated[float, OpenLIFUFieldData(name='Amplitude (AU)', description='Amplitude of the pulse (between 0 and 1). ')] = 1.0, duration: Annotated[float, OpenLIFUFieldData(name='Duration (s)', description='Duration of the pulse in s')] = 1.0)[source]

Bases: DictMixin

Class for representing a sinusoidal pulse

amplitude: Annotated[float, OpenLIFUFieldData(name='Amplitude (AU)', description='Amplitude of the pulse (between 0 and 1). ')] = 1.0

Amplitude of the pulse in arbitrary units (AU) between 0 and 1

calc_pulse(t: array)[source]

Calculate the pulse at the given times

Parameters:

t – Array of times to calculate the pulse at (s)

Returns:

Array of pulse values at the given times

calc_time(dt: float)[source]

Calculate the time array for the pulse for a particular timestep

Parameters:

dt – Time step (s)

Returns:

Array of times for the pulse (s)

duration: Annotated[float, OpenLIFUFieldData(name='Duration (s)', description='Duration of the pulse in s')] = 1.0

Duration of the pulse in s

frequency: Annotated[float, OpenLIFUFieldData(name='Frequency (Hz)', description='Frequency of the pulse in Hz')] = 1.0

Frequency of the pulse in Hz

to_table() DataFrame[source]

Get a table of the pulse parameters

Returns:

Pandas DataFrame of the pulse parameters