Skip to content

Commit

Permalink
fix 2d array issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ceesem committed Jan 30, 2025
1 parent e5c4bef commit f551838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nglui/statebuilder/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def _render_data(self, data, data_resolution, viewer_resolution, viewer):

scaler = _data_scaler(data_resolution, viewer_resolution)
pts = np.vstack(data[col_ctr][relinds]) * scaler
rs = data[col_rad][relinds].values / viewer_resolution[0]
rs = data[col_rad][relinds].values * scaler[0][0]

if viewer_resolution:
z_multiplier = viewer_resolution[1] / viewer_resolution[2]
Expand Down

1 comment on commit f551838

@jasper-tms
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ceesem this changes the behavior. Before this, the radius needed to be specified in nm regardless of the units of the data. I think this changes it so that the radius needs to be specified in the same units as the data. I don't have a strong opinion about which behavior makes more sense (maybe slight preference for radius being in nm regardless of the data units), but this is a (small) breaking change. Should I adapt my code for this new behavior or was this unintentional and you'd like to revert the behavior?

Please sign in to comment.