Fix reading blackrock digital events.#552
Fix reading blackrock digital events.#552JuliaSprenger merged 1 commit intoNeuralEnsemble:masterfrom
Conversation
Blackrock specs say packet_insertion_reason is 1 for PARALLEL and 129 for SERIAL. (also 64 for PERIODIC, not implemented) i.e. bit 1 is set for parallel and bits 1 and 7 are set for serial. Because the bitfield is just a unique ID, I removed the bit testing and use equality instead.
|
Hello @histed! Thanks for submitting the PR.
|
1 similar comment
|
Thank you for the patch. |
|
Hi @histed, thank you for your contribution. The Blackrock manual that I have available is quite ambiguous regarding this issue. I would only suggest a small change: Instead of raising an error when an unknown event code is found, a warning would fit better. Then the user knows there might be more data in the file that cannot be processed, but the rest of the content remains available. |
Blackrock specs say packet_insertion_reason is
1 for PARALLEL and 129 for SERIAL. (also 64 for PERIODIC, not implemented)
i.e. bit 1 is set for parallel and bits 1 and 7 are set for serial.
Because the bitfield is just a unique ID, I removed the bit testing and use equality instead.
Apologies: I didn't write tests for this code. But this fixes a bug where both parallel and serial events were being returned as parallel due to the bit testing above.