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

Web client fails to find AVM #366

Open
keflavich opened this issue May 10, 2024 · 2 comments
Open

Web client fails to find AVM #366

keflavich opened this issue May 10, 2024 · 2 comments

Comments

@keflavich
Copy link

This file has embedded spatial AVM:
https://www.dropbox.com/scl/fi/ak62bm1nrot6k6h4122yk/BrickJWST_1182p2221_466_444_405.png?rlkey=lzoye1j98v2z47wxeukrrm8xt&dl=0

but WWT doesn't recognize it. I also tried through the desktop client. What is missing? I embedded using pyavm.

@pkgw
Copy link
Contributor

pkgw commented May 10, 2024

If you're trying to open an AVM image in the webclient, there's C# code on the server side that deals with parsing the AVM:

https://github.com/WorldWideTelescope/wwt-website/blob/master/src/WWT.Imaging/VampWCSImageReader.cs

(invoked from https://github.com/WorldWideTelescope/wwt-website/blob/master/src/WWT.Providers/OtherProviders/TileImageProvider.cs)

The implementation is pretty simplistic. Looking at your file, the problem seems to be that the AVM lists are encoded with rdf:Bag elements rather than rdf:Seq as expected by the C# code.

Looking at the standard, I think that this is incorrect output. Which would make semantic sense, since a "bag" is presumably an unordered collection while a "seq" is presumably ordered, and for these parameters, ordered would be correct.

Tracing into PyAVM, I think we have a bug! Filed as astrofrog/pyavm#44

Hopefully it should all work if you apply the (three-letter) patch in that PR, or you could manually hack up your file. I would prefer not to patch the server-side to try to handle this mistake unless it turns out to be prevalent in the wild.

@keflavich
Copy link
Author

Thanks! That should solve my issue; I'll test today.

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

2 participants