Vrg = -0.50
Vcg = 0.00
Vtg = -0.50

simulation_name = "Combined_Model"
save_path = r"/Users/gkoolstra/Desktop/Electron optimization/Realistic potential/Combined Model"
sub_dir = time.strftime("%y%m%d_%H%M%S_{}".format(simulation_name))
save = False

# Evaluate all files in the following range.
xeval = np.linspace(-5.0, 12.5, 501)
yeval = anneal.construct_symmetric_y(-5.0, 151)

master_path = r"/Volumes/slab/Gerwin/Electron on helium/Maxwell/M018 Yggdrasil/Greater Trap Area/V1"
#master_path = r"/Users/gkoolstra/Desktop/Electron optimization/Realistic potential/Potentials/V6 - Greater Trap Area"
x_eval, y_eval, output = anneal.load_data(master_path, xeval=xeval, yeval=yeval, mirror_y=True,
                                          extend_resonator=True, do_plot=False)
# Note: x_eval and y_eval are 2D arrays that contain the x and y coordinates at which the potentials are evaluated

# Use resonator potential to solve for equilibrium position of resonator electrons
U_resonator = -Vres * output[0]['V'][-1, :]

# Solve resonator potential
RS = anneal.ResonatorSolver(y_eval[:, -1], U_resonator, efield_data=None,
                            box_length=resonator_box_length, spline_order_x=3, smoothing=smoothing)

res_initial_condition = anneal.setup_initial_condition(N_resonator_electrons,
                                                       (-1.5E-6, 1.5E-6),
                                                       (-0.75 * resonator_box_length / 2.,
                                                        +0.75 * resonator_box_length / 2.),
                                                        0E-6, 0E-6)
Ejemplo n.º 2
0
# Evaluate all files in the following range.
xeval = np.linspace(-4.0, box_length*1E6, 751)
yeval = anneal.construct_symmetric_y(-4.0, 201)

dx = np.diff(xeval)[0]*1E-6
dy = np.diff(yeval)[0]*1E-6

if platform.system() == 'Windows':
    master_path = r"S:\Gerwin\Electron on helium\Maxwell\M018 Yggdrasil\M018V6\V6.2"
elif platform.system() == 'Linux':
    master_path = r"/mnt/slab/Gerwin/Electron on helium/Maxwell/M018 Yggdrasil/M018V6/V6.2"
else:
    master_path = r"/Users/gkoolstra/Desktop/Single electron loading/Potentials/M018V6/V6.2"

x_eval, y_eval, output = anneal.load_data(master_path, xeval=xeval, yeval=yeval, mirror_y=True,
                                          extend_resonator=False, insert_resonator=True, do_plot=inspect_potentials,
                                          inserted_res_length=inserted_res_length, smoothen_xy=(0.40E-6, 2*dy))

if inspect_potentials:
    plt.show()

# Note: x_eval and y_eval are 2D arrays that contain the x and y coordinates at which the potentials are evaluated
conv_mon_save_path = os.path.join(save_path, sub_dir, "Figures")

if save:
    # Create the directories
    os.mkdir(os.path.join(save_path, sub_dir))
    time.sleep(1)
    os.mkdir(os.path.join(save_path, sub_dir, "Figures"))
    time.sleep(1)
    os.mkdir(os.path.join(save_path, sub_dir, "2D slice"))