Closed SimonDanisch closed 4 years ago
ref https://github.com/beacon-biosignals/Onda.jl/issues/30#issue-577144938, we should use the same strategy for this.
I'll cook up a PR.
It seems mandatory to validate this in the Samples constructor
should be noted (a la #34) that this specific thing needs to be validated on store!
, but is not relevant to every Sample
s construction given that data length need not match the full length of the recording's signal in context (e.g. if it's only a slice)
closed by #35
It seems one is able to save an Onda dataset, with less samples saved then described by
start
/stop
time &sample_rate
. E.g, this will run through fine, even though I just have half half the samples from what I promise:Loading also seems fine:
But indexing errors:
Note, that there is also an off by one problem (Or am i misunderstanding something? But I should be able to index with
duration(samples)
, to get the last sample, no?It seems mandatory to validate this in the
Samples
constructor, so we don't need to do this kind of error checking in e.g. OndaViz and avoid, that people save out lots of datasets with missing samples, just to notice it months later ;) cc @anoojpatel