Skip to content

Commit

Permalink
add ideal MTF curve for perfect pixel detector
Browse files Browse the repository at this point in the history
  • Loading branch information
emx77 committed Oct 20, 2020
1 parent 5c87ffc commit c07a0f0
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions ASI_MTF.ijm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
print("");
print("ASI_MTF");
print("version: 1.0.2");
print("date: 20180316");
print("version: 1.0.3");
print("date: 20201020");
print("Author: Erik Maddox, Amsterdam Scientific Instruments B.V.");
print("");

Expand Down Expand Up @@ -218,14 +218,29 @@ for (i=0; i<ft_len; i++) {
ft_hist[i]= ft_hist[i]/tmp;
}

// MTF for ideal pixel detector

ft_a = newArray(ft_len);
pi = acos(-1);
for (i=0; i<ft_len; i++) {
x = 0.5*pi*sf[i];
x = sin(x)/x;
ft_a[i]=x;
}

// todo: update plot titles

//Plot.create("Fourier amplitudes: ", "frequency bin", "amplitude (RMS)", sf, ft_hist);
Plot.create("Fourier amplitudes: ", "Spatial frequency (Nyquist)", "MTF", sf, ft_hist);
Plot.setLimits(sf[1], 1, -0.1, 1.1);
Plot.setColor("blue");
Plot.add("line", sf, ft_fit);
Plot.setColor("black");
Plot.add("line", sf, ft_fit);
Plot.setColor("red");
Plot.add("line", sf, ft_a);

Plot.addLegend("hist\nfit\nideal", "Top-Right");
Plot.setColor("blue");

Plot.show();

print("histogram MTF(0,0.5,1.0):", ft_hist[1], ft_hist[floor(0.25*ft_len)],ft_hist[floor(0.5*ft_len)]);
Expand Down

0 comments on commit c07a0f0

Please sign in to comment.