Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create stricter tests for jnd2xyz() #258

Merged
merged 9 commits into from
Nov 8, 2024
Merged

Create stricter tests for jnd2xyz() #258

merged 9 commits into from
Nov 8, 2024

Conversation

Bisaloo
Copy link
Collaborator

@Bisaloo Bisaloo commented Jul 11, 2024

The first commit of this PR highlights the fact that distances are not preserved in the 2D case. This happens because we rotate in the 3D space and project back in 2D.

The following commits adjust jndrot() to rotate in the 2D plane for the 2D case, and set default for axis1 and axis2 in accordance with this change.

TODO:

  • update the docs of axis1 and axis2 to follow the changes made here

@Bisaloo Bisaloo requested a review from thomased October 25, 2024 10:18
@Bisaloo Bisaloo marked this pull request as ready for review October 25, 2024 10:21
@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Oct 25, 2024

It seems that there is a separate issue for dichromats, where distances returned by jnd2xyz() do not match the distance one would compute directly on coldist() output.

Since it has a separate cause, I will address it in a follow up PR and I have updated the tests to focus exclusively on the rotation aspect (via jndrot() for now.

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Oct 25, 2024

pkgdown workflow failure is related to r-lib/pkgdown#2802.

Copy link
Collaborator

@thomased thomased left a comment

Choose a reason for hiding this comment

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

Thanks for this — great catch, and it looks spot-on to me. Nothing to suggest in terms of changes, happy to roll this in when you're ready.

@Bisaloo Bisaloo merged commit 6713103 into master Nov 8, 2024
7 checks passed
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