nion-software / nionswift-instrumentation-kit

Base classes for Nion Swift STEM microscope instrumentation
GNU General Public License v3.0
1 stars 12 forks source link

Improve DriftTracker. Separate out cross-correlation. Allow multiple drift sources. #116

Open Brow71189 opened 2 years ago

Brow71189 commented 2 years ago

I'm creating this as a draft for now so that you can already review the basic concept. I'm going to add a dedicated test file DriftTracker_test.py and test the different scenarios that the revamped DriftTracker supports now.

The idea behind the changes is that we can track multiple sources of drift data and collect the measured drift rates in one place, the DriftTracker class. I've also separated out the cross-correlation algorithm from the DriftTracker class, so that we can use different algorithms for different usecases. One question I'm not sure about yet is if we want to allow different cross-correlation algorithms for different DriftDataSources. Right now you can only define one algorithm which will be used for all calculations. There is the option to change the algorithm before each call to submit_image, so you can still use different ones for different sources. But we might want to store the preferred cross-correlation algorithm with each DriftDataSource instead.

cmeyer commented 2 years ago

I'm personally very inconsistent in documenting architectural decisions, so I'm not a good example; but in this case, I think it would be useful for you to use them for this project [drift tracking]. An example for Acquisition.py is here.

Overall, it may be useful to read through this website. We can chat offline about it too.

cmeyer commented 8 months ago

Waiting on