andreabassi78 / napari-sim-processor

Napari plugin for the reconstruction of Structured Illumination microscopy (SIM) data
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Angle phase variable mixed? #10

Open ranranking opened 2 years ago

ranranking commented 2 years ago

Hey, i am trying to use the processor for analyse my data. It was a small bug comes to my side, when i load the data and check the spectrum, the showing order of the images in means of angle/phase is still correct. But when i want to see the crosscorrelation, the order of the images seems mixed up and the displayed angle changed by different phase image. Can you check the plugin if there are some small parameter wrong?

andreabassi78 commented 2 years ago

Hi @ranranking, thank you for pointing this out. This is a problem that @pptman already mentioned in issue #1. I will fix this at the next release, but I'm putting together some other minor visualization issues. Please let me know if this gives you major problems. In that case I'll try to fix it asap

ranranking commented 2 years ago

Hi it is not a urgent issue. I just want to point it out but it is nice that somebody else already mentioned it

andreabassi78 commented 2 years ago

Just added a new Setting with the carrier idx, its maximum value is set to the number of images in the ixf. Can @pptman please review it? Did I understand well that the ixf.shape[0] is the total number of carrier frequencies?

Just a note for @ranranking: the number of carrier frequencies is not the number of angle in hexsim.

pptman commented 2 years ago

The new UI interface element is useful to show bands. It is a bit slightly confusing in that when looking at 4 angle 3 phase SIM data then you might expect the angle bar to perform this function, including its play button. However with hexSIM data there is of course no angle bar and the new element is indeed needed. I think we need think about this one a bit more, but it works better for now.

Yes, ixf.shape[0] should show the number of carrier frequencies. There is also a hidden variable in the processor classes that stores this, ._nbands , and also ._nsteps for the number of phases. But those are both important to the functioning of the classes and should not be changed (unfortunately Python does not have constants). We could implement getter() methods for them, and ._kr too which we are currently recaculating in the _sim_widget.

andreabassi78 commented 2 years ago

Now that there is a SIM_mode Combo_box we could connect the angle position with the carrier_idx Setting when conventional SIM is used. I would still think about that for a while.

For the number of the carrier frequencies, I read them now in the start_sim_processor method. Anyway, I'm happy to help to transform the mentioned attributes in @property with getter methods.