Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/c_lib/include/frequency_averaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

void one_dimensional_averaging(MRS_dimension *dimensions, MRS_averaging_scheme *scheme,
double *spec, unsigned int iso_intrp,
complex128 *exp_I_phase);
complex128 *exp_I_phase, double *rf_amps);

void two_dimensional_averaging(MRS_dimension *dimensions, MRS_averaging_scheme *scheme,
double *spec, double *affine_matrix,
Expand Down
19 changes: 8 additions & 11 deletions src/c_lib/include/interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@
* 1. gaussian-interpolation.
*/
extern void triangle_interpolation1D(double *f1, double *f2, double *f3, double *amp,
double *spec, int *m0, unsigned int iso_intrp);

extern void triangle_interpolation1D_linear(double *f1, double *f2, double *f3,
double *amp, double *spec, int *m0);
double *local_amps, double *spec, int *m0,
unsigned int iso_intrp);

extern void one_d_averaging(double *spec, const unsigned int freq_size, double *freq,
double *amp_real, double *amp_imag, int dimension_count,
const unsigned int position_size, int32_t *positions,
const unsigned int nt, bool user_defined,
bool interpolation, bool is_complex);
double *amp_real, double *amp_imag, double *rf_amps,
int dimension_count, const unsigned int position_size,
int32_t *positions, const unsigned int nt,
bool user_defined, bool interpolation, bool is_complex);

extern void two_d_averaging(double *spec, const unsigned int freq_size, double *freq1,
double *freq2, double *amp, int amp_stride,
Expand Down Expand Up @@ -60,8 +58,6 @@ extern void generic_1d_triangle_average(double *spec, const unsigned int freq_si
const unsigned int position_size,
int32_t *positions, const unsigned int nt);

extern void triangle_interpolation1D_gaussian(double *f1, double *f2, double *f3,
double *amp, double *spec, int *m0);
/**
* @brief Rasterize a vector triangle with coordinates ((f11, f21), (f12, f22), (f13,
* f23)) onto a 2D grid.
Expand Down Expand Up @@ -100,7 +96,8 @@ void octahedronDeltaInterpolation(const unsigned int nt, double *freq, double *a
unsigned int iso_intrp);

extern void octahedronInterpolation(double *spec, double *freq, const unsigned int nt,
double *amp, int stride, int m);
double *amp, int stride, double *rf_amps,
int rf_stride, int m);

extern void octahedronInterpolation2D(double *spec, double *freq1, double *freq2,
int nt, double *amp, int stride, int m0, int m1,
Expand Down
8 changes: 4 additions & 4 deletions src/c_lib/lib/frequency_averaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static inline void sideband_amplitude(int npts, int n_octant, complex128 *a11,

void one_dimensional_averaging(MRS_dimension *dimensions, MRS_averaging_scheme *scheme,
double *spec, unsigned int iso_intrp,
complex128 *exp_I_phase) {
complex128 *exp_I_phase, double *rf_amps) {
unsigned int i, j, k1, address, ptr, gamma_idx;
unsigned int nt = scheme->integration_density, npts = scheme->octant_orientations;

Expand All @@ -86,8 +86,8 @@ void one_dimensional_averaging(MRS_dimension *dimensions, MRS_averaging_scheme *
break;
default:
/**
* Scale the absolute value square with the powder scheme weights. Only
* the real part is scaled and the imaginary part is left as is. */
* Scale the absolute value square sideband ampllitude with the powder scheme
* weights. Only the real part is scaled and the imaginary part is left as is. */
for (j = 0; j < npts; j++) {
cblas_dscal(planA->n_octants * planA->number_of_sidebands,
planA->norm_amplitudes[j], &amps[j], npts);
Expand Down Expand Up @@ -152,7 +152,7 @@ void one_dimensional_averaging(MRS_dimension *dimensions, MRS_averaging_scheme *
vm_double_add_offset(npts, &freq[address], offset, dimensions->freq_offset);
// Perform tenting on every sideband order over all orientations.
one_d_averaging(spec, npts, dimensions->freq_offset, &amps_real[address],
&amps_imag[address], dimensions->count,
&amps_imag[address], rf_amps, dimensions->count,
scheme->position_size, scheme->positions, nt, user_defined,
interpolation, scheme->is_complex);
address += npts;
Expand Down
Loading
Loading