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

New functions are introduced for bowtie

parent f5e0d552
......@@ -4,6 +4,7 @@ import scipy.special as scs
import socket
import scipy.constants as const
import math
# import fitsio
# from fitsio import FITS, FITSHDR
......@@ -108,8 +109,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