icecube / skymap_scanner

A distributed system that performs a likelihood scan of event directions for IceCube real-time alerts using CPU cluster(s) and queue-based message passing.
5 stars 2 forks source link

Calculate and save energy losses #45

Closed mlincett closed 2 years ago

mlincett commented 2 years ago

In the current realtime code, get_reco_losses_inside(p_frame, g_frame) is invoked from load_scan_state() to calculate the energy losses and store them in state_dict. This is done every time the result of the scan is accessed from the scan cache.

In the new design this is far from ideal, as the calculation should be performed once and for all right after getting the best LLH for the pixel, storing the result in StateDict. I had noticed in #27 that such a solution is implemented in the cloud_tools version, where however the function is implemented and used as an IceTray module.

We need to add this step in some point of processing, taking into account that both the Physics and Geometry information are required. @ric-evans could you suggest in which part of start_scan.py this could be integrated?

ric-evans commented 2 years ago

how about somewhere in save()? https://github.com/icecube/skymap_scanner/blob/13a277619ce9269f67b53c583b8515c22efa4d3a/skymap_scanner/server/start_scan.py#L546-L577

ric-evans commented 2 years ago

~We would need to pass in Physics and Geometry information~

GCD info is in the state_dict (state_dict["GCDQp_packet"])

mlincett commented 2 years ago

~We would need to pass in Physics and Geometry information~

GCD info is in the state_dict (state_dict["GCDQp_packet"])

Right. Let's see if this works.