<jupyter_start><jupyter_text>The purpose of this notebook is to generate the baseline for `test_sinogram` in the tests module. This test generates a 32x32p sinogram of a single right triangle and a circle with a hole in the center.<jupyter_code>import matplotlib.pyplot as plt
import numpy as np
from xdesign import *
SIZE = 32
phan = XDesignDefault()
sidebyside(phan, SIZE)
plt.show()
theta, h = raster_scan2D(SIZE, SIZE)
prb = Probe(size=1/SIZE)
sino = prb.measure(phan, theta, h)
sino = -np.log(sino)<jupyter_output><empty_output><jupyter_text>Reference GeneratorGenerate two of the exact same sinogram. Save one for `nosetests`. Next, compare the two sinograms using `assert_allclose` to determine the smallest `absolute tolerance` that may be achieved.<jupyter_code>np.save('test_sinogram.npy', sino, allow_pickle=True)
sino = prb.measure(phan, theta, h)
sino = -np.log(sino)
sino_reference = np.load('test_sinogram.npy')
plt.figure()
plt.imshow(sino, cmap='inferno', interpolation='nearest')
plt.figure()
plt.imshow(sino-sino_reference, cmap='inferno', interpolation='nearest')
plt.colorbar()
plt.show()

np.testing.assert_equal(sino, sino_reference)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11129848229342328, 'fraction_numerical': 0.006745362563237774, 'mean_word_length': 6.758169934640523, 'pattern_counts': {'":': 0, '<': 9, '<?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': '604886', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 428, 'n_tokens_neox': 403, 'n_words': 115, 'path': 'tests/test_sinogram.ipynb', 'repo_name': 'carterbox/xdesign', 'size': '1186'}