Giter VIP home page Giter VIP logo

Comments (9)

ericmandel avatar ericmandel commented on August 16, 2024

Can you attach or send a FITS file? I'll be happy to look at it.

from js9.

fockez avatar fockez commented on August 16, 2024

20200326_7906_906176_0008.zip
Here is the fits file. I can open it with ds9 or astropy correctly.

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

@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:

Screen Shot 2020-03-27 at 9 15 31 AM

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.

ericmandel avatar ericmandel commented on August 16, 2024

from js9.

fockez avatar fockez commented on August 16, 2024

Thanks for your work on that. I think for now, if move header keyword position would help, that's simple enough, right?

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

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.

ericmandel avatar ericmandel commented on August 16, 2024

@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.

fockez avatar fockez commented on August 16, 2024

Yes, if I adjust all the extensions' header order, it can be read by js9. Thanks. @ericmandel

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

I'll close this, then, but will update it if cfitsio gets fixed.

from js9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.