Skip to content

Commit 0d25172

Browse files
Jammy2211Jammy2211
authored andcommitted
small changes to transform
1 parent 9da6598 commit 0d25172

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

autoarray/geometry/geometry_util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,17 +374,13 @@ def transform_grid_2d_to_reference_frame(
374374
grid
375375
The 2d grid of (y, x) coordinates which are transformed to a new reference frame.
376376
"""
377-
try:
378-
grid_2d = grid_2d.array
379-
except AttributeError:
380-
pass
381-
382377
shifted_grid_2d = grid_2d - jnp.array(centre)
383378

384379
radius = jnp.sqrt(jnp.sum(jnp.square(shifted_grid_2d), axis=1))
385380
theta_coordinate_to_profile = jnp.arctan2(
386381
shifted_grid_2d[:, 0], shifted_grid_2d[:, 1]
387382
) - jnp.radians(angle)
383+
388384
return jnp.vstack(
389385
[
390386
radius * jnp.sin(theta_coordinate_to_profile),

0 commit comments

Comments
 (0)