You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I manually run this code (whithout edge moothing and shell creation) things seem to work:
fromttmask.box_setupimportbox_setupsphere_radius=6# establish our coordinate system and empty maskcoordinates_centered, mask=box_setup(12)
#determine distances of each pixel to the centerdistance_to_center=np.linalg.norm(coordinates_centered, axis=-1)
# set up criteria for which pixels are inside the sphere and modify values to 1.inside_sphere=distance_to_center< (sphere_radius/1)
mask[inside_sphere] =1
but the resulting spherical mask does appear to not be quite centered:
Happy to dig into this myself at some point, but thought I should let you know first.
The text was updated successfully, but these errors were encountered:
Hi @jojoelfe , thanks for this. I hadn't updated the package to fix the sphere bug. Sorry about that - it is done now so the mrc will no longer be blank if you upgrade.
Re. mis-centering, I'm taking a look and hopefully find what I've got wrong. It isn't immediately obvious to me, so bear with me while I figure it out!
Hi @jojoelfe
Have provided the option for the shape to be 'visually' centered. Is this as you had hoped? Happy to make more changes. Will work on providing the option of centering on custom coordinates next.
Cheers,
Miles
Description
Thanks @milesagraham for this awesome tool!
I've tried to generate a spherical mask using this command:
ttmask sphere --sidelength 12 --sphere-diameter 12 --output ../../../mask.mrc
but the resulting mrc was all 0.
When I manually run this code (whithout edge moothing and shell creation) things seem to work:
but the resulting spherical mask does appear to not be quite centered:
Happy to dig into this myself at some point, but thought I should let you know first.
The text was updated successfully, but these errors were encountered: