<commit_before><commit_msg>Move things to new units module<commit_after>"""Various units-related things
"""

from pint import (UnitRegistry, Context)
ureg = UnitRegistry()
ureg.define("micro- = 1e-6 = µ-")

# aid conversion between different radiance units
sp2 = Context("radiance")
sp2.add_transformation(
    "[length] * [mass] / [time] ** 3",
    "[mass] / [time] ** 2",
    lambda ureg, x: x / ureg.speed_of_light)
sp2.add_transformation(
    "[mass] / [time] ** 2",
    "[length] * [mass] / [time] ** 3",
    lambda ureg, x: x * ureg.speed_of_light)
ureg.add_context(sp2)

radiance_units = {
    "si": ureg.W/(ureg.m**2*ureg.sr*ureg.Hz),
    "ir": ureg.mW/(ureg.m**2*ureg.sr*(1/ureg.cm))}
{'fraction_non_alphanumeric': 0.1919191919191919, 'fraction_numerical': 0.01875901875901876, 'mean_word_length': 3.9928057553956835, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1630751', 'n_tokens_mistral': 280, 'n_tokens_neox': 271, 'n_words': 58}