autoemx.core.em_runtime.xsp_spot_selection module
Programmatic X-ray spot selection on automatically navigated particles.
When PowderMeasurementConfig.par_spot_selection_mode is 'callback', the
framework navigates to each particle automatically and invokes xsp_spot_selector
repeatedly on the same particle until the callback returns an empty list.
- class autoemx.core.em_runtime.xsp_spot_selection.XSpSpotSelectionContext(particle_id: int, n_tot_sp_collected: int, ref_image: Any, pixel_size_um: float, frame_label: str, im_width: int, im_height: int, particle_finder: EM_Particle_Finder)[source]
Bases:
objectContext passed to
xsp_spot_selectorafter automatic particle navigation.The callback is invoked once per spot batch on the current particle. Return a non-empty list of pixel coordinates to measure, then wait for the next invocation to supply more spots. Return
[]when finished with this particle (including to skip it without measuring).ref_imageis the frame captured at spot-selection time. It is the same image used as the drift-correction reference during subsequent acquisitions on this particle (seeEM_Controller.ref_image).- particle_id: int
- n_tot_sp_collected: int
- ref_image: Any
- pixel_size_um: float
- frame_label: str
- im_width: int
- im_height: int
- particle_finder: EM_Particle_Finder