FITSReader 1.2.2
See the version list below for details.
dotnet add package FITSReader --version 1.2.2
NuGet\Install-Package FITSReader -Version 1.2.2
<PackageReference Include="FITSReader" Version="1.2.2" />
<PackageVersion Include="FITSReader" Version="1.2.2" />
<PackageReference Include="FITSReader" />
paket add FITSReader --version 1.2.2
#r "nuget: FITSReader, 1.2.2"
#:package FITSReader@1.2.2
#addin nuget:?package=FITSReader&version=1.2.2
#tool nuget:?package=FITSReader&version=1.2.2
[[TOC]]
FITSReader is a library that parses FITS image files according to NASA's FITS standard version 4.0.
This library provides methods to extract metadata, raw data, and normalized byte arrays that can be used to display FITS data as images.
FITS Overview
A Flexible Image Transport System (FITS) file is the standard archival data format for astronomical data sets.
Each FITS file contains 1 or more Header Data Units (HDUs). Each HDU must contain a 'Header' with metadata about the HDU and optionally contains an array of data values.
See the official NASA documentation for more in-depth details about the format.
Library Overview
FITSFile
The main components of the FITSReader library are:
- FITSFile parses a FITS file and provides references to all of the HDUs (represented as one or more FITSHeaders).
- FITSHeader contains metadata about the image such as size, datatype, exposure settings, etc and methods to extract data values from its associated data array. Data can be retrieved from each header by accessing the appropriate property of the header based on its data type. ⚠ An error will be thrown if you try to get the wrong type of data. I am hoping to make this more seamless on future versions. ⚠
- FITSData contains the actual data for an HDU. Data can be many types. Single precision float is the only supported data type at this time.
- Normalizer Generates a byte array of normalized values for a given min and max value. Only linear normalization of single-precision floats values at this time.
Usage
- Get a reference to a FITS file.
var fitsFile = await FITSFile.ReadFileAsync(fileName); - Find an interesting HDU (Only single-precision float is supported at this time)
var header = fileFile.Headers.Find(header => header.DataType == FITSDataType.SingleFloat); - Get data from HDU
var data = header.FloatData; - Create normalizer for the parsed data values
var normalizer= new FloatLinearNormalizer(data.Values); - Get byte values for the data normalized between the provided min and max values.
var normalized = normalizer.Normalize(data.Mean - data.StdDev, data.Mean + data.StdDev);
Install
Stable Version
Find the latest stable version at nuget.org
Preview Version
Follow the instructions here to connect to the FITSPreview nuget feed.
Source
Code
Source code can be found on Azure DevOps. The following instructions assume you are using Git.
git clone https://MikeWestbrook@dev.azure.com/MikeWestbrook/FITS/_git/FITS- Open the Reader C# project with Visual Studio 2022
Release
⚠ Limitations ⚠
- This library currently only supports 2 dimensional data.
- FITS data supports many data types from single bytes to IEEE double-precision floating points. FITSReader supports the following data types.
- IEEE single-precision floating point
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.0 | 454 | 3/7/2023 |
| 1.3.9 | 325 | 3/5/2023 |
| 1.3.8 | 366 | 2/23/2023 |
| 1.3.7 | 363 | 2/12/2023 |
| 1.3.6 | 377 | 2/12/2023 |
| 1.3.5 | 373 | 2/12/2023 |
| 1.3.4 | 383 | 2/5/2023 |
| 1.3.3 | 406 | 2/5/2023 |
| 1.3.2 | 377 | 2/5/2023 |
| 1.3.1 | 379 | 2/5/2023 |
| 1.3.0 | 392 | 2/5/2023 |
| 1.2.3 | 385 | 2/5/2023 |
| 1.2.2 | 378 | 2/5/2023 |
| 1.2.0 | 394 | 2/5/2023 |
| 1.1.0 | 416 | 1/24/2023 |
| 1.0.22 | 423 | 1/11/2023 |
| 1.0.21 | 409 | 1/7/2023 |
| 1.0.20 | 410 | 1/6/2023 |