astrofrog / astrofrog/pyavm

AVM from header is wrong sometimes?

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Apparently this code:
https://github.com/astrofrog/pyavm/blob/9152f6809426b40647ecbaefcefceabe09236d94/pyavm/avm.py#L592-L607
https://github.com/astrofrog/pyavm/blob/9152f6809426b40647ecbaefcefceabe09236d94/pyavm/avm.py#L654-L656
sometimes results in flipped images.

Probably related to:
https://github.com/astrofrog/pyavm/issues/39

I don't quite understand it yet, but I was having to do a lot of extra transforms to get my JWST images to look right, possibly because they are 90deg rotated by default. I can try to make a MWE, but I just want to report this - claude claimed to have fixed it by doing this instead:
```
avm = pyavm.AVM.from_wcs(wcs, shape=shape)
avm.Spatial.CDMatrix = [cd[0, 0], cd[0, 1], cd[1, 0], cd[1, 1]]
avm.Spatial.Scale = None
avm.Spatial.Rotation = None
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect pyavm/avm.py at lines 592-607 and 654-656, then compare the behavior with issue #39. Try to reproduce the flipped or rotated output using the reported JWST WCS case; done means AVM-derived images retain the expected orientation without extra transforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.