Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--tomogram-mask option during match_template not working #194

Closed
Phaips opened this issue Jun 24, 2024 · 5 comments · Fixed by #210
Closed

--tomogram-mask option during match_template not working #194

Phaips opened this issue Jun 24, 2024 · 5 comments · Fixed by #210

Comments

@Phaips
Copy link

Phaips commented Jun 24, 2024

Hi again,
When I look at my score maps I see peaks inside the area where my tomogram mask should have zero values. I assume this shouldn't be the case if those subvolumes are skipped.

My mask is from Amira and has the right dimensions. However, the pixel size is 1.00. Now I was wondering if the pixel size of the mask needs to match the tomogram?
Or there is another problem at play :)

Thanks a lot!

@sroet
Copy link
Collaborator

sroet commented Jun 24, 2024

Dear @Phaips

First to check:

My mask is from Amira and has the right dimensions.

Do you mean it has the right size in angstrom or in pixels? We need it to be pixels, but I expect our code to fail if the number of pixels isn't identical, at least it should (not sure if it actually does, and this might be the bug you're encountering)

When I look at my score maps I see peaks inside the area where my tomogram mask should have zero values. I assume this shouldn't be the case if those subvolumes are skipped.

Another reason for this behavior might be:
Our current implementation only skips subvolumes where all values are masked (with the --volume-split option), and we won't zero out data in partially masked subvolumes (to not throw away potential useful data we loop over anyway).

During the extract particles step, these particles should be skipped automatically

@Phaips
Copy link
Author

Phaips commented Jun 24, 2024

Hi @sroet,
Thanks for the quick reply! Yes with dimensions I meant pixels, so bin4 I have 1024,1024,512 x,y,z for both my mask and tomogram respectively. Only size per pixel is different (7.84 A/px for the tomo and 1 A/px for the mask) which I guess shouldn't matter?

Our current implementation only skips subvolumes where all values are masked (with the --volume-split option), and we won't zero out data in partially masked subvolumes (to not throw away potential useful data we loop over anyway).

I am not sure I understood correctly but I think this explains the observation! I do use --volume-split 2 2 1 and so this means it will not zero out the data if not one of the entire 4 subvolumes is masked out completely? But it will then skip those without supplying the tomo mask again in the extraction step?
Sorry for my confusion :D

Cheers!

@sroet
Copy link
Collaborator

sroet commented Jun 24, 2024

I am not sure I understood correctly but I think this explains the observation! I do use --volume-split 2 2 1 and so this means it will not zero out the data if not one of the entire 4 subvolumes is masked out completely? But it will then skip those without supplying the tomo mask again in the extraction step?
Sorry for my confusion :D

No worries about the confusion, but you are absolutely correct. With a 2 2 1 split it will only skip a subvolume if one of the 4 subvolumes is completely masked. (This was mainly done to make sure the unmasked results were not altered by supplying a mask). We could set the masked scores to 0 at the last step, but throwing away data at that point felt wasteful.

It should indeed automatically grab the mask from the matching job in the extraction job. If you don't want that you can supply a different mask explicitly to the extraction job

Please let me know if anything is unclear!

@McHaillet
Copy link
Collaborator

Did we need to make a PR for this? Otherwise it would be nice to move to Discussions for public reference

@sroet sroet mentioned this issue Aug 7, 2024
4 tasks
@sroet
Copy link
Collaborator

sroet commented Aug 7, 2024

PR has been made to make sure we error with a reasonable error out if the shape does not overlap.
Moving this to discussions instead

@SBC-Utrecht SBC-Utrecht locked and limited conversation to collaborators Aug 7, 2024
@sroet sroet converted this issue into discussion #211 Aug 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants