19 #pragma warning(disable : 4005 4333 34)
24 #define _USE_MATH_DEFINES
42 #include "tinycolormap.hpp"
46 #include "Cheetah.hpp"
47 #include "Timepix.hpp"
48 #include "Advapix.hpp"
51 namespace chc = std::chrono;
136 void compute_detector(
int nx_cam,
int ny_cam, std::array<float, 2> &offset);
173 std::vector<float> cbed_log;
176 std::mutex ricom_mutex;
177 std::mutex stem_mutex;
178 std::mutex counter_mutex;
179 std::mutex e_field_mutex;
183 template <
typename T>
184 inline void update_surfaces(
int iy, std::vector<T> &
frame);
185 void reinit_vectors_limits();
188 void calculate_update_list();
189 inline void rescales_recomputes();
192 template <
typename T>
193 inline void swap_endianess(T &val);
204 void icom_group_decompose(
int idxx);
205 void icom_group_classical(
int idxx);
208 inline void set_ricom_pixel(
int idx,
int idy);
211 template <
typename T>
212 inline void stem(std::vector<T> *data,
size_t id_stem);
213 inline void set_stem_pixel(
size_t idx,
size_t idy);
216 inline void compute_electric_field(std::array<float, 2> &p_com_xy,
size_t id);
217 inline void set_e_field_pixel(
size_t idx,
size_t idy);
std::array< float, 2 > radius2
std::array< float, 2 > radius
std::vector< int > id_list
void compute_detector(int nx_cam, int ny_cam, std::array< float, 2 > &offset)
std::vector< float > kernel_x
std::vector< float > kernel_y
std::vector< float > f_approx
void approximate_frequencies(size_t n_im)
std::array< int, 2 > kernel_filter_frequency
std::vector< float > kernel_filter
std::vector< int > fftshift_map(int x, int y)
std::vector< float > stem_image
std::vector< size_t > frame
std::vector< float > comy_image
std::vector< size_t > sumy_data[2]
std::array< float, 2 > com_public
bool b_recompute_detector
void draw_e_field_image()
std::atomic< bool > rescale_ricom
std::vector< float > airpi_image
std::vector< float > comx_image
std::vector< std::complex< float > > e_field_data
std::vector< size_t > sumx_data[2]
std::vector< size_t > stem_data[2]
ProgressMonitor * p_prog_mon
std::vector< size_t > dose_data[2]
std::array< std::atomic< size_t >, 3 > frame_id_plot_cbed
std::vector< float > ricom_image
std::atomic< int > last_y
std::atomic< bool > rescale_e_mag
std::array< float, 2 > offset
std::atomic< bool > rescale_stem
void init(Ricom_kernel kernel, int nx_ricom, int ny_ricom)
std::vector< id_x_y > ids
void shift(id_x_y &id_sft, int id, int shift)
id_x_y(int id, bool valid)