×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Acquition time too long

  • Posts: 6
  • Thank you received: 0
Hello everybody,

For a project:
  • I use a raspberry Pi 4 with a light version of ubuntu
  • I code using python3
  • I would like to get an image by using a camera (ZWO ASI 120mm), at 10Hz (more or less : between 5 and 20Hz), the acquisition time for each frame is between 5 and 20 ms

I wrote a code based on this tutorial: indilib.org/develop/indi-python-bindings.html and it works fine to get one frame (or more).

My only problem is that to get one frame of 20ms, it takes about 0.5 seconds!

I use the following function (the initialization is as in the tutorial):
def one_guide_acquisition(self, exp_time):
    temps1 = datetime.now()
    self.indiclient.blobEvent.wait()
    fits=self.ccd_ccd1[0].getblobdata()
    self.ccd_exposure[0].value = 0.02
    self.indiclient.blobEvent.clear()
    self.indiclient.sendNewNumber(self.ccd_exposure)
 
    print(" axxx ---> temps : ",  "   " , datetime.now() - temps1)
    return fits


The whole function time is used by the "blobEvent.wait()" function that takes ~0.5 second...

Is it normal? Should it be much better?
If it's the normal behavior, do you have ideas on how I can do those acquisitions?


Thanks ;)
Benjamin
Last edit: 1 year 6 months ago by benjamin. Reason: typo
1 year 6 months ago #87196

Please Log in or Create an account to join the conversation.

Do you want to receive the buffer or just save to disk? 500 ms is indeed quite long for a 20ms exposure. Assuming you're using latest INDI with FAST blob support, you should be getting very quick results. However, I don't think pyindi was actually updated to take. I opened a new issue to see if this be supported.

The tutorial needs some updates as well... any volunteers that'd like to edit and maintain it to current standards?
1 year 6 months ago #87205

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0

Replied by benjamin on topic Acquition time too long

Thanks for the answer !
And let's see what will be the answer to the issue you opened.

To answer your question : I would like to get the buffer, I process data immediately after. Not saving on the disk is not a problem.

In the exemple I gave, it is really waiting for the data that takes time, about 500ms :
self.indiclient.blobEvent.wait()

just to precise this point, obtaining data just takes a few milliseconds, and is not a problem :
self.ccd_ccd1[0].getblobdata()

Just to be sure, I checked the IndiLib version :
INDI Library: 1.9.8
Code 1.9.8-tgz. Protocol 1.7.
1 year 6 months ago #87211

Please Log in or Create an account to join the conversation.

If you're not tied to python, you can use the C++ client and get the fast blob support. Otherwise, we'd have to wait until INDI pyclient is updated.
1 year 6 months ago #87212

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0

Replied by benjamin on topic Acquition time too long

Ok, thank you fo the advices.
I'll finish the other parts of the project and then I'll decide if waiting or creating a C++ extension (that could take some time as well :P ).
Benjamin
1 year 6 months ago #87232

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0

Replied by Julie on topic Acquition time too long

Hi !

I seem to have the same problem, only the blobEvent.wait() doesn't take 500ms for me, but it goes on forever just like an endless loop..
Also, this problem seems to come and go, and I can never understand why, or what has changed for it to suddenly work again.
Were you ever able to fix your long acquisition problem ?

Thanks !

Julie
1 year 2 months ago #90065

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0

Replied by benjamin on topic Acquition time too long

Hi Julie,

On my side it is long but regular (except for the first acquisition that car take a little bit more, about 20% more time). I do not have, as you, changes in the acquisition time or endless loop.

I didn't resolved this problem, for the moment this is "almost sufficient" for my projet that just need 5 to 10 Hz acquisitions and I reached 3 Hz.
I'm working on a python library that call a c++ client that just take an image and send it to the python software. I hope it will help.

For the acquisition time, I understood that using only python, the only way it to wait for the libindi library to be updated.

I guess it does not help so much...

++
Benjamin
Last edit: 1 year 2 months ago by benjamin.
1 year 2 months ago #90157

Please Log in or Create an account to join the conversation.

Time to create page: 0.384 seconds