Comments (9)
Can you attach or send a FITS file? I'll be happy to look at it.
from js9.
20200326_7906_906176_0008.zip
Here is the fits file. I can open it with ds9 or astropy correctly.
from js9.
@fockez Using that test file, the cfitsio library gets an error in fits_convert_hdr2str(), both in js9 and in non-js9 programs. There is special code in fits_convert_hdr2str() to deal with compressed images, so my first guess was that there is a header parameter that is tripping up cfitsio, especially since I routinely load rice-compressed images in other test files.
And indeed, after messing around with the file, the problem seems to be with the 2 parameters BSCALE and BZERO that come after TFIELDS and before TTYPE1. If I delete them from the file, js9 and non-js9 programs work fine:
So I think the options are to move those parameters (I didn't try this but I assume moving them down in the header will help) or else we can submit a bug report to cfitsio. fverify does not complain about these params or their location, so this really might a problem with cfitsio itself.
Let me know how you want to proceed.
from js9.
from js9.
Thanks for your work on that. I think for now, if move header keyword position would help, that's simple enough, right?
from js9.
Yes, if you have control over the order in which the keywords are written, I'd move the BSCALE and BZERO params to some place after the Z params. I did that and was able to load the FITS file.
from js9.
@fockez Were you able to move the BSCALE and BZERO parameters and then use JS9 to display the file? The cfitsio team would especially like to know ... if you have worked around the problem in that way, they can put it into a less urgent queue for fixing.
from js9.
Yes, if I adjust all the extensions' header order, it can be read by js9. Thanks. @ericmandel
from js9.
I'll close this, then, but will update it if cfitsio gets fixed.
from js9.
Related Issues (20)
- Conflicting CSS HOT 3
- Loading files from the server with the node helper HOT 14
- Javascript API HOT 2
- JS9.Load("file", {ra: 0, dec: 0}) doesn't pan HOT 3
- Missing reference in CSS file "tabcontent.css" HOT 3
- Unable to Load FITS files with NaN values HOT 12
- JS9 ERROR: cannot load: ../astroemw.wasm ... please check the url/pathname HOT 3
- Multi Extension FITs mosaic display HOT 12
- Fits Image Display Area + Rotation HOT 10
- JS9 potentially crashing on ARM64 architecture HOT 8
- JS9.ChangeRegions() to change position incorrect after zooming image HOT 5
- Incorporating JS9 (and pyjs9) into a JupyterLab -> Kubernetes/Docker system HOT 2
- Release with bundled minimist bump? HOT 3
- Q: is there a query parameters to load image from CORS server? HOT 16
- ImageOpts.flip does nothing HOT 3
- Load image from memory. HOT 4
- End of JS9 development: July 1, 2022 HOT 2
- Preload regions with image HOT 3
- unable to open some files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js9.