Freitag, 7. Januar 2011

FITS mit Python

Endlich mal eine einfache und scheinbar intelligente FITS-Bibliothek:
pyfits fuer Python.

Was sich mit CCFits standhaft weigerte und mit cfitsio sicher moeglich
aber ein boeser Traum ist, ging mit pyfits (ohne Vorkenntnisse) in
Minuten. So liest man aus einer FITS-Datei (uebergeben auf
Kommandozeile) mit einer Tabellen-Extension mit einer Zeile und einer
Spalte, in der ein 3D-Datacube steht, die Werte aus...
#!/usr/bin/python

import pyfits
import sys
hdulist = pyfits.open(sys.argv[1])
tbldata = hdulist[1].data
data = tbldata.field(0)[0]

for i in range(1825):
print data[i]

hdulist.close()

User Status

Du bist nicht angemeldet.

Aktuelle Beiträge

iPhone to linux
gphoto2 --port=usb -R -P copies all images from an...
danielgruen - 2. Feb, 19:46
Alternative
This screws up the bounding box of non-square plots....
danielgruen - 30. Dez, 23:22
MNRAS submission problems...
Matplotlib ps files like to contain Type 3 fonts, which...
danielgruen - 13. Apr, 19:45
PPPOE connection problems
I was facing connection problems after some technical...
danielgruen - 29. Jun, 01:51
Sort products randomly...
http://www.magentocommerce .com/boards/v/viewthread/2 32826/#t331309 nicely...
danielgruen - 1. Feb, 17:29

Links

Suche

 

Status

Online seit 5929 Tagen
Zuletzt aktualisiert: 2. Feb, 19:46

Credits


Multimedia
Profil
Abmelden
Weblog abonnieren