Commit b94dafe5 authored by Philipp Oleynik's avatar Philipp Oleynik
Browse files

Merge remote-tracking branch 'origin/master'

parents bb95df24 662a58c0
/cmake-build-debug/*
/.idea/*
......@@ -115,8 +115,10 @@ def core_energy_to_2048(radiated_energy):
core_cal_offset_low = 169.3 # TODO: It is a magic number. Fitted only, not verified.
h = radiated_energy * core_cal_slope_high + core_cal_offset_high
l = radiated_energy * core_cal_slope_low + core_cal_offset_low
l *= 0.0
x = np.floor(np.fmax(h, l)).astype(int)
adc_11 = np.clip(x, 0, 2047) # - core_instr_offset
adc_11[adc_11 < core_instr_offset] = 0
return adc_11
......
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