Open MJLagerwerf opened 6 years ago
AFAIK there's no "built-in" way to do it, but to me the dyn_space
approach seems more correct in the sense that it allows you to also define time steps that are not 1, and to use all the machinery that exists in ODL, e.g. with regard to derivatives as you write above.
However, to make that scenario more user-friendly, there should likely be a conversion utility from spaces like rn((2, 3))
to rn(3) ** 2
, since some operators should use the first representation, some the second.
I created a gist that implements a basic version of these conversions. Depending on your use case, you might want to wrap them into operators as well. Note that some some results are not as in the docstrings due to a bug in the handling of powers like rn(4) ** (2, 3)
, but that doesn't matter for your case.
And btw, for simplicity you might want to add the time dimension as first one, not last one.
How would you implement a 2D parallel beam CT dynamic process with time derivatives?
My first idea was just using the diagonal operator. This makes the forward operator easy to implement, but this means that the reconstructed object is an element of a product space. In which case you cannot easily define the partial time derivative.
To make sure you can get the partial time derivative, you could define a dynamic space:
However, the forward operator
K
does not accept elements ofdyn_space
.Is there example code for dynamic processes? If not, how would this best be handled?