blissoda.id31.optimize_exposure.optimize_exposure_condition(detector, tframe=0.2, default_att_position=None, desired_counts=100000.0, dynamic_range=1048576, min_counts_per_frame=1000, nframes_measure=1, nframes_default=3, reduce_desired_deviation=True, expose_with_integral_frames=False, maxint_sigma=0)[source]#

Optimize the attenuator and return the optimal exposure time.

  • detector – lima detector object

  • tframe (float) – time of a single frame in accumulation mode

  • default_att_position (Optional[int]) – start the optimization with this attenuator position

  • desired_counts (float) – we want to be close to this maximum pixel value

  • dynamic_range (int) – full well of the detector

  • min_counts_per_frame (float) – we need at least these counts to even start optimizing

  • nframes_measure (int) – number of frames used for optimization measurements

  • nframes_default (int) – try modify attenuators for this number of frames

  • reduce_desired_deviation (bool) – reduce deviation from the desired counts

  • expose_with_integral_frames (bool) – exposure time is n x frame time with n integral or not

  • maxint_sigma (float) – gaussian smoothing sigma in pixels before getting the maximum frame intensity

Return type:



optimal exposure condition