icecube.ml_suite.hex module

class icecube.ml_suite.hex.HexDataTransformer(config: (<class 'str'>, <class 'dict'>), name: str, string_axis: int = 1)

Bases: object

Creates a data transformer for converting an input tensor’s string axis to a 2 axes hexagonal grid.

Parameters:
  • config (str or dict) – Path to yaml file or a dictionary containing string_hex_dict transformation definition.

  • name (str) – Transformation name key in the config dictionary.

  • string_axis (int, optional) – The axis which defines the DOM string number in the input tensor x_input.

Returns:

The output tensor which is now transformed to an hexagonal grid. Shape: […, 10, 10, …] with 10, 10 inserted at the specified string_axis.

Return type:

array_like

icecube.ml_suite.hex.convert_string_to_hex_axes(x_input, string_hex_dict, string_axis=1)

Converts an IceCube string axis to 2 hexagonal axes

Parameters:
  • x_input (array_like) – The input tensor. The specified string_axis must correspond to the axis of the input tensor, which specifies the string number. The size of this axis must either be 86 (if DeepCore is still included) or 78 if only the strings of the main IceCube array are provided.

  • string_hex_dict (dict) – Conversion dictionary of string axis to 2 axes hexagonal grid.

  • string_axis (int, optional) – The axis which defines the DOM string number in the input tensor x_input.

Returns:

The output tensor which is now transformed to an hexagonal grid. Shape: […, 10, 10, …] with 10, 10 inserted at the specified string_axis.

Return type:

array_like