Skip to content

Commit

Permalink
Merge pull request #270 from BradyAJohnston/237-type-error-star-import
Browse files Browse the repository at this point in the history
fixes `int * float` casting error
  • Loading branch information
BradyAJohnston authored Jul 16, 2023
2 parents 0282432 + 1727ed9 commit 0b65b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MolecularNodes/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def load_star_file(

xyz = df[['rlnCoordinateX', 'rlnCoordinateY', 'rlnCoordinateZ']].to_numpy()
pixel_size = df['rlnImagePixelSize'].to_numpy().reshape((-1, 1))
xyz *= pixel_size
xyz = xyz * pixel_size
shift_column_names = ['rlnOriginXAngst', 'rlnOriginYAngst', 'rlnOriginZAngst']
if all([col in df.columns for col in shift_column_names]):
shifts_ang = df[shift_column_names].to_numpy()
xyz -= shifts_ang
xyz = xyz - shifts_ang
euler_angles = df[['rlnAngleRot', 'rlnAngleTilt', 'rlnAnglePsi']].to_numpy()
image_id = df['rlnMicrographName'].astype('category').cat.codes.to_numpy()

Expand Down

0 comments on commit 0b65b52

Please sign in to comment.