<jupyter_start><jupyter_text>Load Measurement<jupyter_code>stitched = tifffile.imread('/Users/zfphil/datasets/motiondeblur/stitched_recon_coded163c.tiff')
flat_field_y, flat_field_x = md.estimateBackgroundPolynomial(stitched,downsample=512)
flattened = stitched / flat_field_y / flat_field_x
stitched.dtype
flattened -= yp.min(flattened)
flattened /= yp.max(flattened)
flattened *= 255

flattened = flattened.astype(np.uint8)
tifffile.imsave('stitched_recon_coded163c_flattened.tiff', flattened)
!open .
plt.figure()
plt.imshow()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11627906976744186, 'fraction_numerical': 0.023255813953488372, 'mean_word_length': 8.824561403508772, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '538862', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 245, 'n_tokens_neox': 223, 'n_words': 24, 'path': 'notebooks/test/field_flattening.ipynb', 'repo_name': 'zfphil/htdeblur', 'size': '559'}