Various bugfixes with non-square pixel maps.#1
Various bugfixes with non-square pixel maps.#1cyphar wants to merge 3 commits intoKeplerGO:masterfrom cyphar:fix-elongated-pixelmaps
Conversation
Previously, if you had a FITS file with a non-square array (such as 204367097-c02), the pixels will be squashed to an elongated rectangle. This patch fixes it by passing in the height and width of the figure in the right order. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This patchset ensures that the annotations will not overlap by scaling up the figure size so that the figure will always be big enough to fit the annotation (plus some padding). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
Actually, I also just realised that 65c550b fixes another bug where certain FITS files will fail to be rendered as a movie because the default |
|
Hi @cyphar -- many thanks for looking into these issues. I fetched the pull request and tried e.g. but unfortunately this gives me a 337x22894 animated gif, which doesn't look quite right. I'll look more into this tomorrow to understand what's happening! |
|
@barentsen If you look at it with the code on |
|
@barentsen Have you taken another look at it? The current code is flat-out broken for non-square pixel maps, and also the code doesn't handle very thin pixel maps (such that the text would be overlapping) properly either. I've fixed both, and the output of that image is as I would expect (look at the pixel map in |


If you try to use k2flix to render pixel maps which do not have a square aspect ratio (such as 204367097), the image is the wrong aspect ratio. In addition, after fixing that, I realised that there were no safety checks for the annotations, so they can overlap.
I've fixed both in this PR (because they are both caused by non-square pixel maps).
Signed-off-by: Aleksa Sarai cyphar@cyphar.com