Version:

salvus.flow.collections.types

salvus.flow.collections.types salvus flow collections types
Types for the SalvusFlow collection objects.

Classes

TimeAxis

A time axis representation.
SIGNATURE
class TimeAxis(builtins.object):
    def __init__(
        self,
        start_time: float,
        reference_time: float,
        number_of_samples: int,
        dt: float,
        improper_last_sample: bool = False,
    ) -> None: ...
ARGUMENTS
Required
start_time
Type:float
Description:
The start time in seconds.
Required
reference_time
Type:float
Description:
The reference time in seconds, e.g. what time zero refers to.
Required
number_of_samples
Type:int
Description:
The number of samples.
Required
dt
Type:float
Description:
The sampling interval in seconds.
Optional
improper_last_sample
Type:bool
Default value:False
Description:
Whether or not the final sample lies on the regular grid of the time axis, or if it is the product of writing a final time step regardless of subsampling.

Properties

  • end_time(float)-The end time in seconds.
  • sampling_rate(float)-The sampling rate in Hz.

Class Methods

TimeAxis.from_start_end_dt()
Construct a time axis object from the start and end time as well as the sampling interval.
Will place at least a sample at or beyond the final time step
SIGNATURE
def from_start_end_dt(
    start_time: float,
    end_time: float,
    dt: float,
    reference_time: float,
    improper_last_sample: bool = False,
) -> TimeAxis: ...
ARGUMENTS
Required
start_time
Type:float
Description:
The start time in seconds.
Required
end_time
Type:float
Description:
The end time in seconds.
Required
dt
Type:float
Description:
The sampling interval in seconds.
Required
reference_time
Type:float
Description:
The reference time.
Optional
improper_last_sample
Type:bool
Default value:False
Description:
Whether or not the final sample lies on the regular grid of the time axis, or if it is the product of writing a final time step regardless of subsampling.

Methods

TimeAxis.to_array()
Return the time axis as a numpy array.
SIGNATURE
def to_array(self) -> npt.NDArray: ...
PAGE CONTENTS