levisim.data.trace¶
Time traces (Trace) and pairs of time traces (TracePair) from simulation or experiment
- class levisim.data.trace.Trace(values, start_time, end_time, Δt, axis, units, source, zero_mean=True)[source]¶
Bases:
objectClass to represent a time trace a.k.a. time series data that helps keep track of:
- values: all values of the time trace - start_time: what point in time does this trace start - end_time: what point in time does this trace end - Δt: the time step of the time series - axis: degree of freedom measured in the trace e.g. 'x', 'y', 'z', 'px', 'py', 'pz', 'kick' - units: 'm' for simulation of x,y,z translation in metres 'kg·m/s' for simulation of px,py,pz momentum in kilogram-metres-per-second 'V' for experimental data in Volts - source: either of type Simulation, or Experiment
- property info¶
Prints info on the trace
- property num_samples¶
Number of samples in the trace
- property time_length¶
Time length of the trace (seconds)
- property sample_rate¶
Sample rate of the trace - how many samples are taken per second? (samples/second)
- property Nyquist_frequency¶
The Nyquist frequency, a.k.a. the bandwidth of the time trace This will be the largest frequency in the spectral density estimate NOTE: https://en.wikipedia.org/wiki/Nyquist_frequency
- property min_Δf¶
Minimum frequency resolution the time trace is capable of producing (Hertz)
- property time_array¶
Array of the time of each sample in the trace, start_time + n Δt for n = 0, …, num_samples - 1 NOTE: this was generate_time_array(start_time, end_time, num_samples), which has num_samples + 1 entries, one more than the values. [s]
- property contrast¶
Ratio of the absolute maximum of the data to its root-mean-square value