Skip to content
lmytimePublic

About

Quick Look for FITS files on macOS

Resources

Stars

26 stars

Watchers

0 watching

Forks

Latest commit

 

History

122 Commits

Folders and files

Repository files navigation

uFits

Quick Look for FITS, XISF and ASDF files on macOS. Select a file in Finder and press Space to see it, and get real thumbnails in Finder windows. Files named .fits, .fit, .fts, .fz, .xisf and .asdf (the Roman Space Telescope's, for one) work, and so do the FITS files of X-ray missions: .pha, .pi, .arf, .rmf, .rsp, .rsp2, .evt, .lc, .hk, .mkf, .dph and .img (which macOS takes for a disk image: Space shows it, but Finder icons stay plain).

Homepage: lmytime.github.io/uFits

Install

curl -fsSL https://github.com/lmytime/uFits/releases/latest/download/install.sh | sh

That's all: select a FITS, XISF or ASDF file in Finder and press Space. Works on macOS 11 or later, Apple silicon and Intel.

To uninstall (the app, its settings and all it keeps in your Library):

curl -fsSL https://github.com/lmytime/uFits/releases/latest/download/install.sh | sh -s -- --uninstall

Prefer to install by hand? Download uFits-<version>.dmg from Releases, drag uFits onto Applications, run /usr/bin/xattr -dr com.apple.quarantine /Applications/uFits.app (the app is not notarized by Apple), then open uFits once.

What you see

  • Images in any format FITS allows, with blank pixels transparent and an automatic stretch that brings out faint detail. Cubes get a slider to step through their planes; RGB cubes and colour camera frames (Bayer) are shown in colour; tile-compressed .fz files work too.
  • XISF images: 2D grayscale, RGB and Bayer images, with automatic stretch, zoom and an image menu for files containing multiple images. Compressed images work too.
  • ASDF files, such as those of the Nancy Grace Roman Space Telescope: every array in the file, named by its place in the file's tree (roman.data, roman.dq, ...), the science image first. Cubes (Roman's raw ramps) get the slider, and arrays compressed with LZ4 (as Roman's are), zlib or bzip2 work too. Header shows the whole tree.
  • Plots of spectra and light curves (TESS, Kepler, SDSS, HST and JWST spectra, X-ray light curves and spectra, ...) and sky maps of catalogs with RA and Dec. Catalogs open on their rows: click Plot for the map.
  • Table: the rows of any table, even millions of them. ⌘C copies the selected rows.
  • Header: every keyword, with values and comments lined up. ⌘F searches it.

Previews are fast even for huge files: uFits reads only the part of the file it shows (of a compressed XISF image, the whole image; of a compressed ASDF cube, only the plane on show; for the map of a catalog bigger than 1 GiB, 256 MiB of its rows, sampled from all over it).

Using the preview

The bar at the bottom of the preview has:

  • Image (or Plot), Table, Header: what to show.
  • A menu of the file's HDUs (extensions such as SCI, ERR, DQ, or tables), XISF images or ASDF arrays, when it has more than one.
  • A slider for the planes of a cube.
  • The stretch: automatic, linear (0.5–99.5 %) or min–max. Your choice is remembered (it is the same setting as in the uFits app).

To zoom into an image, pinch, ⌥-click (⇧⌥-click zooms out), or scroll with ⌘ or ⌥ held; in the uFits app ⌘+, ⌘− and ⌘0 work too. Zoomed in, the part on view is shown at full resolution. To move around it, drag with the middle mouse button or with ⌥ held (a middle-click centres the view where you click), or scroll.

When you open the uFits app, it looks for a new version (once a day at most) and offers it: click Update and it updates itself in a few seconds. Once the app has seen a new version, Update available appears in the bar too.

You can also open FITS, XISF and ASDF files in the uFits app (File › Open, or drop them on its icon).

The uFits app

Open uFits (in Applications) to see whether its Quick Look extensions are on, and to set:

  • Show thumbnails in Finder's icon and gallery views. Small icons (list and column views) always keep the file's own icon.
  • Previews open with the automatic, linear or min–max stretch.
  • App icon: Automatic (on macOS 26 the light icon, and the dark one, Dusk, when System Settings › Appearance › Icon & widget style is Dark; Dusk on earlier versions), or always Dusk or always the light one.
  • Check for updates when uFits opens (once a day at most): uFits asks GitHub whether a new version is out, and offers it. Check Now asks at once.

FAQ

How do I switch from QuickFits?

  1. In System Settings › General › Login Items & Extensions, under Extensions, open Quick Look and uncheck both QuickFits entries. (On macOS 13 and 14: System Settings › Privacy & Security › Extensions › Quick Look; on macOS 12 and earlier: System Preferences › Extensions › Quick Look.)
  2. An easier way: move QuickFits from Applications to the Trash :)

If Space still shows QuickFits' previews after that, open uFits and click Reset Quick Look.

Troubleshooting

  • Space shows nothing, or Finder shows plain icons. Open the uFits app: it tells you whether its Quick Look extensions are on. If not, turn uFits on under System Settings › General › Login Items & Extensions › Quick Look, then click Reset Quick Look in the app.
  • Thumbnails fill only a quarter of the icon or are upside down, or the uFits app says "Version 1.0.0". An old copy of uFits is still on your Mac. The first builds were numbered 1.0.0, higher than today's versions, and on macOS 15 Finder's thumbnails can come from the copy numbered highest. The uFits app in Applications lists other copies and moves them to the Trash; the installer unregisters them too. To find them yourself: pluginkit -m -A -D -v -i io.github.lmytime.uFits.Thumbnail.
  • Another app takes over .fits files. The uFits app shows which file type .fits maps to on your Mac; quitting or removing the other FITS app's Quick Look plug-in usually fixes it.
  • .fits.gz files are not previewed. macOS treats them as gzip archives.
  • Not supported: HCOMPRESS_1 compressed images (their header is still shown) and random-groups files.
  • Some XISF variants are not supported. See XISF support and limits.
  • Some arrays of an ASDF file are not in the menu. Tables, masks, arrays in other files and those of a WCS are not shown (the Header view lists them all). See ASDF support and limits.

Building from source and how uFits works: DEVELOPMENT.md.

License

uFits is free and open source, under the BSD 3-Clause License.

About

Quick Look for FITS files on macOS

Resources

Stars

26 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages