"""Dictionaries from Biologic."""

status_codes = {
    0: "Status",
    1: "Ox/Red",
    2: "OCV",
    3: "EIS",
    4: "Technique number",
    5: "Technique code",
    6: "Sequence number",
    7: "Current loop iteration number",
    8: "Current sequence within loop number",
    9: "Loop experiment iteration number",
    10: "Cycle number",
    11: "Counter 1",
    12: "Counter 2",
    13: "Counter 3",
    14: "Buffer size",
    15: "Time (s)",
    16: "Ewe (V)",
    17: "Ece (V)",
    18: "Eoc (V)",
    19: "I (A)",
    20: "Q-Q0 (Ah)",
    21: "Aux1",
    22: "Aux2",
    23: "Irange (A)",
    24: "R compensation (Ohm)",
    25: "Frequency (Hz)",
    26: "|Z| (Ohm)",
    27: "Current point index",
    28: "Total point index",
    29: "T (°C)",
    30: "Safety limit",
    31: "Connection",
}

technique_codes = {
    1: "Pdyn",
    2: "CPol",
    3: "MUIC",
    4: "GCPL",
    5: "PCGA",
    6: "CV",
    7: "PotPit",
    8: "PR",
    9: "PC",
    10: "ZVC",
    11: "OCV",
    12: "GCPL2",
    13: "NPV",
    14: "SPFC",
    15: "RNPV",
    16: "APGC",
    17: "CPT",
    18: "ECN",
    19: "GCPL3",
    20: "DP",
    21: "MG",
    22: "MP",
    23: "CPP",
    24: "CA",
    25: "CP",
    26: "IC",
    27: "Loop",
    28: "WAIT",
    29: "PEIS",
    30: "GEIS",
    31: "CPT2",
    32: "LPR",
    33: "GCPL4",
    34: "DPV",
    35: "CLD",
    36: "CPW",
    37: "GCPL5",
    38: "TO",
    39: "TI",
    40: "SV",
    41: "SOCV",
    42: "SMP",
    43: "SMG",
    44: "SGCPL",
    45: "SPEIS",
    46: "SGEIS",
    47: "SWV",
    48: "EVT",
    49: "CM",
    50: "ZIR",
    51: "CVA",
    52: "DNPV",
    53: "DPA",
    54: "CA",
    55: "OCV",
    56: "CP",
    57: "CV",
    58: "PDYN",
    59: "GDYN",
    60: "PEIS",
    61: "GEIS",
    62: "SPEIS",
    63: "SGEIS",
    64: "PEIS",
    65: "GEIS",
    66: "PDYN",
    67: "GDYN",
    68: "LOOP",
    69: "CV ADV",
    70: "DPV",
    71: "SWV",
    72: "NPV",
    73: "RNPV",
    74: "DNPV",
    75: "DPA",
    76: "EVT",
    77: "LP",
    78: "GC",
    79: "CPP",
    80: "PDP",
    81: "PSP",
    82: "ZRA",
    83: "MIR",
    84: "PZIR",
    85: "GZIR",
    86: "MIR",
    87: "PEISW",
    88: "TI",
    89: "TO",
    90: "TOS",
    91: "LASV",
    92: "ACV",
    93: "VASP",
    94: "MUX",
    95: "CASP",
    96: "CP L",
    97: "GDYN L",
    98: "CA L",
    99: "PDYN L",
    100: "ABS",
    101: "FLUO",
    102: "GPI",
    103: "PPI",
    104: "RPI",
    105: "PWPI",
    106: "LASV",
    107: "CI",
    108: "LSV",
    109: "MUX LP",
    110: "IVC",
    111: "TC",
    112: "RDEC",
    113: "DABS",
    114: "ABS F",
    115: "Pause",
    116: "EDC",
    117: "CstV",
    118: "CstC",
    119: "GCPL6",
    120: "CV_CA",
    121: "CP_CA",
    122: "CA_CA",
    123: "MP",
    124: "CV Lin",
    125: "CASG",
    126: "LASV",
    127: "MB",
    128: "VASP",
    129: "OCV F",
    130: "CA F",
    131: "CP F",
    132: "GCPL7",
    133: "CV Lin",
    134: "STCC",
    135: "RCA",
    136: "BCD",
    137: "CVL",
    138: "EXTAPP",
    139: "EMAIL",
    140: "CS",
    141: "CED",
    142: "EVANS",
    143: "TP",
    144: "BECN",
    145: "Sync",
    146: "RP",
    147: "GalC",
}

technique_descriptions = {
    1: "Potentiodynamic Pitting",
    2: "Cyclic Polarization",
    3: "Measure of U-I Correlation",
    4: "Galvanostatic Cycling with Potential Limitation",
    5: "Potentiodynamic Cycling with Galvanostatic Acceleration",
    6: "Cyclic Voltammetry",
    7: "Potentiostatic Pitting",
    8: "Polarization Resistance",
    9: "Potential Manual Control",
    10: "Zero Voltage Current",
    11: "Open Circuit Voltage",
    12: "Galvanostatic Cycling with Potential Limitation 2",
    13: "Normal Pulse Voltammetry",
    14: "Stepwise Potential Fast Chronoamperometry",
    15: "Reverse Normal Pulse Voltammetry",
    16: "Alternate Pulse Galvano Cycling",
    17: "Critical Pitting Temperature 1",
    18: "Electrochemical Noise (ASTM-G199)",
    19: "Galvanostatic Cycling with Potential Limitation 3",
    20: "Depassivation Potential",
    21: "Modular Galvano",
    22: "Modular Potentio",
    23: "Cyclic Potentiodynamic Polarization (ASTM-G61)",
    24: "Chronoamperometry / Chronocoulometry",
    25: "Chronopotentiometry",
    26: "Current Manual Control",
    27: "Loop",
    28: "Wait",
    29: "Potentio Electrochemical Impedance Spectroscopy",
    30: "Galvano Electrochemical Impedance Spectroscopy",
    31: "Critical Pitting Temperature 2 (ASTM-G150)",
    32: "Linear Polarization Resistance (ASTM-G59)",
    33: "Galvanostatic Cycling with Potential Limitation 4",
    34: "Differential Pulse Voltammetry",
    35: "Constant Load Discharge",
    36: "Constant Power",
    37: "Galvanostatic Cycling with Potential Limitation 5",
    38: "Trigger Out",
    39: "Trigger In",
    40: "Staircase Voltammetry",
    41: "Special Open Circuit Voltage",
    42: "Special Modular Potentio",
    43: "Special Modular Galvano",
    44: "Special Galvanostatic Cycling with Potential Limitation",
    45: "Staircase Potentio Electrochemical Impedance Spectroscopy (Mott-Schottky)",
    46: "Staircase Galvano Electrochemical Impedance Spectroscopy",
    47: "Square Wave Voltammetry",
    48: "Ecorr vs. Time",
    49: "Corrosimetry (Rp vs. Time)",
    50: "IR compensation (PEIS)",
    51: "Cyclic Voltammetry Advanced",
    52: "Differential Normal Pulse Voltammetry",
    53: "Differential Pulse Amperometry",
    54: "Chronoamperometry",
    55: "Open Circuit Voltage",
    56: "Chronopotentiometry",
    57: "Cyclic Voltammetry",
    58: "Potentiodynamic",
    59: "Galvanodynamic",
    60: "Potentio Electrochemical Impedance Spectroscopy",
    61: "Galvano Electrochemical Impedance Spectroscopy",
    62: "Staircase Potentio Electrochemical Impedance Spectroscopy",
    63: "Staircase Galvano Electrochemical Impedance Spectroscopy",
    64: "Potentio Electrochemical Impedance Spectroscopy on Stack",
    65: "Galvano Electrochemical Impedance Spectroscopy on Stack",
    66: "Potentiodynamic on Stack",
    67: "Galvanodynamic on Stack",
    68: "Loop",
    69: "Cyclic Voltammetry Advanced",
    70: "Differential Pulse Voltammetry",
    71: "Square Wave Voltammetry",
    72: "Normal Pulse Voltammetry",
    73: "Reverse Normal Pulse Voltammetry",
    74: "Differential Normal Pulse Voltammetry",
    75: "Differential Pulse Amperometry",
    76: "Ecorr vs. Time",
    77: "Linear Polarization",
    78: "Generalized Corrosion",
    79: "Cyclic Potentiodynamic Polarization",
    80: "Potentiodynamic Pitting",
    81: "Potentiostatic Pitting",
    82: "Zero Resistance Ammeter",
    83: "Manual IR",
    84: "IR Determination with Potentiostatic Impedance",
    85: "IR Determination with Galvanostatic Impedance",
    86: "Manual IR compensation",
    87: "Potentio Electrochemical Impedance Spectroscopy Wait",
    88: "Trigger In",
    89: "Trigger Out",
    90: "Trigger Set",
    91: "Large Amplitude Sinusoidal Voltammetry",
    92: "AC Voltammetry",
    93: "Variable Amplitude Sinusoidal micro Polarization",
    94: "Multiplexer",
    95: "Constant Amplitude Sinusoidal micro Polarization",
    96: "Chronopotentiometry with limits",
    97: "Galvanodynamic with limits",
    98: "Chronoamperometry with limits",
    99: "Potentiodynamic with limits",
    100: "Absorbance",
    101: "Fluorescence",
    102: "Galvano Profile Importation",
    103: "Potentio Profile Importation",
    104: "Resistance Profile Importation",
    105: "Power Profile Importation",
    106: "Large Amplitude Sinusoidal Voltammetry",
    107: "Current Interrupt",
    108: "Linear Sweep Voltammetry",
    109: "Multiplexer Loop",
    110: "I-V Characterization",
    111: "Temperature Control",
    112: "Rotating Disk Electrode Control",
    113: "Dual Absorbance",
    114: "Absorbance/Fluorescence",
    115: "Pause",
    116: "External Device Control",
    117: "Constant Voltage",
    118: "Constant Current",
    119: "Galvanostatic Cycling with Potential Limitation 6",
    120: "Bipotentiostat CV & CA",
    121: "Bipotentiostat CP & CA",
    122: "Bipotentiostat CA & CA",
    123: "Modular Pulse",
    124: "Cyclic Voltammetry Linear",
    125: "Constant Amplitude Sinusoidal Galvanopolarization",
    126: "Constant Amplitude Sinusoidal Polarization",
    127: "Modulo Bat",
    128: "Variable Amplitude Sinusoidal Polarization",
    129: "Fast Open Circuit Voltage",
    130: "Fast Chronoamperometry",
    131: "Fast Chronopotentiometry",
    132: "Galvanostatic Cycling with Potential Limitation 7",
    133: "Cyclic Voltammetry Linear",
    134: "Special Technique ChronoCoulometry",
    135: "Ring Chronoamperometry",
    136: "Battery Capacity Determination",
    137: "Cyclic Voltammetry Linear",
    138: "External Application",
    139: "Send E-Mail",
    140: "Current Scan",
    141: "Coulombic Efficiency Determination",
    142: "Evans diagram",
    143: "Tafel Plot",
    144: "Biased Electrochemical Noise",
    145: "Synchronization",
    146: "Repassivation potential (JIS0592)",
    147: "Galvanic Coupling (ASTM-G71)",
}

status_nested_codes = {
    0: {
        0: "Stop",
        1: "Run",
        2: "Pause",
        3: "Sync",
        4: "Stop_rec1",
        5: "Stop_rec2",
        6: "Pause_rec",
    },
    1: {
        0: "Oxidation",
        1: "Reduction",
    },
    2: {
        0: "OCV",
        1: "Other",
    },
    3: {
        0: "EIS",
        1: "No EIS",
    },
    5: technique_codes,
    30: {
        0: "Ok",
        1: "Emax",
        2: "Emin",
        3: "I",
        4: "Q-Q0",
        7: "Ewe min stack",
        8: "Ece min stack",
        9: "Ewe max stack",
        10: "Ece max stack",
    },
    31: {
        0: "Ok",
        1: "Disconnected",
    },
}
