# Path: pyneb/core/diags.py
# class Diagnostics(object):
#     def __init__(self, addAll=False, OmegaInterp='Cheb', NLevels=None):
#     def getDiagFromLabel(self, label):
#     def getDiags(self):
#     def getDiagLabels(self):
#     def getAllDiags(self):
#     def getAllDiagLabels(self):
#     def getUniqueAtoms(self):
#     def addDiag(self, label=None, diag_tuple=None, atom=None, wave_range=None):
#     def addAll(self):
#     def delDiag(self, label=None):
#     def addDiagsFromObs(self, obs):
#         def I(i, j):
#         def L(wave):
#         def B(label):
#         def S(label):
#     def setAtoms(self, atom_dic):
#     def addClabel(self, label, clabel):
#     def plot(self, emis_grids, obs, quad=True, i_obs=None, alpha=0.3, ax=None, error_band=True):
#             def I(i, j):
#             def L(wave):
#             def S(label):
#             def B(label, I=I, L=L):
#                 def I(i, j):
#                 def L(wave):
#                 def S(label):
#                 def B(label):
#                     def E(wave):
#                     def BE(label):
#                     def SE(label):
#     def getCrossTemDen(self, diag_tem, diag_den, value_tem=None, value_den=None, obs=None, i_obs=None,
#                        guess_tem=10000, tol_tem=1., tol_den=1., max_iter=5, maxError=1e-3,
#                        start_tem= -1, end_tem= -1, start_den= -1, end_den= -1, use_ANN=False, limit_res=False, ANN=None):
#             def L(wave):
#             def I(i, j):
#             def B(label, I=I, L=L):
#             def L(wave): 
#             def I(i, j):
#             def B(label, I=I, L=L):
#     def getDiagLimits(self, diag):
#     def eval_diag(self, label):
#         def I(i, j):
#         def L(wave):
#         def B(label):
#         def S(label):
#         X = np.log10(emis_grids[list(emis_grids.keys())[0]].den2D)
#         Y = emis_grids[list(emis_grids.keys())[0]].tem2D
#                         RMS = lambda err: np.sqrt((np.asarray(err) ** 2.).sum())
#                         RMS = lambda err: (np.asarray(err)).sum() 
#                             CS = ax.contourf(X, Y, diag_map, levels=levels, alpha=alpha, colors=col)
#                     CS = ax.contour(X, Y, diag_map, levels=[diag_value], colors=col, linestyles=style)
#                     X = np.array((tem_2D.ravel(), den_2D.ravel())).T
#         HDR = atom.getHighDensRatio(to_eval = to_eval)
#         LDR = atom.getLowDensRatio(to_eval = to_eval)


import matplotlib.pyplot as plt
import pyneb as pn
from pyneb.core.diags import diags_dict
# Plot the contour diagram of the selected diagnostics
# If SAVE, store them in files


def plot_all(save=False):
    pn.log_.level=1
    AA = pn.getAtomDict(OmegaInterp='Linear')
    # Loop over all the diags stored in pn.core.diags.diags_dict
    for diag in diags_dict:

# Path: pyneb/core/diags.py
# class Diagnostics(object):
#     def __init__(self, addAll=False, OmegaInterp='Cheb', NLevels=None):
#     def getDiagFromLabel(self, label):
#     def getDiags(self):
#     def getDiagLabels(self):
#     def getAllDiags(self):
#     def getAllDiagLabels(self):
#     def getUniqueAtoms(self):
#     def addDiag(self, label=None, diag_tuple=None, atom=None, wave_range=None):
#     def addAll(self):
#     def delDiag(self, label=None):
#     def addDiagsFromObs(self, obs):
#         def I(i, j):
#         def L(wave):
#         def B(label):
#         def S(label):
#     def setAtoms(self, atom_dic):
#     def addClabel(self, label, clabel):
#     def plot(self, emis_grids, obs, quad=True, i_obs=None, alpha=0.3, ax=None, error_band=True):
#             def I(i, j):
#             def L(wave):
#             def S(label):
#             def B(label, I=I, L=L):
#                 def I(i, j):
#                 def L(wave):
#                 def S(label):
#                 def B(label):
#                     def E(wave):
#                     def BE(label):
#                     def SE(label):
#     def getCrossTemDen(self, diag_tem, diag_den, value_tem=None, value_den=None, obs=None, i_obs=None,
#                        guess_tem=10000, tol_tem=1., tol_den=1., max_iter=5, maxError=1e-3,
#                        start_tem= -1, end_tem= -1, start_den= -1, end_den= -1, use_ANN=False, limit_res=False, ANN=None):
#             def L(wave):
#             def I(i, j):
#             def B(label, I=I, L=L):
#             def L(wave): 
#             def I(i, j):
#             def B(label, I=I, L=L):
#     def getDiagLimits(self, diag):
#     def eval_diag(self, label):
#         def I(i, j):
#         def L(wave):
#         def B(label):
#         def S(label):
#         X = np.log10(emis_grids[list(emis_grids.keys())[0]].den2D)
#         Y = emis_grids[list(emis_grids.keys())[0]].tem2D
#                         RMS = lambda err: np.sqrt((np.asarray(err) ** 2.).sum())
#                         RMS = lambda err: (np.asarray(err)).sum() 
#                             CS = ax.contourf(X, Y, diag_map, levels=levels, alpha=alpha, colors=col)
#                     CS = ax.contour(X, Y, diag_map, levels=[diag_value], colors=col, linestyles=style)
#                     X = np.array((tem_2D.ravel(), den_2D.ravel())).T
#         HDR = atom.getHighDensRatio(to_eval = to_eval)
#         LDR = atom.getLowDensRatio(to_eval = to_eval)


# Path: pyneb/sample_scripts/plot_all_diags.py
import matplotlib.pyplot as plt
import pyneb as pn
from pyneb.core.diags import diags_dict

# Plot the contour diagram of the selected diagnostics
# If SAVE, store them in files


def plot_all(save=False):
    pn.log_.level=1
    AA = pn.getAtomDict(OmegaInterp='Linear')
    # Loop over all the diags stored in pn.core.diags.diags_dict
    for diag in diags_dict:

        atom, diag_eval, err = diags_dict[diag]