All Projects → onekiloparsec → QLFits

onekiloparsec / QLFits

Licence: MIT license
The macOS quicklook plugin for FITS files.

Programming Languages

objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to QLFits

phantom-config
Parse, convert, modify, and generate Phantom config files.
Stars: ✭ 12 (-72.73%)
Mutual labels:  astronomy
P4J
Periodic time series analysis tools based on information theory
Stars: ✭ 42 (-4.55%)
Mutual labels:  astronomy
pysynphot
Synthetic Photometry.
Stars: ✭ 21 (-52.27%)
Mutual labels:  astronomy
PreviewMarkdown
QuickLook Markdown preview and icon thumbnailing app extensions for macOS Catalina and beyond
Stars: ✭ 25 (-43.18%)
Mutual labels:  quicklook
TART
Transient Array Radio Telescope
Stars: ✭ 20 (-54.55%)
Mutual labels:  astronomy
unity-excavator
Physical simulations on Unity
Stars: ✭ 20 (-54.55%)
Mutual labels:  astronomy
pyuvdata
A pythonic interface for radio astronomy interferometry data (uvfits, miriad, others)
Stars: ✭ 62 (+40.91%)
Mutual labels:  astronomy
Comet
A complete VOEvent transport system
Stars: ✭ 20 (-54.55%)
Mutual labels:  astronomy
rust-fitsio
FFI wrapper around cfitsio in Rust
Stars: ✭ 17 (-61.36%)
Mutual labels:  astronomy
gamma-astro-data-formats
Data formats for gamma-ray astronomy
Stars: ✭ 24 (-45.45%)
Mutual labels:  astronomy
sherpa
Fit models to your data in Python with Sherpa.
Stars: ✭ 125 (+184.09%)
Mutual labels:  astronomy
phantom
Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
Stars: ✭ 52 (+18.18%)
Mutual labels:  astronomy
TreeCorr
Code for efficiently computing 2-point and 3-point correlation functions. For documentation, go to
Stars: ✭ 85 (+93.18%)
Mutual labels:  astronomy
NICERsoft
Analysis software for the NICER mission
Stars: ✭ 12 (-72.73%)
Mutual labels:  astronomy
PlanetaryImager
Qt capture software for astronomy, mainly planetary shooting
Stars: ✭ 45 (+2.27%)
Mutual labels:  astronomy
MOSFiT
Modular Open Source Fitter for Transients
Stars: ✭ 27 (-38.64%)
Mutual labels:  astronomy
ccd-reduction-and-photometry-guide
Read the CCD guide here:
Stars: ✭ 55 (+25%)
Mutual labels:  astronomy
kaggle-plasticc
Solution to Kaggle's PLAsTiCC Astronomical Classification Competition
Stars: ✭ 50 (+13.64%)
Mutual labels:  astronomy
UnitfulAstro.jl
An extension of Unitful.jl for astronomers.
Stars: ✭ 18 (-59.09%)
Mutual labels:  astronomy
heyoka
C++ library for ODE integration via Taylor's method and LLVM
Stars: ✭ 151 (+243.18%)
Mutual labels:  astronomy

SwiftAAAA.jsQLFitsFITSImporterObjCFITSIO

QLFits 3

Install with Homebrew:

brew cask install qlfits

Description

QLFits is a macOS Quicklook plugin for FITS (Flexible Image Transport System) files, used by astronomers worldwide to store and share their data. It is for macOS 10.8 and up.

QLFits 3 is an entirely new implementation of QLFits, using the open-source projects ObjCFITSIO and AstroCocoaKit written by yours truly.

QLFits3 reads the following extensions: fits, fit, fts, ft, mt, imfits, imfit, uvfits, uvfit, pha, rmf, arf, rsp, pi. If your FITS file is not recognized, let me know (cedric at onekiloparsec.dev), the dynamic macOS type of your file might not be included in the list. See below to see what dynamic types QLFits3 recognises.

QLFits3 show all HDU headers, and draw (when possible) all 2D images and 1D spectra.

Et voilà! Enjoy seeing the content of your FITS files in the Finder:

It is released open source under the GNU General Public Licence.

Installation

Download the latest binary

Put the QLFits3.qlgenerator bundle either in /Library/QuickLook or in ~/Library/QuickLook (but only if your are an a system older than macOS 10.10 Yosemite for the latter) and run the (safe and instantaneous) command: qlmanage -r to reset the quicklook daemon.

Contribute!

If you want to contibute, you need:

  • A recent Mac
  • A copy of Xcode (Xcode 8, as of now, December 2016, but Xcode 7 should also work)
  • Some knowledge of Objective-C and C... and FITS!

Then,

  1. Simply fork this project on GitHub,
  2. run carthage update to grab the ObjectFITSIO framework. See this page if you don't know Carthage.
  3. Open QLFits3.xcodeproj and make your modifications (I can help),
  4. Test – see Debug below (I can also help, if time permits, business as usual),
  5. Submit a pull request (via GitHub)!

How to debug (manually)

  • Build your (modified) QLFits3. Now, a new version is being put in ~/Library/QuickLook
  • Navigate in the Finder to look for a FITS file, and press .
  • Or run the command qlmanage -p[-t] <path/to/fits/file> to test previews (vs thumbnails) from the Terminal.

How to debug (advanced)

Note: What follows is supposed to work, but a bug in macOS prevents it, and I never found a real workaround. (The error message being the following: "*** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xaf03, name = 'com.apple.CFPasteboardClient'")

The idea is first to locate the qlmanage binary file, and include it as the "Executable" in the "Run" section of the "QLFits3" scheme. To do so:

  • Edit the "QLFits3" scheme in Xcode, select the "Run" section, "Info" tab.
  • Choose "Other..." in the drop "Executable" down menu, a 'Open Dialog' will open.
  • Type open -a Finder /user/bin/ in a Terminal and locate the qlmanage alias.
  • Drag & Drop the qlmanage executable from the Finder anywhere in the Open Dialog.
  • Click "Choose" and close the dialog.

Now one can "Run" the QLFits3 project from within Xcode. But we haven't yet told it what to do exactly at run. So go back to the QLFits3 scheme, and choose the 'Arguments' tab of the same "Run" section. In the section "Arguments Passed On Launch" add -p <path/to/any/of/your/fits/file>

Use -t to create thrumbnails instead of previews. You can put multiple entries here, but only the first selected one will be used once qlmanage runs.

Project Notes For Developers

Note that you can use FITSImporter, the macOS Spotlight plugin for FITS file as good companion.

  • There is a Copy Files build phase that puts the Debug build of Provisioning.qlgenerator in your /Library/QuickLook folder.

  • QuickLook plug-ins sometimes don't like to install. Learn to use "qlmanage -r" to reset the daemon. Using "qlmanage -m plugins" will tell you if the plug-in has been recognized. Sometimes you have to login and out before the plug-in is recognized.

macOS dynamic types

For custom or special file extensions, macOS assign dynamic types. QLFits3 contains a list of such types to allow it to recognize them (in addition to the filename extensions). See Info.plist file inside QLFits3.qlgenerator in case of doubt. To check the dynamic type of your FITS file, open a Terminal and type the following command mdls <path/to/your/file> | grep kMDItemContentType. You shluld obtain something like kMDItemContentType = "dyn.ah62d4rv4ge80q4pysq".

List of known extensions:

  • gov.nasa.gsfc.fits
  • gov.nasa.gsfc.fits-header
  • com.sao.SAOImageDS9
  • dyn.ah62d4rv4ge80q4pysq
  • dyn.ah62d4rv4ge80q4py
  • dyn.ah62d4rv4ge80q7a
  • dyn.ah62d4rv4ge8047a
  • dyn.ah62d4rv4ge81a4db
  • dyn.ah62d4rv4ge80c6xg
  • dyn.ah62d4rv4ge81e5pg
  • dyn.ah62d4rv4ge81e65u
  • dyn.ah62d4rv4ge81a4k
  • dyn.ah62d4rv4ge80w5pgrf4a
  • dyn.ah62d4rv4ge81n7xgrf4a
  • dyn.ah62d4rv4ge80w5pgrf4hg
  • dyn.ah62d4rv4ge81n7xgrf4hg
  • dyn.ah62d4rv4ge80262
  • dyn.ah62d46dzqm0gw23ssz1gw8brqz6gn25zsvu0e5dfhk2x43xmsu
  • dyn.ah62d46dzqm0gw23ssz1gw8brqz6gn25zsvu0e5dfhk2x43xmsv3u

Author

Cédric Foellmi (@onekiloparsec)

LICENSE & NOTES

QLFits is licensed under the MIT license and hosted on GitHub at https://github.com/onekiloparsec/QLFits/ Fork the project and feel free to send pull requests with your changes!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].