-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Implement different AIM drift correction algorithm (or DME) #450
Comments
Hi, I agree, the algorithm looks great, we will consider your suggestion! Bests, |
So it seems to work at least as good as RCC. Is there a good way to quantify resolution? I guess I could do a nearest neighbor analysis. The algorithm was super fast. About 2 s. RCC was about 5-10s. I wrote a hacky matlab script %% Example code
% align the picasso images
clc
clear
close all
warning('off')
addpath(genpath('.'))
addpath(genpath('./AIM'))
addpath(genpath('./DME_RCC'))
addpath(genpath('./Data'))
%% Load HDF5 picasso
in_file = 'Data/C1-20240604-164932_WT.ome_locs.hdf5'
%inh5 = H5F.create (in_file, 'H5F_ACC_TRUNC', 'H5P_DEFAULT', 'H5P_DEFAULT');
%% load HDF5
locs = h5read(in_file, '/locs')
%% align
Localizations(:,1) = double(locs.frame);
Localizations(:,2) = double(locs.x);
Localizations(:,3) = double(locs.y);
%% AIM drift correction
trackInterval = 50; % time interval for drift tracking, Unit: frames
t_start = tic;
[LocAIM, AIM_Drift] = AIM(Localizations, trackInterval);
AIM_time = toc(t_start)
%% save output
olocs.frame = LocAIM(:, 1)
olocs.x = LocAIM(:, 2)
olocs.y = LocAIM(:, 3)
olocs.lpx = locs.lpx
olocs.lpy = locs.lpy
out_name = [in_file(1:end-4) '_undrifted.hdf5']
% Not working for some reason in 2020b
% h5write(out_name, '/locs', locs)
save_picasso('.', out_name, olocs) |
AIM will be implemented in Picasso 0.7.0. |
Thanks! Looking forward to that. |
Amazing, I just saw AIM is now in 0.7. Can't wait to try it out. |
The installer is in the making : ) |
I recently came across this paper (https://www.science.org/doi/10.1126/sciadv.adm7765), which presents a novel drift correction method called AIM.
.
It looks almost too good to be true. We are planning to test the Matlab version (https://github.com/YangLiuLab/AIM).
If it works well, would there be interest in including AIM in picasso? (I realize there is no Python version yet, but the algorithm seems quite easy to port over to Python).
Any comments on AIM are also welcome.
The text was updated successfully, but these errors were encountered: