Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
add tools for rigid body version
  • Loading branch information
schwabjohannes authored Dec 19, 2024
1 parent 7a97b40 commit 7b3d85a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions dynamight/inverse_deformations/rigid.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def get_rotation_translation(
data_preprocessor,
masked_points,
star_file_data,
body,
half,
):

Expand All @@ -73,11 +74,22 @@ def get_rotation_translation(

for points in masked_points:

proj, pos, dis = decoder.forward(
mu, r.to(device), t.to(device), points.to(device))
# proj, pos, dis = decoder.forward(
# mu, r.to(device), t.to(device), points.to(device))

# proj_all, pos_all, dis_all = decoder.forward(
# mu, r.to(device), t.to(device))
if body != None:
proj, pos, dis = decoder.forward(
mu, r.to(device), t.to(device))
pos = pos[:, decoder.masked_indices[body]]
dis = dis[:, decoder.masked_indices[body]]
points = decoder.model_positions[decoder.masked_indices[body]]

else:
proj, pos, dis = decoder.forward(
mu, r.to(device), t.to(device), points.to(device))

proj_all, pos_all, dis_all = decoder.forward(
mu, r.to(device), t.to(device))
B = pos.movedim(1, 2)
A = points

Expand Down

0 comments on commit 7b3d85a

Please sign in to comment.