How to run simulations with afterglow models - xcist/documentation GitHub Wiki

One need to specify the following parameters in simulations with afterglow models:

physics.lagCallback = "Detection_Lag"
physics.lag_taus = [1, 6]
physics.lag_alphas = [0.930, 0.069]

Note taus and alphas should be adjusted based on scanner properties.

Another thing is our model has two memories that need to be filled to produce reasonable afterglow effects, instead of a cold start. To do this, we need to add some extra views in simulation, and abandon them in post-processing:

protocol.viewsPerRotation = 984            # total numbers of view per rotation
protocol.viewCount = 1084

This has 100 extra views, and they can be abandoned in post-processing by following python script:

oldprep = xc.rawread('out.prep', [ct.protocol.viewCount, ct.scanner.detectorRowCount, ct.scanner.detectorColCount], 'float')
xc.rawwrite('out.prep', oldprep[100:])