#filename = 'pic/3D/3D_setup_Delic_det_'+str(round(param.detuning*1e-3))+'kHz_' + str(round(param.X0/1064e-9*1e2)) + '_' + pic
filename = 'pic/test'
###############################################################
if plot_1D_and_3D == True:
    consider_3D = True
    calc_1D = True

# Calculate the needed parameters and print all
param.prepare_calc()
param.print_param()

# optical damping rates
Gamma_opt = param.opt_damp_rate()

# photon numbers at equiv
N = tools.photon_number(param.n_mech, Gamma_opt, param.Gamma)

# the calculated gamma is actually gamma/2
param.Gamma = param.Gamma * 2

# actually the detuning is given as an angular freq
param.detuning = param.detuning * 2 * np.pi

if calc_1D == True:
    # 1D calculations
    SXX_plus = tools.spectrum_output(omega, 0, param, False)
    SXX_minus = tools.spectrum_output(-omega, 0, param, False)
    SYY_plus = tools.spectrum_output(omega, 1, param, False)
    SYY_minus = tools.spectrum_output(-omega, 1, param, False)
    SZZ_plus = tools.spectrum_output(omega, 2, param, False)
    SZZ_minus = tools.spectrum_output(-omega, 2, param, False)
n_z_area = np.zeros(len(pressures))

for i in range(len(pressures)):
    # define pressure
    param.Press = pressures[i]

    param.prepare_calc()

    #param.print_param()

    # optical damping rates
    Gamma_opt = param.opt_damp_rate()

    # photon numbers at equiv
    N = tools.photon_number(param.n_mech,
                            Gamma_opt,
                            param.Gamma,
                            printing=False)

    param.Gamma = param.Gamma * 2  # the calculated gamma is actually gamma/2

    #param = (param.omega_mech, param.detuning, param.g, param.Gamma, param.kappa, param.n_opt, param.n_mech)
    #print_parameter(param)

    # actually the detuning is given as an angular freq
    param.detuning = param.detuning * 2 * np.pi

    #param2 = (param.omega_mech, param.detuning, param.g, param.Gamma, param.kappa, param.n_opt, param.n_mech)
    #print_parameter(param)

    #param.Gamma = param.Gamma*2 # the calculated gamma is actually gamma/2