Skip to content
Snippets Groups Projects
Commit 8e3a2150 authored by David Hammer's avatar David Hammer
Browse files

Fix indentation

parent 7e6d6bc9
No related branches found
No related tags found
2 merge requests!12Snapshot: field test deployed version as of end of run 202201,!3Base correction device, CalCat interaction, DSSC and AGIPD devices
......@@ -11,20 +11,20 @@ extern "C" {
Will convert to output dtype for output
*/
__global__ void correct(const {{input_data_dtype}}* data,
const unsigned short* cell_table,
const unsigned char corr_flags,
// default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD)
const unsigned char default_gain,
const float* threshold_map,
const float* offset_map,
const float* rel_gain_pc_map,
const float* md_additional_offset,
const float* rel_gain_xray_map,
const float g_gain_value,
const unsigned int* bad_pixel_map,
const float bad_pixel_mask_value,
float* gain_map, // TODO: more compact yet plottable representation
{{output_data_dtype}}* output) {
const unsigned short* cell_table,
const unsigned char corr_flags,
// default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD)
const unsigned char default_gain,
const float* threshold_map,
const float* offset_map,
const float* rel_gain_pc_map,
const float* md_additional_offset,
const float* rel_gain_xray_map,
const float g_gain_value,
const unsigned int* bad_pixel_map,
const float bad_pixel_mask_value,
float* gain_map, // TODO: more compact yet plottable representation
{{output_data_dtype}}* output) {
const size_t X = {{pixels_x}};
const size_t Y = {{pixels_y}};
const size_t input_cells = {{data_memory_cells}};
......@@ -83,13 +83,13 @@ extern "C" {
unsigned char gain = default_gain;
if (corr_flags & THRESHOLD) {
const float threshold_0 = threshold_map[0 * threshold_map_stride_threshold +
map_cell * threshold_map_stride_cell +
y * threshold_map_stride_y +
x * threshold_map_stride_x];
map_cell * threshold_map_stride_cell +
y * threshold_map_stride_y +
x * threshold_map_stride_x];
const float threshold_1 = threshold_map[1 * threshold_map_stride_threshold +
map_cell * threshold_map_stride_cell +
y * threshold_map_stride_y +
x * threshold_map_stride_x];
map_cell * threshold_map_stride_cell +
y * threshold_map_stride_y +
x * threshold_map_stride_x];
// could consider making this const using ternaries / tiny function
if (raw_gain_val <= threshold_0) {
gain = 0;
......
......@@ -12,10 +12,10 @@ extern "C" {
Shape of offset constant: x, y, memory cell
*/
__global__ void correct(const {{input_data_dtype}}* data, // shape: memory cell, 1, y, x
const unsigned short* cell_table,
const unsigned short* cell_table,
const unsigned char corr_flags,
const float* offset_map,
{{output_data_dtype}}* output) {
const float* offset_map,
{{output_data_dtype}}* output) {
const size_t X = {{pixels_x}};
const size_t Y = {{pixels_y}};
const size_t memory_cells = {{data_memory_cells}};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment