Comments (7)
Apparently this is a general problem, not realted to stacking only.
from blik.
I'm bashing my head against the wall on this one, very frustrating
I ran the following to test outside of peepingtom and it seems like the matrices calculated aren't correct
This goes against the observation that we get correct reconstructions from both dynamo and relion with these eulers
import napari
import numpy as np
import starfile
from eulerangles import euler2matrix
star = starfile.read('example_data/HIV_15apx.star')
# get dataframes individually
dfs = [df for name, df in star.groupby('rlnMicrographName')]
# get first dataframe
df0 = dfs[0]
# get xyz
xyz = df0[['rlnCoordinateX', 'rlnCoordinateY', 'rlnCoordinateZ']].to_numpy()
# get euler angles
eulers = df0[['rlnAngleRot', 'rlnAngleTilt', 'rlnAnglePsi']].to_numpy()
# get rotation matrices
matrices = euler2matrix(eulers, axes='zyz', intrinsic=True, positive_ccw=True)
# Apply rotation matrices on unit vector in z
rotated_unit_z = matrices @ np.array([0, 0, 1]).reshape(3, 1)
# add rotated unit z to xyz for depiction
xyz_z_shifted = xyz + rotated_unit_z.reshape(-1, 3) * 5
# visualise
viewer = napari.Viewer()
with napari.gui_qt():
viewer.add_points(xyz, face_color='blue', size=5)
viewer.add_points(xyz_z_shifted, face_color='orange', size=5)
from blik.
Inverting the matrix gives the correct depiction but this goes against my understanding of the RELION euler angle convention
from blik.
Understood and on it, will PR to #34 with tidier versions of the fixes
from blik.
from blik.
🎉 🎉 🎉
from blik.
Closed by #34.
from blik.
Related Issues (20)
- Convert meshblock to a multiblock HOT 1
- Clean up non-visualization code
- Import times are SLOW HOT 3
- Documentation
- Use dask HOT 5
- failed reading of star file HOT 1
- Images HOT 3
- Dependency issues HOT 2
- Failed to load mrc HOT 9
- saving files should add extension if needed
- saving star file does not save pixel size correctly HOT 1
- issue with star file reading? HOT 7
- reducing coordinate opacity makes black dots on the image layer HOT 12
- Generating the same particle twice overrides the existing layer but with broken orientations HOT 2
- Minor issue: expected MRC file extension HOT 1
- Suggestion: show tomograms in the same orientation as IMOD HOT 3
- out of slice fading of point and orientation layer HOT 2
- colouring points by data attribute HOT 4
- install error using Napari GUI HOT 7
- gaussian filter has no "Run" button HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blik.