Skip to content

Commit

Permalink
fix wrong argument ordering messing up particle IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
brisvag committed Dec 1, 2023
1 parent 7c69ed3 commit 28f8b5e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/blik/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,22 @@ def construct_particle_layer_tuples(

# divide by scale top keep constant size. TODO: remove after vispy 0.12 which fixes this
pos = _construct_positions_layer(
coords, features, scale, exp_id, p_id, source, **pt_kwargs
coords=coords,
features=features,
scale=scale,
exp_id=exp_id,
p_id=p_id,
source=source,
**pt_kwargs,
)
ori = _construct_orientations_layer(
coords=coords,
features=features,
scale=scale,
exp_id=exp_id,
p_id=p_id,
source=source,
)
ori = _construct_orientations_layer(coords, features, scale, exp_id, p_id, source)

# ori should be last, or the auto-update feedback loop messes up the orientations
# when existing layers are updated from a new run
Expand Down Expand Up @@ -137,7 +150,11 @@ def read_particles(particles):
features["orientation"] = np.asarray(particles.orientation, dtype=object)

return construct_particle_layer_tuples(
coords, features, px_size, particles.experiment_id, particles.source
coords=coords,
features=features,
scale=px_size,
exp_id=particles.experiment_id,
source=particles.source,
)


Expand Down

0 comments on commit 28f8b5e

Please sign in to comment.