odlgroup / odl

Operator Discretization Library https://odlgroup.github.io/odl/
Mozilla Public License 2.0
372 stars 105 forks source link

More phantoms? #143

Closed adler-j closed 8 years ago

adler-j commented 8 years ago

I need input from others here, perhaps @niinimaki and @moosmann? What phantoms do we want available? We currently have a util that creates some phantoms, but what are we missing?

More?

adler-j commented 8 years ago

Added normal shepp-logan phantom.

moosmann commented 8 years ago

It would be good to have:

kohr-h commented 8 years ago

Phantoms with noise. For comparisons it's maybe good to have a fixed noise component such that phantoms do not vary from run to run.

Set the seed in np.random?

Very simple phantom for implementing backends: a small rectangle or cuboid in a quadrant to quickly check the feasibility of the projections data, the direction of rotation, the projection direction, etc

Sounds reasonable.

adler-j commented 8 years ago

Shepp-Logan phantom with a gradient to test TV regularization for staircasing artefacts.

What method would be preferable to do this? Applying a post-smoothing?

Phantoms with noise. For comparisons it's maybe good to have a fixed noise component such that phantoms do not vary from run to run.

Set the seed in np.random?

The seed is global and quite hacky, but sure it works.

My takeaway from the two suggestions above is that we should add **kwargs to the phantoms, like smoothing=0.05 or noise=white. These could in turn be implemented with a backend function that basically wraps numpy. We could perhaps add a seed option to the noise as-well.

Very simple phantom for implementing backends: a small rectangle or cuboid in a quadrant to quickly check the feasibility of the projections data, the direction of rotation, the projection direction, etc

Sure, naming suggestion?

moosmann commented 8 years ago

Shepp-Logan phantom with a gradient to test TV regularization for staircasing artefacts.

What method would be preferable to do this? Applying a post-smoothing?

I think to start with a linear variation of the phantom along one of the axis should do, eg:

shepp_log

adler-j commented 8 years ago

Thats quite specific, how about you simply

>>> X = odl.unifrom_discr([0, 0], [1, 1], [100, 100])
>>> phantom = odl.util.shepp_logan(X)
>>> phantom = phantom.ufunc.multiply(X.points()[:,0])
>>> phantom.show()

result

adler-j commented 8 years ago

Ongoing work, but nothing needed atm, right?

kohr-h commented 8 years ago

Yes, this was the kickoff. We'll simply add more when needed.