Skip to content

remove useless if-else-loop#161

Merged
emiddell merged 2 commits into
devfrom
tiny-fix2
May 6, 2026
Merged

remove useless if-else-loop#161
emiddell merged 2 commits into
devfrom
tiny-fix2

Conversation

@harmening
Copy link
Copy Markdown
Contributor

@emiddell
Copy link
Copy Markdown
Contributor

emiddell commented May 6, 2026

Thanks for catching this, @harmening!

The idea was to make scale_to_landmarks work irrespectively if the user passes a head model in voxel or scanner space:

rec = cedalion.data.get_fingertappingDOT()

head_ijk = cedalion.dot.get_standard_headmodel("colin27")
head_ras = head_ijk.apply_transform(head_ijk.t_ijk2ras)

head_scaled_1 = head_ijk.scale_to_landmarks(rec.geo3d)
head_scaled_2 = head_ras.scale_to_landmarks(rec.geo3d)

assert_allclose(head_scaled_1.brain.vertices.data, head_scaled_2.brain.vertices.data)

But the code did not do that :)

@emiddell emiddell merged commit 0a41c24 into dev May 6, 2026
4 checks passed
@emiddell emiddell deleted the tiny-fix2 branch May 6, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants