PRO head_twin, fitshead, wave, time ; extract keywords from Calar-Alto - twin header and decode ; to obtain wavelength and timeing arrays nwave = FXPAR(fitshead, 'NAXIS1') wave = fltarr(nwave) w0 = FXPAR(fitshead, 'WAVE_0') w1 = FXPAR(fitshead, 'WAVE_1') w2 = FXPAR(fitshead, 'WAVE_2') w3 = FXPAR(fitshead, 'WAVE_3') w4 = FXPAR(fitshead, 'WAVE_4') FOR iw = 0,nwave-1 DO BEGIN wave(iw) = w0 + w1*iw + w2*iw*iw + w3*iw*iw*iw + w4*iw*iw*iw*iw ENDFOR wave = alog10 (wave) ntime = FXPAR(fitshead, 'NAXIS2') time = dblarr(ntime) mjd = FXPAR(fitshead, 'MJD-OBS') jd = FXPAR(fitshead, 'JUL-DATE') ut0 = FXPAR(fitshead, 'TIME_STA') dt = FXPAR(fitshead, 'TIME_STE') j0 = floor(jd-0.5) - 2452000. ; print,jd,j0,ut0,dt FOR it = 0,ntime-1 DO BEGIN time(it) = j0 + ( ut0 + dt*it ) / 86400. ENDFOR END