Spotlight is a powerful macOS search technology that makes searching for files easy. Using Spotlight, you can search for things using attributes such as the width and height of an image in pixels, or its exposure time. Information like this (called metadata) is embedded in a file by the application that created it. Spotlight’s power comes from being able to extract, store, update, and organize the metadata of files to allow fast, comprehensive searches.
Spotlight uses Quick Look technology to display thumbnails and full-size previews of the documents returned in a search. As is the case with Quick Look, although macOS supports many types of images, the formats typically used for astronomy are not. Observatory therefore also provides Spotlight importers for the following image formats:
FITS – Flexible Image Transport System (FITS) is a digital file format useful for storage, transmission and processing of scientific and other images. FITS is the most commonly used digital file format in astronomy. FITS images usually have a
SBIG – The SBIG format is the default format for saving images when using the SBIG CCDOPS image acquisition software. These images usually have a
XISF – Extensible Image Serialization Format (XISF) is a free file format for storage, management and interchange of digital images and associated data. XISF has been conceived and implemented as the native file format of PixInsight, an image processing software platform designed specifically for astronomical imaging, and developed by the company Pleiades Astrophoto S.L. These images usually have a
These Spotlight importers ensure that you can search for astronomical images using the following attributes in the Finder:
Title – The object name or target name, e.g.
OBJECT FITS keyword.
Device model – A combination of the telescope, instrument and detector used for the observation, separated by semi-colons, e.g.
DETECTOR FITS keywords.
Location – The name of the location where the image was obtained, e.g.
ORIGIN FITS keyword.
Authors – The names of the observers, e.g.
OBSERVER FITS keyword.
Kind – The file type, e.g. Flexible Image Transport System.
Identifier – The archive or root file identifier, e.g.
ARCFILE FITS keyword.
Filter name – The filter used for the observation, e.g.
FILTER FITS keyword.
Image type – The image type, e.g.
IMAGETYP FITS keyword.
Detector temperature – Detector temperature in ℃, e.g.
CCD-TEMP FITS keyword.
Right ascension – The center right ascension of the image, e.g.
RA FITS keyword.
Declination – The center declination of the image, e.g.
DEC FITS keyword.
Equinox – Equinox, e.g.
EQUINOX FITS keyword.
Epoch – Epoch, e.g.
EPOCH FITS keyword.
Content created – Exposure date & time, e.g.
TIME-OBS FITS keywords.
Dimensions – Only for display purposes, the image width and height in pixels.
Axis – The number of axis of the image file. Only indexed if not exactly 2.
Pixel width – The width in pixels.
Pixel height – The height in pixels.
Pixel count – The total number of pixels in the image (width * height).
Exposure time – The exposure duration in seconds, e.g.
EXPTIME FITS keyword.
Bits per sample – The number of bits per sample, e.g.
BITPIX FITS keyword.
Focal length – Focal length in mm, e.g.
FOCALLEN FITS keyword.
The attribute names were chosen to match those of image formats natively supported by macOS, when applicable, so there’s no need need for separate searches for, say, DNG files and FITS files.
Some of this extracted metadata is displayed in the More Info section of the Finder’s Get Info window, which is displayed if you select an image and choose File ▸ Get Info (
⌘I). The preview is generated by the Quick Look generator.
To invoke Spotlight, you would usually press
⌘spacebar or click the magnifying glass icon at the right of your menubar. Much more advanced searches can be performed by searching in the Finder. Open a Finder window and click in the search field at the top, or press
⌘F to open a new search window or convert an open Finder window into a search window.
If the Finder displays your search results in Icon view, you’ll probably want to switch to List view to get a better look at your results. You can then select the column headers to sort the results. If you want more column headers to be visible, press
⌘J and check other columns from the View Options window, or use the contextual menu of the column header (
macOS Finder has an undocumented but very useful feature: If you move the folder containing your astronomical images into the Pictures folder, the contextual menu of the List view’s column header will also contain a Dimensions item. Select it, and a Dimensions column will be added to the folder’s Finder window. The information displayed is obtained from the Spotlight index, and because Observatory contains Spotlight importers for FITS, SBIG and XISF images, the Finder will now display the width and height in pixels for these files.
Another useful feature is that when you switch to Icon view and press
⌘J, by selecting Show item info in the View Options window, the image dimensions will be displayed below the image thumbnails.
The Finder window’s search bar contains several options for tailoring your results. When you start typing search terms, the Finder pops up a menu asking if you want to restrict your search terms to file names only. And you can click on This Mac to change the target of your search from the folder you were in when you started searching, to your entire Mac.
To narrow down your results, start by selecting one of the criteria in the first menu. The default items in the menu are not very good choices for searching FITS, SBIG and XISF images, so click Other… here. Observatory’s Spotlight importer adds many attributes to the list. Click on the In Menu check box next to an item if you want it to appear in the search bar menus for easy access in the future.
Useful additions to the menu might be:
Device model – If your images were obtained with multiple telescopes or cameras.
Filter name – If your images were obtained with different filters.
Often a search requires more than one set of criteria to reduce the number results to just those you are interested in. Finder window searches let you specify as many parameters as you want. Say you want to search for all light exposures of 1800 seconds taken through an OIII filter. To do this, you could select Filter name in the the first menu and have it match “OIII”. Click on the
+ button in the search bar to add another search parameter, set it to Image type and enter “light”. Then add another with the
+ button, select Exposure time and enter “1800”. Spotlight will display all images matching these criteria.
You can also change the operators of your criteria, e.g. is greater than instead of equals. This way, by combining criteria, you can even search for all images within a range of Right Ascension and Declination values.
You can use quotes to specify that a search should look at the exact phrase you type. You can also use Boolean search terms, to exclude criteria or to create an OR search. Once you have one condition set up, you can add a Boolean term to your next condition by
+ button. The
+ will turn into an ellipsis (
…), and you’ll get a new pull-down menu with options for Any (
OR), All (
AND), or None (
To save your search as a Smart Folder, click on the Save button in the search bar and enter a name for the Smart Folder. Enable the Add To Sidebar option if you want add the Smart Folder to the sidebar of your Finder window. Whenever you open this Smart Folder, Spotlight will run the search again and update the results with all files that fit the criteria.
You can change the search by opening the Smart Folder, clicking the action button, and selecting Show Search Criteria.
Spotlight indexing should be enabled for the drive your images reside on. To check the Spotlight indexing status of a drive, open
/Applications/Utilities), and enter
mdutil -s <path to volume>
mdutil -s "/Volumes/Macintosh HD"
It should return Indexing enabled. If you have your images on an external drive or NAS, then it may report Indexing and searching disabled. You can enable it with the same command (enter
mdutil for the available options).