SBC-Utrecht / PyTomPrivate

Development repository
GNU General Public License v2.0
2 stars 2 forks source link

deconv incorrect size compared to reconstruction #53

Closed McHaillet closed 2 years ago

McHaillet commented 3 years ago

The deconv.py script in branch deconv (inspired by tom_deconv.m) is not functioning for tomograms with uneven x, y size. For an input tomogram of shape (1856, 1920, 520), the program failed because the filter had shape (1920, 1856, 520).

Issue is likely in np.meshgrid() in the creating a CTF. meshgrid() switches x and y position.

gijsschot commented 3 years ago

the cause is exactly that. meshgrid switches x and y Gijs

On Tue, Sep 14, 2021 at 5:14 PM Marten @.***> wrote:

The deconv.py script in branch deconv (inspired by tom_deconv.m) is not functioning for tomograms with uneven x, y size. For an input tomogram of shape (1856, 1920, 520), the program failed because the filter had shape (1920, 1856, 520).

Issue is likely in np.meshgrid() in the creating a CTF. meshgrid() switches x and y position.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FridoF/PyTomPrivate/issues/53, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG2BBK2IPP7T4Y6NS4QZZTUB5RE3ANCNFSM5EAMSH3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

McHaillet commented 3 years ago

Good, thanks for the feedback! I just listed it as an issue for myself to work on. Sort of to-do list, but then everyone can see it.

McHaillet commented 3 years ago

I just found the solution to this. Apparently meshgrid has the option to specify indexing order. Just found out when searching. When setting to indexing='ij' it gives the to me more intuitive result.

McHaillet commented 2 years ago

This has been fixed