Decimate keyword Digital_input #84
-
I see that the |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Hi @horsto, Apologies for the inconvienience, I had not realised this functionallity was in active use as I was something I implemented very early in pycontrol development then never used subsequently in any of our experiments. We should certainly reimplement something for this if it is useful. We might want to do it as a seperate class from the standard Digital_input though as it is a waste of pyboard processor resources to pass these events that occur at high rate and never interact with the state machine through the standard event processing pipeline. I've created an issue (#86) for this and will implement something for the next release. |
Beta Was this translation helpful? Give feedback.
-
That makes sense - thanks for your reply! |
Beta Was this translation helpful? Give feedback.
-
I have implemented a It should work fine with the last release (v1.8.1). To use it, just download the file logger = Frame_logger(pin='X1', rising_event='camera_frame', decimate=10) Remember to include the event name in your Let me know how you get on. Also, please could you let me know what error message you get on crashes during long recordings (check the |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, @ThomasAkam ! I will give it a try and report back on stability. I guess the I do not see an Another possibility for me would be to call a python process once in a while to restart the process from Bonsa i, which I am using to record the videos (https://github.com/orgs/pyControl/discussions/85). |
Beta Was this translation helpful? Give feedback.
-
Currently the decimate parameter state is not recorded anywhere (as with the old Digital_input decimate functionallity). If you want to record it you could do the following in your task file. v.decimate_param = 10
logger = Frame_logger(pin='X1', rising_event='camera_frame', decimate=v.decimate_param)
def run_start():
print_variables('decimate_param') |
Beta Was this translation helpful? Give feedback.
I have implemented a
Frame_logger
class in the dev branch here which acts like aDigital_input
but does not send the events to the state machine for processing, just saves their times to the log, and also has a decimate argument which works just like the oldDigital_input
.It should work fine with the last release (v1.8.1). To use it, just download the file
frame_logger.py
using the download button at the link above and put it in thepyControl/devices
folder. Then in your state machine instantiate aFrame_logger
class as:Remember to include the event name in your
events
list.Let me know how you get on.
Also, pleas…