ADACS-Australia / HuntsmanCamera

1 stars 0 forks source link

realtime exposure time adjustment #2

Open lspitler opened 4 weeks ago

lspitler commented 4 weeks ago

Ideally without compromising frame rate (too much), change the exposure time based upon the sky background based on the mode of a central region of the image.

Parameterise as a max/min fraction sky_background_min_fraction sky_background_max_fraction of the full well depth.

Example code here: https://chatgpt.com/share/67241dac-19ac-800b-aac1-769bc9c66f1e

MartinCupak commented 4 weeks ago

This will need a bit of experimenting with the driver - test whether it is possible to change exposure time without stopping video capture. Not sure with that.

lspitler commented 2 weeks ago

Algorithm likely can be adapted from: https://github.com/AstroHuntsman/huntsman-pocs/blob/develop/src/huntsman/pocs/utils/flats.py#L233

lspitler commented 4 days ago

@MartinCupak it will be hard to do everything with this mode (e.g., maintain high frame rates as video mode goes on/off) the prioritised requirements would be (from to high to low priority):

  1. make sure there is enough photons to get useful science data
  2. make sure that the source is not saturating - will be hard to figure out where the source is, so how about the criteria should be max(pixel_values) < 0.8 full_well_depth
  3. frame rates should be as high as possible, but willing to accept lower rates by not using video
  4. willing to accept risk that occasional images are not ideal, so could consider only changing exposure time every time_recalculate_optimal_exposure_time.
lspitler commented 3 days ago

@MartinCupak it seems like autoexposure setting is actually available from the ZWO camera itself when in video mode: https://bbs.zwoastro.com/d/10423-auto-exposure-and-auto-gain-settings

So might be trivial to implement. It would be good to know (and set) what metric they are using. Max pixel value would be ideal.