This release includes a new "FastADT" experiment type as well new stage translation and rotation calibration routines. It adds an option to annotate images, display figures, and save results. It improves writing PETS input files, fixes support for remote cameras, and improves remote TEM control while attempting to fix numerous bugs, improve existing interfaces, maintain current code architecture, and extend testing infrastructure.
What's Changed
- In
CalibBeamShift, allow saving output tiff files in a new directory by @Baharis in #124 - Improve the performance of
VideoStreamFrame.on_frameby @Baharis in #131 - Modify PETS writer to prevent duplicates, use
config.camera.pets_prefix/suffixby @Baharis in #134 - Add
VideoStreamFrame.processorto annotate frames and display figures by @Baharis in #135 - Add
save_imagebutton to save (annotated) frame/image as PNG by @Baharis in #135 - Add
instamatic.calibrate_stage_rotationto measure rotation pace in sec/deg by @Baharis in #136 - Add "FastADT" tab for RED, PED, cRED with multiple a priori trackings by @Baharis in #137, #145, #148
- Add magnification, stage Z control, tighten the GUI control panel by @Baharis and @viljarjf in #142
- Allow cameras run on server to stream data to GUI by @Baharis in #143
- Save
CalibBeamShiftas yaml, and display its results in GUI if run live by @Baharis in #144 save_frameandsave_imagecan now be called mid-experiment (but may affect it!) by @Baharis in #148- Streamline stagematrix
calibrate_stage_allby trying to roughly estimate pixelsize by @Baharis in #149 - Add
instamatic.calibrate_stage_translationto measure translation pace in nm/deg by @Baharis in #150 - Enable speed control in cRED and control GUI for hardware without goniotool by @Baharis in #151
Bug fixes
- Fix
CalibBeamShiftreturn type, script entry point, image filename typo by @Baharis in #124 - Fix carriage return
\rand ANSI escape handling by Instamatic GUI console by @Baharis in #126 - Fix outdated casting of all tiff image intensities to
uint16range by @iverks in #127 - Fix image dynamic range wrong scaling when set to
camera.dynamic_rangeby @Baharis in #131 - Fix
TEMController.storeandrestoreconfig name and type mishandling by @Baharis in #133 - Fix "Increase size" button to double the image size instead of setting it to 950 x 950 in #135
- Fix offset when clicking on a trimmed frame and inaccessible flatfield application by @Baharis in #135
- Fix
numpy2-gatansocket3serialization bug (#130) caused bynp.int_def change by @Baharis in #139 - Fix multiple
CalibBeamShift's methods and entry points, i.e. with serial input by @Baharis in #144 - Fix
save_frame, newsave_image, and repeated use of alpha wobbler crashing GUI by @Baharis in #148 - Fix
instamatic.caliubrate_stagematrixoption--all_magsby @Baharis in #149 - SYnchronize calls to
CamClientto prevent mixing function inputs/outputs by @Baharis in #151
Maintenance
- Align
Deflectortyping with its implementation by @Baharis in #124 - Introduce
Beam.blanked()andunblanked()context managers by @Baharis in #125 - Make
Stage.set'sspeedandwaitargs keyword-only, makeNonespeed's sentinel by @Baharis in #128 - Update pre-commit hooks and run Ruff formatter on all files by @stefsmeets in #129
- Align
frame/imagenaming, clear unused imports inVideoStream,Stagetyping by @Baharis in #135 - Add
instamatic.utils.domains.NumericDomainfor choosing from limited options by @Baharis in #136, #150 - Add
tests.utils.InstanceAutoTrackerto improve parametrized test readability by @Baharis in #137 - Changed code maintainer from @stefsmeets to @Baharis in #138
- Add Instamatic collections' and tools' tests and add numpy2 support by @Baharis in #139
CamClient: try to evaluate before raising KeyError in case of cam interface mismatch by @Baharis in #143CalibBeamShift: make dataclass, align terms, declutter; implementprinterw/tqdmby @Baharis in #144- Make
ClickDispatchera dataclass, addSCROLL_UP,_DOWNhandling,xyproperty by @Baharis in #145 - Add new
instamatic.utils.iterating.pywithsawtooth,pairwiseiterators by @Baharis in #145, #149 - Add
VideoStream.unblockedcontext manager to complement existingunblockedby @Baharis in #145 - Fix FastADT
osc_angleissues andImgConvertertype hints by @Baharis in #146 - Replace redundant
triggerEvent/set_triggerboilerplate, rely just onBaseModule.qby @Baharis in #147 - Give all GUI frames access to
.q,AppLoadervia.app, rm unused imports by @Baharis in #147, #148, #151 - Clean up
calibrate_stagematrix: type hints, naming, repetition, unused imports by @Baharis in #149 - Add
instamatic.utils.nativeto quickly convert numpy to native types, add tests by @Baharis in #150
Full Changelog: 2.1.1...2.2.0