FITS File reader for SC

Hello Everyone,

I’m excited to share an implementation of a FITS file reader designed for SuperCollider. This tool may prove beneficial for sonification projects.

What Are FITS Files?

FITS (Flexible Image Transport System) is a standard file format widely used in astronomy for storing scientific data such as images, spectra, and tables. Key features include:
Metadata Preservation: Headers retain essential observational information like telescope specifications, exposure times, and coordinates.
Platform Independence: Compatible across various operating systems without requiring modifications.
Support for Multi-Dimensional Data: Capable of handling 2D images, 3D data cubes (commonly used in radio astronomy), and structured tables.

A useful methods for mapping an image pixel data to a 1D sequence are .getHilbertCurveData and getHilbertCurveDataArbitrary. A ‘Hilbert curve’ is a type of space-filling curve that provides a continuous mapping between one-dimensional and multi-dimensional spaces. It’s a fractal curve that can fill a square (or higher-dimensional hypercube) while maintaining locality properties - meaning that points close together in the original 2D space tend to remain close together in the 1D representation.

The key advantage of Hilbert curves in image processing is their ability to transform 2D image data into 1D signals while preserving spatial relationships and minimising information loss. This transformation enables the application of 1D signal processing techniques (like wavelet analysis, frequency analysis, and time-series methods) to 2D image data.

The Hilbert curve represents a profound connection between finite geometric constructions and infinite mathematical processes: https://www.youtube.com/watch?v=3s7h2MHQtxc

Anyway, here is the repository:

https://github.com/marcinpiet/FITS_SC

5 Likes