Convert FITS to HDR
Max file size 100mb.
FITS vs HDR Format Comparison
| Aspect | FITS (Source Format) | HDR (Target Format) |
|---|---|---|
| Format Overview |
FITS
Flexible Image Transport System
Scientific image format developed by NASA and the International Astronomical Union FITS Working Group (IAUFWG), first defined in 1981. Supports 8/16/32/64-bit integer and 32/64-bit floating-point pixel data with multi-extension architecture for storing multiple images and tables per file. Includes WCS (World Coordinate System) metadata for celestial coordinate mapping. The standard data format for astronomical observatories worldwide. Lossless Standard |
HDR
Radiance HDR (RGBE)
High dynamic range image format developed by Greg Ward for the Radiance lighting simulation system. Uses RGBE (Red, Green, Blue, Exponent) encoding to store floating-point color data in a compact format. Standard for environment maps and lighting in 3D rendering. Standard Format Lossless |
| Technical Specifications |
Data Types: 8/16/32/64-bit integer, 32/64-bit float
Structure: Multi-extension (images, tables, headers) Metadata: WCS celestial coordinates, extensive headers Byte Order: Big-endian (FITS standard) Extensions: .fits, .fit, .fts |
Color Depth: 32-bit RGBE (8-bit mantissa + 8-bit shared exponent)
Compression: Run-length encoding (RLE) Dynamic Range: 76 orders of magnitude Color Space: Linear RGB (unclamped) Extensions: .hdr, .pic |
| Image Features |
|
|
| Processing & Tools |
FITS data handling with astropy and Python: from astropy.io import fits
import numpy as np
# Open FITS file with full header access
hdul = fits.open('observation.fits')
header = hdul[0].header # WCS, telescope info
data = hdul[0].data # Pixel array
# Access multi-extension data
for ext in hdul:
print(ext.name, ext.data.shape if ext.data is not None else 'No data')
|
HDR image from astronomical FITS data:
from astropy.io import fits
import numpy as np
import imageio
hdul = fits.open('emission_nebula.fits')
data = hdul[0].data.astype(np.float32)
# HDR preserves the extreme brightness range
# of astronomical objects natively
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
Introduced: 1981 (NASA/IAU FITS Working Group)
Current: FITS Standard 4.0 (2018) Status: Active, universal astronomical standard Evolution: FITS 1.0 (1981) → 2.0 (1988) → 3.0 (2008) → 4.0 (2018) |
Introduced: 1985 (Greg Ward, Radiance)
Format: RGBE (Radiance) / XYZE variant Status: Active, standard for IBL Evolution: Radiance RGBE (1985) → widely adopted for IBL (2000s) |
| Software Support |
Astronomy: ds9, IRAF, PixInsight, Aladin, TOPCAT
Libraries: astropy (Python), cfitsio (C), FITSIO (IDL) Space Agencies: NASA HEASARC, ESA archives, MAST Other: ImageMagick, GIMP (via plugin), Pillow (limited) |
3D Rendering: Blender, Maya, 3ds Max, Cinema 4D
Libraries: OpenCV, imageio, stb_image, Pillow (via plugin) Editors: Photoshop, Luminance HDR, Photomatix Other: Radiance, HDR Shop, PTGui |
Why Convert FITS to HDR?
Converting FITS to HDR (Radiance RGBE) creates environment maps and light probes from real astronomical data for image-based lighting in 3D rendering. Real sky data provides physically accurate illumination values that artificial sky models cannot match.
Digital planetariums use HDR environment maps for dome projection, where the full brightness range of the night sky — from magnitude 1 stars to magnitude 20 galaxies — must be represented accurately. FITS-to-HDR conversion captures this range in a format compatible with fulldome rendering engines.
Film production teams creating night exterior scenes need accurate sky illumination for physically-based rendering. Converting all-sky survey FITS data to HDR creates light probes where each star contributes its actual luminosity to the scene lighting, producing realistic outdoor night illumination.
The Radiance RGBE format compactly stores floating-point brightness data using 8-bit mantissas with a shared exponent, covering 76 orders of magnitude. This encoding efficiently captures the extreme brightness range of astronomical scenes while producing smaller files than full-float formats like EXR.
Key Benefits of Converting FITS to HDR:
- Physical Accuracy: RGBE encoding captures real astronomical brightness values for physically-based rendering
- Environment Mapping: Standard format for IBL light probes used in all 3D rendering applications
- 76 Orders of Magnitude: Sufficient dynamic range for even the most extreme astronomical brightness variations
- Compact HDR Storage: More compact than EXR for environment map use cases
- 3D Rendering Standard: Supported by Blender, Maya, 3ds Max, Cinema 4D, and all major 3D software
- Real Sky Lighting: Authentic night sky illumination from actual stellar photometry data
- Planetarium Ready: Dome projection systems use HDR environment maps for immersive sky display
Practical Examples
Example 1: Planetarium Dome Environment Map
Scenario: A digital planetarium generates an HDR environment map of the Milky Way from all-sky survey data for image-based lighting in their dome projection system.
Input FITS file (milky_way_dome.fits):
FITS astronomical data: Resolution: 4096×2048 equirectangular Data: Photometric all-sky survey Instrument: All-sky survey mosaic Content: Full Milky Way panorama
Output HDR file (milky_way_dome.hdr):
Converted HDR output: RGBE environment map 76 orders of magnitude range IBL-ready for dome rendering Realistic star brightness
Example 2: Virtual Observatory Sky Probe
Scenario: A 3D artist creates an HDR sky probe from real astronomical data for lighting outdoor night scenes in film production with physically accurate starlight.
Input FITS file (night_sky_probe.fits):
FITS astronomical data: Resolution: 2048×1024 sky hemisphere Data: Calibrated photometry Instrument: Photometric sky survey Content: Northern hemisphere sky
Output HDR file (night_sky_probe.hdr):
Converted HDR output: Physically accurate brightness Image-based lighting Film production ready Accurate star magnitudes
Example 3: Supernova Remnant Dynamic Range
Scenario: A researcher visualizes the extreme dynamic range of the Cassiopeia A supernova remnant for a 3D rendering showing emission intensity variations.
Input FITS file (cas_a_remnant.fits):
FITS astronomical data: Resolution: 1024×1024 Chandra data Data: X-ray emission map Instrument: Chandra X-ray Observatory Content: Cas A supernova remnant
Output HDR file (cas_a_remnant.hdr):
Converted HDR output: Full X-ray flux range Compact HDR storage 3D rendering compatible Scientific visualization
Frequently Asked Questions (FAQ)
Q: What is FITS format?
A: FITS (Flexible Image Transport System) is the standard data format for astronomical observations since 1981. Developed by NASA and the IAU, it supports multi-dimensional floating-point arrays and comprehensive scientific metadata.
Q: What is HDR (Radiance) format?
A: HDR (Radiance RGBE) is a high dynamic range image format created by Greg Ward for the Radiance lighting simulation system. It uses RGBE encoding (8-bit mantissa per channel plus 8-bit shared exponent) to store floating-point brightness data spanning 76 orders of magnitude.
Q: Why convert FITS to HDR?
A: Converting FITS to HDR enables astronomical data to be used as environment maps and light probes in 3D rendering. Real sky data provides physically accurate starlight for image-based lighting in planetarium dome projections, film VFX, and architectural visualization.
Q: How does HDR handle astronomical brightness ranges?
A: HDR's RGBE encoding spans 76 orders of magnitude, which is sufficient for most astronomical applications. However, it uses only 8-bit mantissa precision (256 levels per exponent range), which is less precise than EXR's 16/32-bit float.
Q: What is image-based lighting with astronomical data?
A: Image-based lighting (IBL) uses an HDR environment map to illuminate 3D scenes realistically. Astronomical HDR maps provide physically accurate night sky illumination, allowing CG elements to be lit by real starlight and moonlight.
Q: Can HDR preserve WCS coordinate information from FITS?
A: No, HDR format does not support metadata like WCS coordinates. The conversion produces a visual image only. Keep the original FITS file for scientific analysis and coordinate reference.
Q: What 3D software supports HDR environment maps?
A: All major 3D applications support HDR environment maps: Blender, Maya, 3ds Max, Cinema 4D, Houdini, and Unity/Unreal game engines. The HDR format is the standard for IBL light probes.
Q: How does HDR compare to EXR for astronomical use?
A: EXR offers higher precision (full 16/32-bit float vs. HDR's 8-bit mantissa) and supports arbitrary channels. HDR is more compact and universally supported as an environment map format. Use HDR for IBL/environment maps and EXR for high-precision compositing work.