Commit 5a16ae03 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Add nan value handling in flatfield.cu

parent 1202eb28
......@@ -65,5 +65,11 @@ __global__ void flatfield_normalization(
#error "N_DARKS > 1 is not supported yet"
#endif
radios[pos] = (radios[pos] - dark_val) / (flat_val - dark_val);
float val = (radios[pos] - dark_val) / (flat_val - dark_val);;
#ifdef NAN_VALUE
if (flat_val == dark_val) val = NAN_VALUE;
#endif
radios[pos] = val
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment