Создание S1D файла с Python
У меня есть файл.fits, в котором простая команда IRAF specplot filename.fits будет отображать спектры. Я просто не могу найти ту же информацию в.fits, которые будут нанесены на python.
import matplotlib.pyplot as plt
from astropy.io import fits
hdulist = fits.open('s1d_spectra.fits')
Arb_I = hdulist[0].data #This gives me the y-axis flux
plt.plot(scidata)
# I need the wavelength (x-axis) but I am unable to find it, I think
# it is inside hdulist[0].SOMETHING
Это всего лишь часть, заголовок огромен! Длина волны где-то, потому что IRAF ловит ее, а python - нет. Не могли бы вы объяснить мне немного больше.
SIMPLE = T / file does conform to FITS standard
BITPIX = -32 / number of bits per data pixel
NAXIS = 1 / number of data axes
NAXIS1 = 313130 / length of data axis 1
EXTEND = T / FITS dataset may contain extensions
COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
CRPIX1 = 1. / Reference pixel
CRVAL1 = 3781.52 / Coordinate at reference pixel
CDELT1 = 0.01 / Coordinate increment par pixel
CTYPE1 = 'Angstrom' / Units of coordinate
BUNIT = 'Relative Flux' / Units of data values
ORIGIN = 'TEST ' / European Southern Observatory
DATE = '2010-08-03T01:27:08.465' / Date this file was written
TELESCOP= 'ESO-3P6 ' / ESO Telescope Name
INSTRUME= 'HARPS ' / Instrument used
OBJECT = 'HD40307 ' / Target description
RA = 88.519790 / 05:54:04.7 RA (J2000) pointing
DEC = -60.02382 / -60:01:25.7 DEC (J2000) pointing
EQUINOX = 2000. / Standard FK5 (years)
RADECSYS= 'FK5 ' / Coordinate reference frame
EXPTIME = 900.0023 / Total integration time
MJD-OBS = 53764.11115778 / MJD start (2006-01-29T02:40:04.032)
DATE-OBS= '2006-01-29T02:40:04.032' / Date of observation
UTC = 9599.000 / 02:39:59.000 UTC
LST = 23394.476 / 06:29:54.476 LST
PI-COI = 'Mayor ' / PI-COI name.
ORIGFILE= 'HARPS_ech_obs_all_0012.fits' / Original File Name
UT = '02:39:59.000' / UT at start
ST = '06:29:54.476' / ST at start
AIRMASS = 1.17000 / Averaged air mass
IMAGETYP= 'STAR,WAVE,K3' / Observation type
HIERARCH ESO OBS DID = 'ESO-VLT-DIC.OBS-1.11' / OBS Dictionary
HIERARCH ESO OBS GRP = 'HARPS ' / linked blocks
HIERARCH ESO OBS ID = 13 / Observation block ID
HIERARCH ESO OBS NAME = 'OB_SC_13' / OB name
HIERARCH ESO OBS PI-COI ID = 0 / ESO internal PI-COI ID
HIERARCH ESO OBS PI-COI NAME = 'Mayor ' / PI-COI name
HIERARCH ESO OBS PROG ID = '072.C-0488(E)' / ESO program identification
HIERARCH ESO OBS START = '2006-01-29T02:36:46' / OB start time
HIERARCH ESO OBS TARG NAME = 'HD40307 ' / OB target name
HIERARCH ESO OBS TPLNO = 2 / Template number within OB
HIERARCH ESO TPL DID = 'ESO-VLT-DIC.TPL-1.9' / Data dictionary for TPL
HIERARCH ESO TPL EXPNO = 1 / Exposure number within template
HIERARCH ESO TPL ID = 'HARPS_ech_obs_all' / Template signature ID
HIERARCH ESO TPL NAME = 'HARPS_ech_obs_thosimult' / Template name
HIERARCH ESO TPL NEXP = 1 / Number of exposures within templat
HIERARCH ESO TPL PRESEQ = 'HARPS_ech_obs_all.seq' / Sequencer script
HIERARCH ESO TPL START = '2006-01-29T02:39:55' / TPL start time
HIERARCH ESO TPL VERSION = '1.0 ' / Version of the template
HIERARCH ESO DPR CATG = 'SCIENCE ' / Observation category
HIERARCH ESO DPR TECH = 'ECHELLE ' / Observation technique
HIERARCH ESO DPR TYPE = 'STAR,WAVE,K3' / Observation type
HIERARCH ESO TEL AIRM END = 1.178 / Airmass at end
HIERARCH ESO TEL AIRM START = 1.170 / Airmass at start
HIERARCH ESO TEL ALT = 58.648 / Alt angle at start (deg)
HIERARCH ESO TEL AMBI FWHM END= 0.60 / Observatory Seeing queried from AS
HIERARCH ESO TEL AMBI FWHM START= 0.46 / Observatory Seeing queried from AS
HIERARCH ESO TEL AMBI PRES END= 773.90 / Observatory ambient air pressure q
HIERARCH ESO TEL AMBI PRES START= 773.80 / Observatory ambient air pressure q
HIERARCH ESO TEL AMBI RHUM = 64. / Observatory ambient relative humi
HIERARCH ESO TEL AMBI TEMP = 16.25 / Observatory ambient temperature qu
HIERARCH ESO TEL AMBI WINDDIR= 182. / Observatory ambient wind directio
HIERARCH ESO TEL AMBI WINDSP = 5.95 / Observatory ambient wind speed que
HIERARCH ESO TEL AZ = 368.572 / Az angle at start (deg) S=0,W=90
HIERARCH ESO TEL CHOP ST = F / True when chopping is active
HIERARCH ESO TEL DATE = 'not set ' / TCS installation date
HIERARCH ESO TEL DID = 'ESO-VLT-DIC.TCS' / Data dictionary for TEL
HIERARCH ESO TEL DOME STATUS = 'FULLY-OPEN' / Dome status
HIERARCH ESO TEL FOCU ID = 'CA ' / Telescope focus station ID
HIERARCH ESO TEL FOCU LEN = 28.914 / Focal length (m)