erri = [] angles = [] for angle, fnames in dict_final: for fname in fnames: data = reader.reader(fname) if not data: data = 1e8 dual_norm = np.array(data).astype(np.float64) erri.append(float(dual_norm)) angles.append(int(angle) + 90) data = np.column_stack((angles, erri)) data = data[data[:, 0].argsort()] anchor = setup.find_anchor() solver = checker.rom_checker(fname, '^.*_(.*)rom_.*$') fig, ax = plt.subplots(1, tight_layout=True) if model == 'l-rom' or model == 'l-rom_df': fd = fd.strip("0") plot_params = { 'c': 'k', 'marker': 'o', 'mfc': 'None', 'label': solver + ' with ' + r'$N=' + N + '$ and filter width ' + r'$\delta=$' + str(fd) }
setup.text() print("---------------------------------------------") print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) N = str(sys.argv[2]) print("---------------------------------------------") target_dir = '/dual_norm_sc_fom' setup.checkdir(target_dir) anchor = setup.find_anchor() root = os.getcwd() #'^.*_(.*)rom_.*$' solver = checker.rom_checker(root, '.*/(.*)rom_info') tpath = './dual_norm_sc_fom/' # compute the dual_norm_scaled angle = np.loadtxt(root + '/dual_norm/angle.dat') residual = np.loadtxt(root + '/dual_norm/erri_N' + N + '.dat') fom_norm = np.loadtxt(root + '/fom_norm/fom_norm.dat') print(fom_norm) # find the index associated to the anchor point idx = (np.where(angle == anchor)) print(idx) print(angle[idx]) dual_norm_scaled = residual / fom_norm[idx] plot_params = {