Skip to content

timeseries attributes like t.sampling_rate should be more tightly integrated #90

@ivanov

Description

@ivanov

right now, not only do sampling_rate and sampling_interval not know about each other, so you have to set both if you're changing them, but they also don't know about their underlying data.

In [21]: ts.UniformTime(0,10,10)
Out[21]: UniformTime([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.], time_unit='s')

In [22]: ut = _

In [23]: ut*10
Out[23]: UniformTime([  0.,  10.,  20.,  30.,  40.,  50.,  60.,  70.,  80.,  90.], time_unit='s')

In [24]: ut2 = ut*10

In [25]: ut2.sampling_rate
Out[25]: 1.0 Hz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions