NuMRI/kalman/other/batch_gen_measurements.py

138 lines
6.8 KiB
Python
Executable File

from common import inout
from gen_measurements_from_checkpoints import generate, copy_inputfile
path_chan2d = './projects/DA_testbench/input/channel2d/measurements/'
inputfiles_chan2d = [
# 'chan2d_CT_Rtop0.9_slip0.332_no-pen_h0.05_noise0.yaml',
# 'chan2d_CT_Rtop0.9_slip0.332_no-pen_h0.05_noise6.5.yaml',
# # # 'chan2d_CT_Rtop0.9_slip0.332_no-pen_dt0.001_h0.05_noise0.yaml',
# # # 'chan2d_CT_Rtop0.9_slip0.332_no-pen_dt0.001_h0.05_noise6.5.yaml',
# 'chan2d_CT_Rtop0.9_slip0.332_trans3600_h0.05_noise0.yaml',
'chan2d_CT_Rtop0.9_slip0.332_trans3600_h0.05_noise6.5.yaml',
# 'chan2d_CT_R1_no-slip_h0.05_noise0.yaml',
# 'chan2d_CT_R1_no-slip_h0.05_noise6.5.yaml',
# # 'chan2d_CT_R1_no-slip_steady_h0.05_noise0.yaml',
# # 'chan2d_CT_R1_no-slip_steady_h0.05_noise6.5.yaml',
# 'chan2d_mono_Rtop0.9_slip0.332_no-pen_h0.05_noise0.yaml',
# 'chan2d_mono_Rtop0.9_slip0.332_no-pen_h0.05_noise6.5.yaml',
# # 'chan2d_mono_Rtop0.9_slip0.332_no-pen_dt0.001_h0.05_noise0.yaml',
# # 'chan2d_mono_Rtop0.9_slip0.332_no-pen_dt0.001_h0.05_noise6.5.yaml',
# 'chan2d_mono_Rtop0.9_slip0.332_trans3600_h0.05_noise0.yaml',
# 'chan2d_mono_Rtop0.9_slip0.332_trans3600_h0.05_noise6.5.yaml',
# 'chan2d_mono_R1_no-slip_h0.05_noise0.yaml',
# 'chan2d_mono_R1_no-slip_h0.05_noise6.5.yaml',
# # 'chan2d_mono_R1_no-slip_steady_h0.05_noise0.yaml',
# # 'chan2d_mono_R1_no-slip_steady_h0.05_noise6.5.yaml',
# #
# # 'chan2d_CT_Rtop0.9_slip0.332_no-pen_h0.05_state_noise0.yaml',
]
path_coa2d = './projects/DA_testbench/input/coa2d/measurements/'
inputfiles_coa2d = [
# CT H=h, DT=dt
# 'coa2d_CT_d0.1_slip0.001_trans1000_h0.025_supg_noise0.yaml',
# 'coa2d_CT_d0.1_slip0.332_trans3600_h0.025_supg_noise0.yaml',
# 'coa2d_CT_d0.1_slip0.001_trans1000_h0.025_supg_noise10.yaml',
# 'coa2d_CT_d0.1_slip0.332_trans3600_h0.025_supg_noise10.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_noise10.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_noise0.yaml',
# MONO
# 'coa2d/coa2d_mono_d0.1_slip0.001_trans1000_h0.025_supg.yaml',
# 'coa2d/coa2d_mono_d0.1_slip0.332_trans3600_h0.025_supg.yaml',
# 'coa2d/coa2d_mono_d0_noslip_h0.025_supg.yaml',
# H, DT var
# 'coa2d_CT_d0_noslip_h0.025_supg_d0.1_H0.1.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_DT0.01_H0.025.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_DT0.02_H0.025.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_DT0.02_H0.1.yaml',
# PLUG FLOW
# 'coa2d_CT_d0_noslip_h0.025_supg_plug_d0_H0.1.yaml',
'coa2d_CT_d0_noslip_h0.025_supg_plug_d0.1_H0.1.yaml',
# 'coa2d_CT_d0_noslip_h0.025_supg_plug_d0.2_H0.2.yaml',
]
path_pipe3d = './projects/DA_testbench/input/pipe3d/measurements/'
inputfiles_pipe3d = [
'pipe3d_CT_R0.9_slip0.332_trans3600_h0.05_noise0.yaml',
'pipe3d_CT_R0.9_slip0.332_trans3600_h0.05_noise10.yaml',
'pipe3d_CT_R0.9_slip0.332_trans3600_h0.1_noise0.yaml',
'pipe3d_CT_R0.9_slip0.332_trans3600_h0.1_noise10.yaml',
'pipe3d_CT_R1_noslip_h0.1_noise10.yaml',
'pipe3d_CT_R1_noslip_h0.05_noise10.yaml',
]
path_coa3d = './projects/DA_testbench/input/coa3d/measurements/'
inputfiles_coa3d = [
# 'coa3d_CT_R0.9_slip0.001_trans1000_h0.025_noise0.yaml',
# 'coa3d_CT_R0.9_slip0.001_trans1000_h0.025_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_noise0.yaml',
# 'coa3d_CT_R1_noslip_h0.025_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.1_DT0.001_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.1_DT0.01_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.1_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.025_DT0.01_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.025_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_h0.025_H0.025_DT0.02_noise10.yaml',
# 'coa3d_asym_CT_R1_noslip_h0.025_H0.1_DT0.02_noise10.yaml',
# 'coa3d_asym_CT_R1_noslip_h0.025_H0.2_DT0.02_noise10.yaml',
# 'coa3d_bend_CT_R1_noslip_h0.025_H0.1_DT0.02_noise10.yaml',
# 'coa3d_bend_CT_R1_noslip_h0.025_H0.2_DT0.02_noise10.yaml',
# PLUG FLOW
# 'coa3d_bend_CT_R1_noslip_plug_h0.025_d0_H0.1_DT0.02_noise10.yaml',
# 'coa3d_bend_CT_R1_noslip_plug_h0.025_H0.1_DT0.02_noise10.yaml',
# 'coa3d_bend_CT_R1_noslip_plug_h0.025_H0.2_DT0.02_noise10.yaml',
# slices
# 'coa3d_CT_R1_noslip_plug_h0.025_H0.1_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_H0.2_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_slices_isZY_H0.1_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_slices_Z_P0_H0.1_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_slices_Z_P0_H0.2_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_slices_isZY_P0_H0.1_DT0.02_noise10.yaml',
# 'coa3d_CT_R1_noslip_plug_h0.025_slices_isZY_H0.2_DT0.02_noise10.yaml'
# 'coa3d_bend_f0.3_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise48.yaml',
# 'coa3d_bend_f0.3_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise0.yaml',
# 'coa3d_bend_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise48.yaml',
# 'coa3d_bend_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise0.yaml',
# 'coa3d_bend_f0.0_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise0.yaml', # <------ compute these!
# 'coa3d_bend_f0.0_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise48.yaml',
# 'coa3d_bend_f0.5_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise0.yaml',
# 'coa3d_bend_f0.5_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise48.yaml',
# 'coa3d_bend_f0.5_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise10.yaml',
# 'coa3d_bend_f0.4_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noise0.yaml',
# 'coa3d_bend_f0.4_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
# 'coa3d_bend_f0.5_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
# 'coa3d_bend_f0.6_CT_R1_noslip_plug_h0.025_slices_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
'coa3d_bend_f0.4_CT_R1_noslip_plug_h0.025_slices_par_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
'coa3d_bend_f0.5_CT_R1_noslip_plug_h0.025_slices_par_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
'coa3d_bend_f0.6_CT_R1_noslip_plug_h0.025_slices_par_P0_H0.1-0.2_DT0.02_noiseVENC.yaml',
]
seed = range(11, 51)
# seed = 2
path = path_coa3d
inputfiles = inputfiles_coa3d
#
if isinstance(seed, range):
seed = list(seed)
elif isinstance(seed, int):
seed = [seed]
assert isinstance(seed, list), ('type(seed) must be list, but is {}'.
format(type(seed)))
for inpfile in inputfiles:
try:
options = inout.read_parameters(path + inpfile)
except IOError:
raise IOError('File could not be read: {}'.format(path + inpfile))
generate(options, seed, False)
copy_inputfile(options, path + inpfile, seed)