JavaScript library for reading the FITS astronomical format. Functionality includes reading of images, data cubes, compressed images, binary and ascii tables.
Probably it is just a lack of documentation (or of understanding from my side)...
However I have opened a .fits file, and the first "dataunit" is an Image. Through it I have access to the different parameters ("width","height",...) but I do not know how to access the pixel values.
I have tried the "getFrame(0,callback,opts)" but the returned "pixels" (into the callback) is undefined. I have also tried to directly build a "Float32Array" wrapping the "buffer" but the data I can extract from it seems to be random (and are certainly not the expected values)
For a file containing uint8 the array wrapping works well and I get my image, the problem seems to be specific for the float (bitpix: -32)
Probably it is just a lack of documentation (or of understanding from my side)...
However I have opened a .fits file, and the first "dataunit" is an Image. Through it I have access to the different parameters ("width","height",...) but I do not know how to access the pixel values.
I have tried the "getFrame(0,callback,opts)" but the returned "pixels" (into the callback) is undefined. I have also tried to directly build a "Float32Array" wrapping the "buffer" but the data I can extract from it seems to be random (and are certainly not the expected values)
For a file containing uint8 the array wrapping works well and I get my image, the problem seems to be specific for the float (bitpix: -32)