scriptorron / indi_pylibcamera

INDI libcamera driver made in Python
MIT License
13 stars 4 forks source link

IMX 296 color issue #69

Closed khodgema closed 6 months ago

khodgema commented 6 months ago

I'm having an issues with the raspi global shutter camera my exposure times are limited to at most 0.001. Ive played around with the camera controls and haven't been able to get a combination that allows for reasonable exposure times. I'm not sure if the issues is part of my configuration or the code modifications made for the mono version of the sensor. Any help would be greatly appreciated.

MyCam.txt

scriptorron commented 6 months ago

Sorry for this bug. I was hoping I fixed that in February :-( Unfortunately I do not have an IMX296 camera to test. So I have not seen this bug.

Root cause are the strange exposure time limits reported by pylibcamera2 or libcamera. In your "MyCam.txt" you find the "Camera controls" with an entry 'ExposureTime': (29, 0, None). This means that minimum exposure time is 29 micro seconds and maximum exposure time is 0. I do not know if this is a bug or a feature. Anyway, for cameras reporting maximum exposure time lower than minimum I wanted to set the maximum exposure time to 1000 seconds. Unfortunately I set it to 1000 micro seconds.

I will fix this and make a new version of indi_pylibcamera. I will send you a message when it is done.

scriptorron commented 6 months ago

I made version 2.6.4. You can install it with pip.

Please be so kind and tell me if it works.

khodgema commented 6 months ago

The clouds rolled in before I could get focused but that seems to have done the trick, thanks for the speedy help!

scriptorron commented 6 months ago

Do you get monochrome images and can your post-processing tools handle them? Please tell me if you see artifacts, errors or incompatibilities. I really appreciate your feedback. Thank you.

khodgema commented 6 months ago

I'm getting color images, theirs banding and hot pixels but nothing that cant be cleaned up.

scriptorron commented 6 months ago

Isn't it a monochrome camera? Can you send me a FITS image? I will have a look if metadata or data scaling is wrong.

khodgema commented 6 months ago

There seems to be a color and a mono version, I have the color version. I've attached a dark with the gain maxed, I don't see anything that isn't correctable and its worked for guiding so far.

https://file.io/R0kFyhHlq95I

scriptorron commented 6 months ago

Thank you. The dark image looks good! There are some hot pixel but this is normal. The horizontal stripes are likely dancing between the frames. I see similar stripes with the HQ camera. Likely it comes from noise on supply or reference voltages. Until now I did not found a solution to reduce them (I tried switching off WIFI and BlueTooth, tried better supply voltage filtering, RF shielding of the whole camera, ...). The stripes look serious due to the automatic histogram stretching of FITS viewers. But in fact the amplitudes are small and stacking removes them pretty good.

If you agree I will close this issue in the next days.

khodgema commented 6 months ago

sounds good, thanks again for the help.