Skip to content

Commit

Permalink
Fix problem with masked charge arrays and update camera angle
Browse files Browse the repository at this point in the history
  • Loading branch information
marjoleinvannuland committed Jun 10, 2024
1 parent e628be7 commit 22bffbf
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions event_display/interactive_event_display/display_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,21 @@ def create_3d_figure(minerva_data, data, evid):
except:
print("Cannot process this file type")
prompthits_segs = None
# Draw the TPC
tpc_center, anodes, cathodes = draw_tpc(sim_version)
light_detectors = draw_light_detectors(data, evid, sim_version)

fig.add_traces(tpc_center)
fig.add_traces(anodes)
fig.add_traces(cathodes)
fig.add_traces(light_detectors)

fig.update_layout(plot_bgcolor='white', scene=dict(camera=dict(up=dict(x=0, y=1, z=0), eye=dict(x=-1.25, y=1.1, z=-1.00))))

# Plot the prompt hits
if prompthits_ev['x'].mask[0][0]:
print("No hits found for this event")
return fig, sim_version
prompthits_traces = go.Scatter3d(
x=prompthits_ev.data["x"].flatten(),
y=(prompthits_ev.data["y"].flatten()),
Expand Down Expand Up @@ -216,17 +229,6 @@ def create_3d_figure(minerva_data, data, evid):
)
fig.add_traces(segs_traces)

# Draw the TPC
tpc_center, anodes, cathodes = draw_tpc(sim_version)
light_detectors = draw_light_detectors(data, evid, sim_version)

fig.add_traces(tpc_center)
fig.add_traces(anodes)
fig.add_traces(cathodes)
fig.add_traces(light_detectors)

fig.update_layout(plot_bgcolor='white', scene=dict(camera=dict(up=dict(x=0, y=1, z=0), eye=dict(x=-1.25, y=1.25, z=1.25))))

return fig, sim_version


Expand Down

0 comments on commit 22bffbf

Please sign in to comment.