PyREx

pyrex.signals.FunctionSignal

class pyrex.signals.FunctionSignal(times, function, value_type=None)

Class for signals generated by a function.

Parameters
timesarray_like

1D array of times (s) for which the signal is defined.

functionfunction

Function which evaluates the corresponding value(s) for a given time or array of times.

value_typeoptional

Type of signal, representing the units of the values. Must be from the Signal.Type Enum.

See also

Signal

Base class for time-domain signals.

pyrex.internal_functions.LazyMutableClass

Class with lazy properties which may depend on other class attributes.

Attributes
times, valuesndarray

1D arrays of times (s) and corresponding values which define the signal.

value_typeSignal.Type

Type of signal, representing the units of the values.

TypeEnum

Enum containing possible types (units) for signal values.

functionfunction

Function to evaluate the signal values at given time(s).

dt

The time spacing of the times array, or None if invalid.

frequencies

The FFT frequencies of the signal.

spectrum

The FFT complex spectrum values of the signal.

envelope

The envelope of the signal by Hilbert transform.

Methods

Type(value)

Enum containing possible types (units) for signal values.

copy()

Get a copy of the FunctionSignal object.

filter_frequencies(freq_response[, force_real])

Apply the given frequency response function to the signal, in-place.

resample(n)

Resamples the signal into n points in the same time range, in-place.

set_buffers([leading, trailing, force])

Set leading and trailing buffers used in calculation of signal values.

shift(dt)

Shifts the signal values in time by dt.

with_times(new_times)

Returns a representation of this signal over a different times array.

PyREx

A Python package for simulation of neutrinos and radio antennas in ice. Version 1.10.0

Navigation