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

Analog Clock and _Data - save after decimated to 10 KHz #117

Open
ederancz opened this issue Feb 24, 2025 · 9 comments
Open

Analog Clock and _Data - save after decimated to 10 KHz #117

ederancz opened this issue Feb 24, 2025 · 9 comments

Comments

@ederancz
Copy link
Collaborator

Hi @robodoing,empirically it is 40 ns (or very close) units, to match the length of other recordings. Can you confirm this?

@RoboDoig
Copy link
Collaborator

This will be depend on the analog clock used the ONI context during running of the workflow I believe. If you go to the OnixHardware sub-workflow you can expose this property from the CreateContext node (OpenEphys.Onix1.ContextTask >> AcqusitionClockHz)

@ederancz
Copy link
Collaborator Author

Yeah, I tried that before but failed, I still feel like a Bonsai novice.
How do I do this? Only driver and index can be externalised, and while the output can be the AcquisitionCLockHz, if I change the output then the workflow breaks, expectedly. I also can't add another CreateContext.
In the future we may decrease the rate anyway, as it is a bit overkill going forward.

Image

@RoboDoig
Copy link
Collaborator

Ah sorry should have been more explicit, if you expose the output as you're doing in the image and hold down Alt when you click it will drop it in a new branch that won't break the workflow.

@ederancz
Copy link
Collaborator Author

Cool, makes sense. It is indeed 250 MHz, for both the system and acq clock. How do I change the acq clock? I looked at the documentation of ONI context but didn't manage to figure it out.
I'm happy if you just show how to set it, I'll then try to implement it in the session settings.

@RoboDoig
Copy link
Collaborator

I think the 250MHz is tied to the FPGA clock cycle for the ONIX board and can't be changed but I may be wrong in that, will look into whether it can be changed. Do you want to change the rate of analog input data collection?

@ederancz
Copy link
Collaborator Author

Yes please, even if not in hardware, is there an efficient way in Bonsai to downsample / average AnalogInput and AnalogClock and AnalogFrameCount to 10 kHz, which would be plenty and would save ~4 orders of magnitude disk space / load time / memory for analysis.

@RoboDoig
Copy link
Collaborator

RoboDoig commented Feb 24, 2025 via email

@RoboDoig
Copy link
Collaborator

RoboDoig commented Feb 24, 2025 via email

@ederancz
Copy link
Collaborator Author

Great, thanks! Also of course analogData is not saved at 250MHz but at 100 kHz, I forgot that but it is apparent in the clock.

@ederancz ederancz changed the title Analog Clock units Analog Clock and _Data - save after decimated to 10 KHz Feb 24, 2025
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

2 participants