barcode_profile¶
-
pyrost.bin.barcode_profile(double[::1] b_steps, double b_atn, double b_sgm, double blk_atn, double dx, double step, int n_f, int n_x)¶ Return an array of barcode’s transmission profile. Barcode is scanned accross the x axis with ss step size and nf number of steps.
- Parameters
b_steps (numpy.ndarray) – Coordinates of barcode’s bar positions [um].
b_atn (float) – Barcode’s bar attenuation coefficient (0.0 - 1.0).
b_sgm (float) – Bar’s blurriness [um].
blk_atn (float) – Barcode’s bulk attenuation coefficient (0.0 - 1.0).
dx (float) – Sampling interval [um].
step (float) – Scan’s step size [um].
n_f (int) – Scan’s number of frames.
n_x (int) – Size of the wavefront array.
- Returns
b_tr – Array of barcode’s transmission profiles.
- Return type
Notes
Barcode’s transmission profile is simulated with a set of error functions:
\[\begin{split}\begin{multline} T_{b}(x) = 1 - \frac{T_{bulk}}{2} \left\{ \mathrm{erf}\left[ \frac{x - x_{bar}[0]}{\sqrt{2} \sigma} \right] + \mathrm{erf}\left[ \frac{x_{bar}[n - 1] - x}{\sqrt{2} \sigma} \right] \right\} -\\ \frac{T_{bar}}{4} \sum_{i = 1}^{n - 2} \left\{ 2 \mathrm{erf}\left[ \frac{x - x_{bar}[i]}{\sqrt{2} \sigma} \right] - \mathrm{erf}\left[ \frac{x - x_{bar}[i - 1]}{\sqrt{2} \sigma} \right] - \mathrm{erf}\left[ \frac{x - x_{bar}[i + 1]}{\sqrt{2} \sigma} \right] \right\} \end{multline}\end{split}\]where \(x_{bar}\) is an array of bar coordinates.