Skip to content

Commit

Permalink
fixes int * float casting error
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Jul 15, 2023
1 parent 2c49418 commit 1727ed9
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

Check warning on line 62 in MolecularNodes/star.py

View check run for this annotation

Codecov / codecov/patch

MolecularNodes/star.py#L62

Added line #L62 was not covered by tests
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

Check warning on line 66 in MolecularNodes/star.py

View check run for this annotation

Codecov / codecov/patch

MolecularNodes/star.py#L66

Added line #L66 was not covered by tests
euler_angles = df[['rlnAngleRot', 'rlnAngleTilt', 'rlnAnglePsi']].to_numpy()
image_id = df['rlnMicrographName'].astype('category').cat.codes.to_numpy()

Expand Down

0 comments on commit 1727ed9

Please sign in to comment.