Skip to content

Commit

Permalink
test runtime for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuen committed Sep 6, 2020
1 parent f28d579 commit 033d7e4
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions ic3_data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,47 +318,47 @@ def _fill_dnn_container(self, om_key, bin_values_list, bin_indices_list,

# Add bin values and indices if non-empty
if bin_values_list:
# self._container.bin_values[om_key] = bin_values_list
# self._container.bin_indices[om_key] = bin_indices_list

# if self._is_str_dom_format:
# self._container.x_dom[self._batch_index,
# string - 1, dom - 1, index] = value
# else:
# if string > 78:
# # deep core
# self._container.x_deepcore[
# self._batch_index, string - 78 - 1, dom - 1,
# bin_indices_list] = bin_values_list
# else:
# # IC78
# a, b = detector.string_hex_coord_dict[string]
# # Center of Detector is a,b = 0,0
# # a goes from -4 to 5
# # b goes from -5 to 4
# self._container.x_ic78[
# self._batch_index, a + 4, b + 5, dom - 1,
# bin_indices_list] = bin_values_list

for value, index in zip(bin_values_list, bin_indices_list):
if self._is_str_dom_format:
self._container.x_dom[self._batch_index,
string - 1, dom - 1, index] = value
self._container.bin_values[om_key] = bin_values_list
self._container.bin_indices[om_key] = bin_indices_list

if self._is_str_dom_format:
self._container.x_dom[self._batch_index,
string - 1, dom - 1, index] = value
else:
if string > 78:
# deep core
self._container.x_deepcore[
self._batch_index, string - 78 - 1, dom - 1,
bin_indices_list] = bin_values_list
else:
if string > 78:
# deep core
self._container.x_deepcore[self._batch_index,
string - 78 - 1, dom - 1,
index] = value
else:
# IC78
a, b = detector.string_hex_coord_dict[string]
# Center of Detector is a,b = 0,0
# a goes from -4 to 5
# b goes from -5 to 4
self._container.x_ic78[self._batch_index,
a + 4, b + 5, dom - 1,
index] = value
# IC78
a, b = detector.string_hex_coord_dict[string]
# Center of Detector is a,b = 0,0
# a goes from -4 to 5
# b goes from -5 to 4
self._container.x_ic78[
self._batch_index, a + 4, b + 5, dom - 1,
bin_indices_list] = bin_values_list

# for value, index in zip(bin_values_list, bin_indices_list):
# if self._is_str_dom_format:
# self._container.x_dom[self._batch_index,
# string - 1, dom - 1, index] = value
# else:
# if string > 78:
# # deep core
# self._container.x_deepcore[self._batch_index,
# string - 78 - 1, dom - 1,
# index] = value
# else:
# # IC78
# a, b = detector.string_hex_coord_dict[string]
# # Center of Detector is a,b = 0,0
# # a goes from -4 to 5
# # b goes from -5 to 4
# self._container.x_ic78[self._batch_index,
# a + 4, b + 5, dom - 1,
# index] = value

# Add bin exclusions if non-empty
if bin_exclusions_list:
Expand Down

0 comments on commit 033d7e4

Please sign in to comment.