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

Images flipped N/S #24

Open
ojf opened this issue Jun 24, 2023 · 3 comments
Open

Images flipped N/S #24

ojf opened this issue Jun 24, 2023 · 3 comments

Comments

@ojf
Copy link
Member

ojf commented Jun 24, 2023

E/W is correct. Images display the same between JS9 (in client) and in DS9: flipped N/S

@siyu6974
Copy link
Contributor

Quoting discord discussion below

The reason is the way data is stored vs the data is read. DS9/JS9 always reads and writes data in bottom up fashion, ie. image origin is the bottom left, aka the mathematic way. Evora and most camera drivers nowadays write data in the top down fashion, aka the screen space way where the origin is the top left corner. That means if you open an evora image with ds9, the image is flipped vertically.

there is a fairly recent solution to deal with this incompatibility proposed by some opensource astro photo processing software devs. They advocate the use of a FITS header keywords "ROWORDER" to specify how data was written, so that when openning the image, the software can know it. Above you can see the original evora image on the left, and the image with "top-down" keyword on the top right, and "bottom-up" on the lower right.

ROWORDER is a nice to have but DS9/JS9 doesn't read it. Either we fix the direction when saving or we can incorporate plate solving to add wcs header.

@albireox
Copy link
Contributor

We can add a very simple WCS if we just want to get the orientation roughly right. Just setting the CD matrix to

1 0
0 -1

should make DS9 show the N arrow pointing down.

@siyu6974
Copy link
Contributor

siyu6974 commented Nov 4, 2023

We can add ROWORDER and incorporate plate solving implemented in #28, so the image will be displayed correctly everywhere.

ROWORDER is an easy one line change, however, we need to discuss when do we want to plate solve. Doing it before saving the image adds more latency for our operators waiting for the image.

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

No branches or pull requests

3 participants