
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Project available in github at https://github.com/fab77/jsfitsio#readme (previously available at https://github.com/fab77/FITSParser#readme).
Library used to handle FITS files as defined in the "Definition of the Flexible Image Transport System (FITS)" document defined by internation Astronomical Union (IAU)
This library is capable to read and write FITS files where the data are represented in the following formats (BITPIX):
Only ImageHDU are supported at the moment.
jsFITS I/O can be used as standalone Node module or integrated in the browser.
Include the following dependency into package.json file in your project:
"dependencies": {
"jsfitsio": "^1.2.1"
},
Download the file "jfitsio.js" under _bundle directory and include it in your web page.
Prerequisites: Node.js v<=16 (see installation instructions)
Clone repo:
git clone https://github.com/fab77/jsfitsio.git
cd FITSParser
dev modules:npm i
npm run build:prod
import { FITSParser } from 'jsfitio';
const fileuri = "http://skies.esac.esa.int/Herschel/normalized/PACS_hips160//Norder8/Dir40000/Npix47180.fits";
const fp = new FITSParser(fileuri);
const promise = fp.loadFITS();
promise.then(function (fits) {
if (fits !== null) {
console.log(fits === null || fits === void 0 ? void 0 : fits.header);
console.log(`BITPIX: ${fits.header.get('BITPIX')}`);
console.log(`NAXIS1: ${fits.header.get('NAXIS1')}`);
console.log(`NAXIS2: ${fits.header.get('NAXIS2')}`);
console.log(`payload bytes length ${fits.data.length * fits.data[0].length}`);
}
else {
console.log("Empty data");
}
});
import { FITSParser } from 'jsfitio';
import { FITSHeader } from 'jsfitio';
import { FITSWriter } from 'jsfitio';
import { writeFITS } from 'jsfitio'
import { FITSHeaderItem } from 'jsfitio';
const fileuri: string = "./test/inputs/x0c70103t_c1f.fits";
const fp = new FITSParser(fileuri);
const fitsPromise = fp.loadFITS();
fitsPromise.then( (fitsProcessed) => {
let fitsHeader = fitsProcessed.header;
let fitsData = fitsProcessed.data;
let fw = new FITSWriter();
fw.run(fits.header, fits.data);
writeFITS("./MyFITS.fits", fw._fitsData);
});
You need to include "jsfitsio.js" (take it from _bundles directory in git the repo https://github.com/fab77/FITSParser ) file in your HTML page. Below a sample.
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Webpack App</title>
<base href="."/>
</head>
<body>
<h1>Hello world!</h1>
<h2>jsFITS I/O web integration sample</h2>
<script src="./jsfitsio.js"></script>
<script>
let fitsURL = "http://skies.esac.esa.int/Herschel/normalized/PACS_hips160//Norder8/Dir40000/Npix47180.fits"
let fp = new jsfitsio.FITSParser(fitsURL);
let promise = fp.loadFITS();
promise.then( (fits) => {
if (fits !== null) {
console.log(fits?.header);
const blobUrl = jsfitsio.FITSParser.generateFITS(fits.header, fits.data);
console.log(blobUrl);
} else {
console.log("Empty data");
}
});
</script>
</body>
</html>
Node: v16.17.0 webpack: 5.74.0
This project is licensed under the GPL License - see the LICENSE.md file for details
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.
FAQs
FITS I/O javascript library.
We found that jsfitsio demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.