Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

How to use the EDF reader as an input #193

Open
encoded-evolution opened this issue Oct 1, 2022 · 6 comments
Open

How to use the EDF reader as an input #193

encoded-evolution opened this issue Oct 1, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@encoded-evolution
Copy link

encoded-evolution commented Oct 1, 2022

Hi, I have made a very simple classifier using an EDF reader as an input, a channel splitter, and I have a Viewer module attached to one of the channels. No errors are showing. And the channel splitter correctly shows the channels in the EDF file. So far, so good.

Yet, I cannot switch from the Test Device to Use Active Device. When I try to do so, it automatically turns on all Test Device channels and uses the auto-generated signals instead. I cannot get it to stick to "Use Active Device". When I shut off Test Device in Settings, it shuts off, and Active Device is the default, but then nothing shows in the graphs at all.

Even when I hit GO to start session, same thing occurs. Apparently reading from an EDF is not a "device". How do I use stored data from an EDF for analysis? How do I troubleshoot this?

note: For the EDF reader node, I am using the default sample rate of 0.0, and it automatically finds 256.0

image

Another view with more info. The file is obviously being read. Yet nothing shows below

image

@stellarpower
Copy link

I don't think files, OSC, etc. are currently supported as first-class devices. The way I have inspected data like this is just to use the signal view node; but not sure why this is not working. Sample rate of 0 sounds interesting...

@encoded-evolution
Copy link
Author

I don't think files, OSC, etc. are currently supported as first-class devices. The way I have inspected data like this is just to use the signal view node; but not sure why this is not working. Sample rate of 0 sounds interesting...

Yes, I don't understand why it wouldn't work either. I'd be happy to try other ideas.

@JuliusCosmoRomeo
Copy link
Contributor

Hey @encoded-evolution, excuse the late reply. Good catch, it seems that the EDF Reader node is not working at the moment. We've fixed the EDF Writer node last year to enable recording of files but in that context didn't touch the Reader.
We'll add it to our backlog and will provide a fix for this once we have capacity and resources. Thanks for your understanding!
Julius

@JuliusCosmoRomeo JuliusCosmoRomeo added the bug Something isn't working label Feb 3, 2023
@stellarpower
Copy link

stellarpower commented Jul 8, 2023

Is this still expected to be reproducible, I presume?

On 1.7.1, if I add a file reader node, I just get a constant zero trace in the signal view. It's a file that I originally output using the writer node aswell. I've checked the sample rate I've provided against what EDFBrowser shows me in the metadata. Don't get anything in the logs:

2023-07-08 20:56:03.000: Loading channels in EDF(+) / BDF(+) format...
2023-07-08 20:56:05.000: Done.
2023-07-08 20:56:05.000: Read 1 samples in 1 channels.

On another file (first zip) the process crashes. Looks like this may be because the file contains more than one channel, as separating out one channel from this file I get the zero trace as above.

I'll see if I can break out a debugger later.

@stellarpower
Copy link

Working on a fix now. If I don't make it, cause it's pretty slow to debug the handrolled STL types that my debugger can't print for me, I think the issue is starting on this line:

channel->ForceUpdateSampleCounters();

The indexing is one dimension out - mNumSamples comes out as 1, but the container below has the value I expect. This call isn't made when we read in CSV.

@stellarpower
Copy link

stellarpower commented Sep 29, 2023

Have "v2 channels" been implemented? I see logic for working on chunks, so I assume so, and am guessing this comment probably indicates our culprit. Was the File Reader Node written before with non-paginated Channels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants