Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hscmap/fits

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/fits - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

build/dist/8a759e0fa39a925b8dd4.worker.js

2

build/dist/index.js

@@ -312,3 +312,3 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap

module.exports = function() {
return new Worker(__webpack_require__.p + "f3f526e31a80e57598fc.worker.js");
return new Worker(__webpack_require__.p + "8a759e0fa39a925b8dd4.worker.js");
};

@@ -315,0 +315,0 @@

{
"name": "@hscmap/fits",
"version": "1.3.2",
"version": "1.3.3",
"description": "fits (Flexible Image Transport System) reader module",

@@ -5,0 +5,0 @@ "main": "build/dist/index.js",

@@ -9,3 +9,3 @@ # Introduction

```typescript
import { Fits, DataType } from "@hscmap/fits"
import { Fits, Hdu } from "@hscmap/fits"
const sampleFitsURL = require<string>('file-loader!./sample.fits')

@@ -15,5 +15,14 @@

window.addEventListener('load', async e => {
const fits = await Fits.fetch(sampleFitsURL, [{ sourceIndex: 0, outputDataType: DataType.uint8, doNotScaleImageData: true }])
const hdu = fits[0]
const fits = await Fits.fetch(sampleFitsURL, [
{ outputDataType: Fits.DataType.uint8 },
{ outputDataType: Fits.DataType.uint8 },
])
for (const hdu of fits) {
showHdu(hdu)
}
})
function showHdu(hdu: Hdu) {
const width = hdu.card('NAXIS1', 'number')

@@ -33,5 +42,6 @@ const height = hdu.card('NAXIS2', 'number')

const j = (height - y) * width + x
imagedata.data[4 * j] = array[i]
imagedata.data[4 * j + 1] = array[i]
imagedata.data[4 * j + 2] = array[i]
const value = array[i]
imagedata.data[4 * j] = value
imagedata.data[4 * j + 1] = value
imagedata.data[4 * j + 2] = value
imagedata.data[4 * j + 3] = 255

@@ -47,3 +57,5 @@ }

document.body.appendChild(pre)
})
document.body.appendChild(document.createElement('hr'))
}
```

@@ -50,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc