<commit_before># Filename: physics.py
# pylint: disable=locally-disabled
"""
Cherenkov photon parameters.

"""

import km3io
import numba
import numpy as np
import pandas as pd
import km3pipe as kp

from numba import njit

from .core import Module
from .hardware import Detector
from .dataclasses import Table
from .logger import get_logger
from .constants import SIN_CHERENKOV, TAN_CHERENKOV, V_LIGHT_WATER, C_LIGHT

__author__ = "<NAME>"
__copyright__ = "Copyright 2020, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"

log = get_logger(__name__)

try:
    import numba as nb
except (ImportError, OSError):
    HAVE_NUMBA = False
    jit = lambda f: f
    log.warning("No numba detected, consider `pip install numba` for more speed!")
else:
    try:
        from numba.typed import Dict
    except ImportError:
        log.warning("Please update numba (0.43+) to have dictionary support!")
        HAVE_NUMBA = False
        jit = lambda f: f
    else:
        HAVE_NUMBA = True
        from numba import jit


def cherenkov(calib_hits, track):
    """Compute parameters of Cherenkov photons emitted from a track and hitting a PMT.<commit_msg>remove old numba import<commit_after># Filename: physics.py
# pylint: disable=locally-disabled
"""
Cherenkov photon parameters.

"""

import km3io
import numba
import numpy as np
import pandas as pd
import km3pipe as kp

from numba import njit

from .core import Module
from .hardware import Detector
from .dataclasses import Table
from .logger import get_logger
from .constants import SIN_CHERENKOV, TAN_CHERENKOV, V_LIGHT_WATER, C_LIGHT

__author__ = "<NAME>"
__copyright__ = "Copyright 2020, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"

log = get_logger(__name__)

def cherenkov(calib_hits, track):
    """Compute parameters of Cherenkov photons emitted from a track and hitting a PMT.
{'fraction_non_alphanumeric': 0.0810942843185149, 'fraction_numerical': 0.008304836345872008, 'mean_word_length': 4.305699481865285, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4581354', 'n_tokens_mistral': 701, 'n_tokens_neox': 665, 'n_words': 233}