import numpy as np
from . import _version
__version__ = _version.get_versions()['version']



HXR_COLORS = ("#000000", "#02004a", "#030069", "#04008f", "#0500b3", "#0700ff")
SXR_COLORS = ("#000000", "#330000", "#520000", "#850000", "#ad0000", "#ff0000")

HXR_AREAS = {
    "GUN" : [2017.911, 2018.712],
    "L0" : [2018.712, 2024.791],
    "DL1_1": [2024.791, 2031.992],
    "DL1_2": [2031.992, 2035.035],
    "L1": [2035.035, 2044.167],
    "BC1": [2044.167, 2059.733],
    "L2": [2059.733, 2410.698],
    "BC2": [2410.698, 2438.400],
    "L3": [2438.400, 3042.005],
    "CLTH_0": [3042.005, 3050.512],
    "CLTH_1": [3050.512, 3058.457],
    "CLTH_2": [3058.457, 3110.961],
    "BSYH_1": [3110.961, 3117.409],
    "BSYH_2": [3117.409, 3224.022],
    "LTUH": [3224.022, 3562.739],
    "UNDH": [3562.739, 3718.483],
    "DMPH_1": [3718.483, 3734.407],
    "DMPH_2": [3734.407, 3765.481]
}

HXR_AREAS = {np.mean(value): key for key, value in HXR_AREAS.items()}

SXR_AREAS = {
    "GUN" : [2017.911, 2017.911],
    "L0" : [2018.712, 2024.791],
    "DL1_1": [2024.791, 2031.992],
    "DL1_2": [2031.992, 2035.035],
    "L1": [2035.035, 2044.167],
    "BC1": [2044.167, 2059.733],
    "L2": [2059.733, 2410.698],
    "BC2": [2410.698, 2438.400],
    "L3": [2438.400, 3042.005],
    "CLTH_0": [3042.005, 3050.512],
    "CLTH_1": [3050.512, 3058.457],
    "CLTS": [3177.650, 3224.022],
    "BSYS": [3224.022, 3565.656],
    "LTUS": [3565.656, 3718.483],
    "UNDS": [3718.483, 3734.407],
    "DMPS_1": [3734.407, 3734.407],
    "DMPS_2": [3734.407, 3765.481]
}

SXR_AREAS = {np.mean(value): key for key, value in SXR_AREAS.items()}
[(31, 'numpy.mean', 'np.mean', True, 'import numpy as np\n'), (53, 'numpy.mean', 'np.mean', True, 'import numpy as np\n')]