<jupyter_start><jupyter_text>Main sequence<jupyter_code>setting_golem = ht.SettingsGolem(settings_to_override={"endtime":30,"radius":10,'halg':[2,2]})
nature_list,ens_list,emis_list,time_list = ht.run_with_assimilation(setting_golem)
ht.make_emis_postprocess_plot(setting_golem,emis_list,time_list,2,2)
HTML(ht.animate_field(nature_list).to_html5_video())
HTML(ht.animate_field(ens_list).to_html5_video())<jupyter_output><empty_output><jupyter_text>Debugging<jupyter_code>base_emis_field = setting_golem.makeBaseField()
ensfields = setting_golem.makeInitialEnsEmisFields(base_emis_field)
initial_conditions = None
tstart = 0
tend = 10

nature,ensemble,timevals = pt.compute_nature_and_ens(settings_golem=setting_golem,ens_emis_fields = ensfields,initial_conditions = initial_conditions,time_start = tstart, time_end=tend)
freq_obs = setting_golem.getSetting("frequency")
obs_times = np.arange(tstart,tend,freq_obs)

assim = at.Assimilator(setting_golem,nature,ensemble,timevals, obs_times,ensfields)
np.round(assim.obs_op.xinds).astype(int)
assim.obs_op.yinds
analysisScalefactor = np.copy(assim.ens_pert)[:,1::2]
np.shape(analysisScalefactor)
analysis_std = np.std(analysisScalefactor,axis=0)
np.shape(analysis_std)
matchinds,matchindcolfull,matchindcolsubset = assim.getMatchInds(10,15,15)
matchinds[matchinds<900]
np.random.normal(0,0)
import skimage.util as ski

nx_big = 90
ny_big = 10
nx_small = 2
ny_small = 2
X,Y = np.meshgrid(np.arange(nx_big),np.arange(ny_big),indexing='ij')
aggsize_x = int(nx_big/nx_small)
aggsize_y = int(ny_big/ny_small)
xinds = ski.view_as_blocks(X, (aggsize_x,aggsize_y)).mean(axis=(2,3)).flatten()
yinds = ski.view_as_blocks(Y, (aggsize_x,aggsize_y)).mean(axis=(2,3)).flatten()
def AggregateToObsGrid(observed_values):
	return ski.view_as_blocks(observed_values, (aggsize_x,aggsize_y)).mean(axis=(2,3)).flatten()
np.shape(X)
np.arange(nx_big)
xinds
yinds
observed_values = np.arange(900).reshape((90,10))
AggregateToObsGrid(observed_values)
import matplotlib.pyplot as plt
plt.imshow(observed_values)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13178294573643412, 'fraction_numerical': 0.022286821705426358, 'mean_word_length': 11.746913580246913, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '241932', 'license': 'MIT', 'n_tokens_mistral': 879, 'n_tokens_neox': 839, 'n_words': 83, 'path': 'ToyLETKF_playground.ipynb', 'repo_name': 'drewpendergrass/ToyLETKF', 'size': '2064'}