Example #1
0
def test_read_csv_file():
    pat_id, results = read_csv_file(SIN_CSV_FILE)
    assert pat_id == "00000 - ANONYMOUS, PATIENT"
    num_projections = len(results)
    assert num_projections == 464
    num_leaves = len(results[0])
    assert num_leaves == 64
Example #2
0
def test_find_modulation_factor():
    sinogram = read_csv_file(SIN_CSV_FILE)[-1]
    assert np.isclose(find_modulation_factor(sinogram), 2.762391)
Example #3
0
def test_make_histogram():
    sinogram = read_csv_file(SIN_CSV_FILE)[-1]
    assert np.allclose(make_histogram(sinogram)[0][0], [0.0, 0.1])
    assert make_histogram(sinogram)[0][1] == 25894