Giter Site home page Giter Site logo

Make HDU types parametric about fitsio.jl HOT 5 CLOSED

juliaastro avatar juliaastro commented on August 15, 2024
Make HDU types parametric

from fitsio.jl.

Comments (5)

emmt avatar emmt commented on August 15, 2024

Yes I think that it would be a very good idea. Type stability is a very good point. Parameters {UInt8,0} could be used in case there is no data. One drawback is that you must known in advance the element type and the number of dimensions in advance whene creating an Image HDU.

Owing to the variety of the possible column types in FITS Tables, I don't think this could be done for tables.

from fitsio.jl.

giordano avatar giordano commented on August 15, 2024

One drawback is that you must known in advance the element type and the number of dimensions in advance whene creating an Image HDU.

We know this information. The type of the array returned when reading the ImageHDU is TYPE_FROM_BITPIX[fits_get_img_equivtype(hdu.fitsfile)], and the number of dimensions is length(fits_get_img_size(hdu.fitsfile)).

from fitsio.jl.

emmt avatar emmt commented on August 15, 2024

OK this is when reading data but you may want to create a FITS Image by concatenating data so that you only know the result at the end and update the FITS header accordingly. My point was that, with your suggested change, this is possible providing you know the number of dimensions in advance (not their lengths) which I think is fairly resonnable and is not such a big restriction. So I am totally in favor of your suggestion.

from fitsio.jl.

kbarbary avatar kbarbary commented on August 15, 2024

from fitsio.jl.

giordano avatar giordano commented on August 15, 2024

I'm closing this, as per discussion in #120

from fitsio.jl.

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.