Skip to content
Snippets Groups Projects
Commit 396742e1 authored by Marko Mecina's avatar Marko Mecina
Browse files

integrate events in evtmap

parent 8e7b3683
No related branches found
No related tags found
No related merge requests found
...@@ -92,14 +92,15 @@ def mk_ed(data): ...@@ -92,14 +92,15 @@ def mk_ed(data):
# also add an HDU with event map # also add an HDU with event map
nodes = np.zeros((2, 2, NROWS_FT, NCOLS_FT)) nodes = np.zeros((2, 2, NROWS_FT, NCOLS_FT))
nodes[:] = np.nan
for _, _, ccd, col, row, node, fx in bindata: for _, _, ccd, col, row, node, fx in bindata:
try: try:
nodes[ccd, node, row - 2:row + 3, col - 2:col + 3] = fx.reshape(5, 5) nodes[ccd, node, row - 2:row + 3, col - 2:col + 3] += fx.reshape(5, 5)
except: except:
print(col, row, 'FAILED') print(col, row, 'FAILED')
nodes[:] = np.nan
ed_img = _assemble_ft_frames_to_fp_view(nodes) ed_img = _assemble_ft_frames_to_fp_view(nodes)
hdl.append(fits.ImageHDU(data=ed_img, name='EVTMAP')) hdl.append(fits.ImageHDU(data=ed_img, name='EVTMAP'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment