Convertir un spectre au format FITS en ASCII simple et réciproquement

  • Exporter un spectre au format FITS IRAF en format ASCII simple :
--> wspectext reference/mthar_b.ms.fits[*,1] reference/mthar_b.s
  • Attention à ne pas oublier [*,1] après le nom de fichier, sinon IRAF renvoie l'erreur : WARNING: reference/mthar_b.ms.fits is not one dimensional
  • Ce fichier peut alors être importé sous python par exemple avec numpy.loadtxt
  • Importer un spectre au format ASCII simple (tel que fourni par POLLUX ou VizieR) en format FITS IRAF :
--> onedspec
--> rspectext 5700_4.4_convol.s 5700_4.4_convol.ms.fits