compSPI / simSPI

Generative Models
9 stars 10 forks source link

Organize simSPI's notebooks #105

Open ninamiolane opened 2 years ago

ninamiolane commented 2 years ago

What?

Both of these tutorials should be created by reorganizing elements in existing notebooks (see "How" section below).

Note: This task requires using a docker container to run the TEM simulator.

Why?

Current tutorials on these two modules are hard to understand and use for newcomers, because as of now:

The library simSPI can only be useful if users can understand it quickly. This task is urgent and very much needed.

Where?

The 2 new tutorials created by this task should go in the ioSPI/notebooks/ folder and be named:

The 2 new tutorials are created from existing tutorials that can be found at:

The main modules that the 2 new tutorials should explain are:

How?

The new tutorial cryoem_simulation_with_tem_multislice.ipynb should be created by:

The new tutorial cryoem_simulation_with_weak_phase_approximation.ipynb should be created by:

luis-sribeiro commented 2 years ago

Hi @ninamiolane. Should the Projector class be refactored? Right now it is not possible to use it to calculate the projection of an arbitrary volume, instead, by default, the projected volume is assumed to be a cube. And only inside the LinearSimulator class we are able to provide an .mrc file corresponding to the volume, using the init_volume method. It seems more natural to create a Projector object and then use the Projector.forward() method, instead of using LinearSimulator.init_volume() method. What do you think?

ninamiolane commented 2 years ago

@luis-sribeiro thanks for reaching out!

This specific task is a priori not about refactoring the simulators (nor their projectors), it is about re-organizing the contents of the notebooks. Are you saying that a refactoring of Projector is needed for this task?

luis-sribeiro commented 2 years ago

@luis-sribeiro thanks for reaching out!

This specific task is a priori not about refactoring the simulators (nor their projectors), it is about re-organizing the contents of the notebooks. Are you saying that a refactoring of Projector is needed for this task?

Yes, at least for the cryoem_simulation_with_weak_phase_approximation.ipynb notebook, I think it is necessary to refactor Projector. I believe it could flow this way:

ninamiolane commented 2 years ago

Thanks for the details! @bongjinkoo let us know if you encounter the need of Projector refactoring, and if you can follow the steps described by @luis-sribeiro ?

sonyahanson commented 2 years ago

Note that part of this task was accomplished by @bogdantoader tackling issue #107 with PR #119 . There may still be some changes needed to fully comply with the suggestions in this issue, but his notebook micrographs.ipynb explains the use of linear_simulator.