Esempio n. 1
0
def test_loptimal_att():
    """ Test L-optimal optimization method for ATT """
    params = opt.ASLParams(f=50.0 / 6000)
    att_dist = opt.ATTDist(0.2, 2.1, 0.001, 0.3)
    scan = opt.ASLScan('var_multi_pCASL', duration=300, npld=6, readout=0.5)
    lims = opt.Limits(0.1, 3.0, 0.025)
    optimizer = opt.LOptimal([[0, 0], [0, 1]], params, scan, att_dist, lims)

    output = optimizer.optimize()
    assert np.allclose(output.plds, [0.1, 0.475, 0.7, 1.025, 1.725, 2.1])
Esempio n. 2
0
def test_loptimal_cbf_multislice():
    """ Test L-optimal optimization method for CBF with 2D readout """
    params = opt.ASLParams(f=50.0 / 6000)
    att_dist = opt.ATTDist(0.2, 2.1, 0.001, 0.3)
    scan = opt.ASLScan('var_multi_pCASL',
                       duration=300,
                       npld=6,
                       readout=0.5,
                       nslices=10,
                       slicedt=0.0452)
    lims = opt.Limits(0.1, 3.0, 0.025)
    optimizer = opt.LOptimal([[1, 0], [0, 0]], params, scan, att_dist, lims)

    output = optimizer.optimize()
    assert np.allclose(output.plds, [0.1, 1.025, 1.625, 1.8, 1.95, 2.1])