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

File Writer will not Save to EDF when Overwrite is Unset and Data Does not Flow Immediately #283

Open
stellarpower opened this issue Jun 5, 2023 · 0 comments

Comments

@stellarpower
Copy link

I have feedback scores as part of my protocols, and I want to write these to file. The state machine begins with a period of obtaining baselines, so the data for the feedback scores is not yet flowing in the graph, and as such there is nothing for the File Writer node to consume.

I have set all nodes to "Never Overwrite"; I want to save my data and then rename it before accidentally junking it (given I don't see a way to parameterise the file name, e.g. with a timestamp).

This works fine for writing CSV; the file contains plenty of empty rows (raw CSV is e.g. Timestamp,,,) whilst the baselines are being captured. For EDF, it seems immediately I start the protocol, the headers are written, so I get a 1 KiB file, but, then once data is ready, the node turns red and I get a graph error that the file already exists. It therefore appears that whilst data is not ready, the CSV writer will continue to output empty rows, the EDF writer is opening a new "session" once the data is finally coming through after baseline calibration, and is thus complaining that the file exists when I have set the node not to overwrite.

Expected Behaviour

For EDF, I have not checked the spec to see if empty entries are allowed, or if there is a way to have timestamps that are not at regular intervals, or it supports some type of NaN equivalent marker. But one of these options would seem the most logical. If not, I would suggest that if data is not available, the classifier should hold off on attempting to write out that file yet. I presume the state machine may somehow be triggering opening the file for writing anew once the data is ready, so I think this behaviour of re-opening the file shouldn't be happening, or if data was not present at the start, the writer should only be prepared once the data is coming through.

Thanks

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

No branches or pull requests

1 participant