Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

better error messages/handling for Samples indexing #24

Open
jrevels opened this issue Feb 11, 2020 · 3 comments
Open

better error messages/handling for Samples indexing #24

jrevels opened this issue Feb 11, 2020 · 3 comments

Comments

@jrevels
Copy link
Member

jrevels commented Feb 11, 2020

@SimonDanisch ran into some issues - Simon please post them here when you get a chance :D

EDIT: this is borderline superseded by #77

@SimonDanisch
Copy link
Contributor

using Onda, OndaViz, Dates

# Use your favorite way to procure some samples:
viewer = OndaViz.OndaViewer();
eeg = viewer.signal_state.signals[][:eeg]::Samples;
# Error I got when I forgot, that one needs to use TimeSpan
eeg[1:2, Nanosecond(1):Nanosecond(45)]
# > MethodError: Cannot `convert` an object of type Int64 to an object of type Nanosecond

# Error if you index with a non existing channel symbol:
eeg[:f1, 1]
# > ArgumentError: invalid index: nothing of type Nothing

@jrevels
Copy link
Member Author

jrevels commented Mar 6, 2020

Nanosecond(1):Nanosecond(45)
MethodError: Cannot convert an object of type Int64 to an object of type Nanosecond

This one is a Base problem, or at least it can't really be fixed without type piracy

eeg[:f1, 1]
ArgumentError: invalid index: nothing of type Nothing

this one should be better though lol

@kleinschmidt
Copy link
Member

still bumping into this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants