10 #ifndef IMPBFF_DECAYROUTINES_H
11 #define IMPBFF_DECAYROUTINES_H
13 #include <IMP/bff/bff_config.h>
26 #include <immintrin.h>
28 #if (defined(__GNUC__) || defined(__clang__))
29 #include <immintrin.h>
36 IMPBFF_BEGIN_NAMESPACE
49 return (n + (a % n)) % n;
67 IMPBFFEXPORT
void decay_rescale(
double *fit,
double *decay,
double *scale,
int start,
int stop);
90 IMPBFFEXPORT
void decay_rescale_w(
double *fit,
double *decay,
double *w_sq,
double *scale,
int start,
int stop);
112 IMPBFFEXPORT
void decay_rescale_w_bg(
double *fit,
double *decay,
double *e_sq,
double bg,
double *scale,
int start,
int stop);
131 IMPBFFEXPORT
void decay_fconv(
double *fit,
double *x,
double *lamp,
int numexp,
int start,
int stop,
double dt=0.05);
148 IMPBFFEXPORT
void decay_fconv_avx(
double *fit,
double *x,
double *lamp,
int numexp,
int start,
int stop,
double dt=0.05);
168 double *fit,
double *x,
double *lamp,
int numexp,
int start,
int stop,
169 int n_points,
double period,
double dt=0.05
190 double *fit,
double *x,
double *lamp,
int numexp,
int start,
int stop,
191 int n_points,
double period,
double dt=0.05
210 IMPBFFEXPORT
void decay_fconv_per_cs(
double *fit,
double *x,
double *lamp,
int numexp,
int stop,
211 int n_points,
double period,
int conv_stop,
double dt);
233 IMPBFFEXPORT
void decay_fconv_ref(
double *fit,
double *x,
double *lamp,
int numexp,
int start,
int stop,
double tauref,
double dt=0.05);
247 IMPBFFEXPORT
void decay_sconv(
double *fit,
double *p,
double *lamp,
int start,
int stop);
259 IMPBFFEXPORT
void decay_shift_lamp(
double *lampsh,
double *lamp,
double ts,
int n_points,
double out_value=0.0);
285 double* model,
int n_model,
286 double* data,
int n_data,
287 double repetition_rate,
288 double instrument_dead_time,
289 double measurement_time,
290 std::string pile_up_model =
"coates",
306 double* lifetime_spectrum,
int n_lifetime_spectrum,
307 double amplitude_threshold
344 double *model,
int n_model,
345 double *time_axis,
int n_time_axis,
346 double *irf,
int n_irf,
347 double *lifetime_spectrum,
int n_lifetime_spectrum,
348 int convolution_start = 0,
349 int convolution_stop = -1,
350 double period = 100.0
391 double *inplace_output,
int n_output,
392 double *time_axis,
int n_time_axis,
393 double *irf,
int n_irf,
394 double *lifetime_spectrum,
int n_lifetime_spectrum,
395 int convolution_start = 0,
396 int convolution_stop = -1
402 #endif //IMPBFF_DECAYROUTINES_H
void decay_fconv_per_cs(double *fit, double *x, double *lamp, int numexp, int stop, int n_points, double period, int conv_stop, double dt)
Convolve lifetime spectrum - fast convolution, high repetition rate, with convolution stop...
void decay_fconv_avx(double *fit, double *x, double *lamp, int numexp, int start, int stop, double dt=0.05)
Convolve lifetime spectrum with instrument response (fast convolution, AVX optimized for large lifeti...
void decay_rescale_w_bg(double *fit, double *decay, double *e_sq, double bg, double *scale, int start, int stop)
Scale model function to the data (with weights and background)
void decay_fconv_cs_time_axis(double *inplace_output, int n_output, double *time_axis, int n_time_axis, double *irf, int n_irf, double *lifetime_spectrum, int n_lifetime_spectrum, int convolution_start=0, int convolution_stop=-1)
void decay_rescale_w(double *fit, double *decay, double *w_sq, double *scale, int start, int stop)
Scale model function to the data (with weights).
void decay_add_pile_up_to_model(double *model, int n_model, double *data, int n_data, double repetition_rate, double instrument_dead_time, double measurement_time, std::string pile_up_model="coates", int start=0, int stop=-1)
Add a pile-up distortion to the model function.
void decay_rescale(double *fit, double *decay, double *scale, int start, int stop)
Scale model function to the data (old version).
void decay_fconv(double *fit, double *x, double *lamp, int numexp, int start, int stop, double dt=0.05)
Convolve lifetime spectrum with instrument response (fast convolution, low repetition rate) ...
void decay_fconv_per(double *fit, double *x, double *lamp, int numexp, int start, int stop, int n_points, double period, double dt=0.05)
Convolve lifetime spectrum with instrument response (fast convolution, high repetition rate) ...
void decay_shift_lamp(double *lampsh, double *lamp, double ts, int n_points, double out_value=0.0)
shift instrument response function
void decay_sconv(double *fit, double *p, double *lamp, int start, int stop)
Convolve fluorescence decay curve with irf.
void decay_fconv_per_cs_time_axis(double *model, int n_model, double *time_axis, int n_time_axis, double *irf, int n_irf, double *lifetime_spectrum, int n_lifetime_spectrum, int convolution_start=0, int convolution_stop=-1, double period=100.0)
void decay_fconv_ref(double *fit, double *x, double *lamp, int numexp, int start, int stop, double tauref, double dt=0.05)
Convolve lifetime spectrum - fast convolution with reference compound decay.
void decay_fconv_per_avx(double *fit, double *x, double *lamp, int numexp, int start, int stop, int n_points, double period, double dt=0.05)
Convolve lifetime spectrum with instrument response (fast convolution, high repetition rate)...
void discriminate_small_amplitudes(double *lifetime_spectrum, int n_lifetime_spectrum, double amplitude_threshold)
int mod_p(int a, int n)
Compute the modulo of a number with respect to a positive integer.