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

Bitmaps are rotated and mirrored? #97

Open
MarleneBusch opened this issue Nov 20, 2024 · 2 comments
Open

Bitmaps are rotated and mirrored? #97

MarleneBusch opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed Urgency: High This issue is a high priority

Comments

@MarleneBusch
Copy link
Collaborator

Describe the bug
The raytracer currently produces bitmaps/tensors that need to be flipped (rotated 180 degrees) and transposed before they can be compared to the calibration images/bitmaps downloaded from PAINT.

To reproduce
Steps to reproduce the behavior:

  1. Go to ARTIST/artist/util/alignment_optimizer.py
  2. In the method optimize_kinematic_parameters_with_raytracing() look at the optimization loop and notice how the bitmap is flipped and transposed before the new center is calculated.
  3. Use matplotlib.pyplot to visualize what is happening.
  4. Compare to the calibration image downloaded from PAINT

Expected behavior
The raytracer should deliver bitmaps that are oriented correctly.

Additional context
You can see how we always transposed the raytraced bitmaps before using them in other tests as well, for example test_integration_stral_data.py.

@mcw92 mcw92 mentioned this issue Dec 3, 2024
10 tasks
@MarleneBusch
Copy link
Collaborator Author

We should talk about this soon. @Filos1992 @mcw92 @kalebphipps

@MarleneBusch MarleneBusch added bug Something isn't working help wanted Extra attention is needed Urgency: High This issue is a high priority labels Dec 6, 2024
@MarleneBusch MarleneBusch added this to the ARTIST Release 1.0 milestone Dec 6, 2024
@MarleneBusch
Copy link
Collaborator Author

@Filos1992 said that they need to be transposed because plt.imshow() defines their coordinate system different than we do. This is therefore only important when we create plots.

This still does not explain why they are upside down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed Urgency: High This issue is a high priority
Projects
None yet
Development

No branches or pull requests

4 participants