ESPRIT… …es-tu là? Séminaire Astroqueyras / Meudon 29-30 Mai 2004

Download Report

Transcript ESPRIT… …es-tu là? Séminaire Astroqueyras / Meudon 29-30 Mai 2004

ESPRIT…
…es-tu là?
Séminaire Astroqueyras / Meudon
29-30 Mai 2004
Olivier Thizy
© Olivier THIZY / CALA & AstroQueyras - 2003
Agenda

Théorie du Traitement ESPRIT [14h-15h]
–
–
–
–
–
Linux / Installation
Quelques Outils (FitsView, DISP)
GEOMETRY
WCAL
EXTRACT
© Olivier THIZY / CALA & AstroQueyras - 2003
ESPRIT
Echelle Spectra Reduction: an Interactive Tool
 Programmes écrits (en C) par Mr Donati
 Dédiés à la réduction automatique de
spectres polarisés ou non
 extraction optimale du spectre à échelle

– forme des ordres est non linéaire
– projection de la fente n’est pas parallèle aux
lignes ou colonnes du capteur CCD

Tourne sous Unix ou Linux
© Olivier THIZY / CALA & AstroQueyras - 2003
Trois programmes en Un

GEOMETRY
– Calcul de la géométrie du spectre dans l’image.

WCAL (Wavelength CALibration)
– Calibration en longueur d’onde de l’image (pour chaque
ordre, modèle 2D)

EXTRACT
– Extraction optimale du signal spectral

Et en bonus:
– HPF: extraction d’une coupe de l’image
– DISP: affichage spectres
© Olivier THIZY / CALA & AstroQueyras - 2003
Installation
Marche sous Mandrake 9.0… mais doit aussi
marcher sous RedHat, Mac OS 10…
 Nécessite PGPLOT (compilateur Fortran!)
 Script d’installation de Jean-Bernard Emond
 Procédure d’installation et d’utilisation en
cours de rédaction (voir travaux pratiques)
 Avoir son «Linux pour les nuls» avec soi !!! 
 Utiliser FITSView pour visualiser les images
http://www.nrao.edu/software/fitsview/

© Olivier THIZY / CALA & AstroQueyras - 2003
Fichiers Utiles

ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz
– Programme PGPLOT (graphiques sous Linux)






display.tar
– quelques programmes de visualisation
ech.tar
– logiciel Esprit proprement dit
lib.tar
– bibliothèque de programmes utilisés par Esprit
data.zip
– les fichiers exemples fournis par Coralie Neiner (pas indispensables,
mais utiles pour suivre les exemples de la procédure…)
thar.arc
– fichiers des raies théorique du Thorium-Argon
l'atlas papier du Thorium-Argon (scan PDF)
– indispensable pour s'y retrouver dans cette "jungle" de raies!!!
© Olivier THIZY / CALA & AstroQueyras - 2003
FITSView
© Olivier THIZY / CALA & AstroQueyras - 2003
DISP




F: spectre/graphe complet (Full)
K: sélection zone au clavier (Keyboard)
M: sélection zone à la souris (Mouse)
G: ajustement Gaussien & calcul de centre
© Olivier THIZY / CALA & AstroQueyras - 2003
Ecran de travail
Jean-Pierre dubitatif devant Linux… 
© Olivier THIZY / CALA & AstroQueyras - 2003
Images Test (Coralie, 1998)
Mus98a057: Offset
 Mus98a119: ThAr
 Mus98a120: Flat

Mus98a108: Psi Ori; B2
 Mus98a110: Ome Ori; B3 ; Ha en émission
 Mus98a111: Alp Tau; K5; beaucoup de raies

© Olivier THIZY / CALA & AstroQueyras - 2003
Trucs & Astuces…
Ordre Croissant
Bleu
(-serré)
Rouge
(+serré)
Bleu
Longueurs d’onde croissantes
© Olivier THIZY / CALA & AstroQueyras - 2003
Rouge
Géométrie…
100
Bleu
(-serré)
Rouge
(+serré)
Ordre
#86
Ordre
#85
1024
Ligne=500
Y
X=25
(réf=bord)
X
50
© Olivier THIZY / CALA & AstroQueyras - 2003
1024
50
Longueur d’Onde croissante
Écart=12
Truc!
Orientation
Y
Y
Dispersion le long des colonnes: N (no)
X
© Olivier THIZY / CALA & AstroQueyras - 2003
Dispersion le long des colonnes: Y (yes)
X
Paramètres ‘geom_r.in’
Zone utile: 50 1024 0 1024
 Orientation: Y N Y

– Dispersion le long des colonnes CCD: Y
– Longueurs d’onde augmentent avec les pixels:N
– ‘Flip’ des images: Y

Position des ordres: 25 12 85 1 30
© Olivier THIZY / CALA & AstroQueyras - 2003
Où suis-je… Dans quelle…
© Olivier THIZY / CALA & AstroQueyras - 2003
Spectre ThAr (catalogue)
© Olivier THIZY / CALA & AstroQueyras - 2003
Eureka !!!
Ordre
86
Ordre
85
© Olivier THIZY / CALA & AstroQueyras - 2003
Paramètres ‘geom_r.in’











../data/mus98a120.fits
../data/mus98a119.fits
n
../data/mus98a057.fits
50 1024 0 1024
yny
25 12 85 1 30
n
geom_r.dat
y
mus119.s
© Olivier THIZY / CALA & AstroQueyras - 2003
Flat
ThAr (ou spectre à faire!)
pas utilisé
Offset
Zone utile
Orientation
Position des ordres
Correction ‘slit curvature’
Fichier coefficients modèle
Sauvegarde fichier spectre
Fichier sauvegarde spectre
Fichier résultat
Le fichier ‘spectre’ peut être visualisé avec
DISP. Normalement, on cherche les raies du
spectre de la lampe de référence (ThAr) mais
on peut aussi faire le traitement d’un spectre
stellaire
 Le fichier ‘coefficients’ servira pour la suite

© Olivier THIZY / CALA & AstroQueyras - 2003
Modèle polynomial des ordres
Polynome ajusté
Y
Yo
D
Ordre k0
Ordre k
Ordre k+1
Vers le rouge,
les ordres
se resserrent
X
Colonne de référence X=500
(paramètre à changer en 1000 pour St Véran)
© Olivier THIZY / CALA & AstroQueyras - 2003
Vérification géométrie
© Olivier THIZY / CALA & AstroQueyras - 2003
Sortie Geometry (1/2)
Byte swap on FITS files
Flat field exposure :
Name of file to read FITS data from : ../Data/mus98a120.fits ('Flat
')
Comparison :
Name of file to read FITS data from : ../Data/mus98a119.fits ('ThAr
')
Fabry-Perot :
Name of file to read FITS data from : no fabry-perot exposure provided
Offset :
Name of file to read FITS data from : ../Data/mus98a057.fits ('Bias frame
')
Full CCD is [1124:1124]
Input CCD subformat (pix0, npix for each axis) : 50 1024 0 1024
Is dispersion along CCD columns (y/n) : yes
Is wavelength increasing with pixel along orders (y/n) : no
Do you want to invert orders (y/n) yes
Trimming and transforming data files...
Trimming and transforming data files...
Trimming and transforming data files...
Removing offset...
Accuracy of 2d offset fit : 0.25 ADU; Readout noise : 2.00 ADU
Centre point of first order (at row #500) : 25.00
Approximate separation between orders : 12
Number of first order and order increment towards top of CCD : 85 1
Maximum
number
of orders
[default = 100] : 30
© Olivier THIZY
/ CALA &
AstroQueyras
- 2003
Sortie Geometry (2/2)
Counting and locating orders...
Found 30 orders on CCD
Order # 85 is centred at column # 25.0
Order # 86 is centred at column # 37.0
Order # 87 is centred at column # 49.3
Order # 88 is centred at column # 61.6
…
Measuring order curvature...
Rms accuracy of 2d fit to order location : 0.040 pix
Building coordinate system...
Looking for columns with more than 11.00% of maximum flux...
Order # 85 : columns -2.0 to 2.0
Order # 86 : columns -2.0 to 2.0
Order # 87 : columns -2.0 to 2.0
Order # 88 : columns -2.0 to 2.0
…
Correcting pixel to pixel sensitivity differences...
Do you want to correct slit curvature (y/n) : no
Name of file to save geometry info to : geom_r.dat
Do you want to save the reduced comparison spectrum (y/n) : yes
Collapsing frame columns...
Name of file to save Stokes profiles to : mus119.s
© Olivier THIZY / CALA & AstroQueyras - 2003
‘geom_r.in’ à StVéran…











../stveran/FLAT1.FIT
../stveran/ZETTAU1.FIT
n
../stveran/BIAS1.FIT
0 2000 0 2000
ynn
876 31 85 1 20
n
geom_r.dat
y
zettau.s
© Olivier THIZY / CALA & AstroQueyras - 2003
Recouvrement des ordres
Ordre
N
Ordre
N+1
© Olivier THIZY / CALA & AstroQueyras - 2003
Nos raies de référence…
Ordre
85
Ordre
86
© Olivier THIZY / CALA & AstroQueyras - 2003
L2
L1
WCAL…
L1=658.3906 X1=102.5799
L2=664.3790 X2=699.7462
Dispersion = (L2-L1)/(X2-X1)
= 0.010028 nm/pixel
L0 = L1-Dispersion*X1
= 657.362 nm
L0
L1
L1
X1
X2
© Olivier THIZY / CALA & AstroQueyras - 2003
Paramètres ‘wcal_r.in’







mus119.s
30
85 1
85 657.362 0.010028
thar.arc
th_r.ws
calib_r.dat
© Olivier THIZY / CALA & AstroQueyras - 2003
Fichier de raies Musicos
Nbre d’ordres
1er ordre & incrément
N° ordre, L0, Dispersion
Catalogue de raies
Spectre de raies calibré
Modèle 2D de calibration
Sortie Wcal (1/4)
Uncalibrated spectrum of comparison lamp : Name of file to read Stokes I profiles from : mus119.s
How many orders in the spectrum : 30
Number of starting order (pix 0 to 1023) and order increment : 85 1
Order to be calibrated first : 85
Approx lam0 (nm) and disp. (nm/pix) for order #85 : 657.3620 0.010003
Name of file to read th-ar line wavelengths from : thar.arc
Identifying comparison lines in order #85...
Line @ 657.6122 nm not found in spectrum
…
(X1)
Feature @ pix 102.58 (~658.3903 nm) identified as line @ 658.3906 nm
Line @ 658.4372 nm not found in spectrum
…
Feature @ pix 699.74 (~664.3699 nm) identified as line @ 664.3698 nm
(X2)
…
Preliminary calibration of order #85 : rms acc. 0.83 pm
(pix0 = 657.4729; dlam = 0.009888)
Identifying comparison lines in order #86...
…
Line @ 658.0230 nm not found in spectrum
Feature @ pix 884.74 (~658.3904 nm) identified as line @ 658.3906 nm
…
© Olivier THIZY / CALA & AstroQueyras - 2003
Sortie Wcal (2/4)
…
Feature @ pix 903.38 (~496.8759 nm) identified as line @ 496.8755 nm
Feature @ pix 922.22 (~497.0073 nm) identified as line @ 497.0079 nm
Feature @ pix 952.16 (~497.2151 nm) identified as line @ 497.2160 nm
Preliminary calibration of order #114 : rms acc. 1.05 pm
(pix0 = 490.2853; dlam = 0.007379)
Rejecting blended lines...
Order #85 :
Line @ 657.7215 nm rejected
Line @ 658.8539 nm rejected
Line @ 659.1484 nm rejected
Line @ 661.3374 nm rejected
Line @ 666.4051 nm rejected
Order #86 :
Line @ 655.8876 nm rejected
Line @ 657.7215 nm rejected
Line @ 658.8539 nm rejected
Line @ 659.1484 nm rejected
Order #87 :
Line @ 643.8916 nm rejected
…
© Olivier THIZY / CALA & AstroQueyras - 2003
Sortie Wcal (3/4)
…
Calibrating orders #85 to #114...
>>> Mean rms accuracy : 1.24 pm
Rms accuracy of order #85 calibration : 0.86 pm (max dev : 1.89 pm)
Mean spectral resolution in order #85 : 36145
Rms accuracy of order #86 calibration : 0.83 pm (max dev : 1.71 pm)
Mean spectral resolution in order #86 : 36732
Line @ 643.7761 pm rejected (dev = -7.57 pm)
Line @ 648.1302 pm rejected (dev = -15.14 pm)
Line @ 649.3778 pm rejected (dev = 17.33 pm)
Rms accuracy of order #87 calibration : 1.60 pm (max dev : 3.91 pm)
Mean spectral resolution in order #87 : 36562
Line @ 643.7761 pm rejected (dev = -10.44 pm)
Rms accuracy of order #88 calibration : 1.16 pm (max dev : 2.44 pm)
Mean spectral resolution in order #88 : 38170
Rms accuracy of order #89 calibration : 1.44 pm (max dev : 3.66 pm)
…
© Olivier THIZY / CALA & AstroQueyras - 2003
Sortie Wcal (4/4)
…
Checking calibration from orders overlap...
Overlap accuracy between orders #86 and #85 :
-0.06 pix @ 658.3906 nm (respective shifts of -0.73 pm and -0.12 pm)
-0.03 pix @ 659.3939 nm (respective shifts of -0.24 pm and 0.06 pm)
Overlap accuracy between orders #87 and #86 :
0.38 pix @ 650.6987 nm (respective shifts of 1.95 pm and -1.71 pm) WARNING!!
0.01 pix @ 650.9050 nm (respective shifts of 0.61 pm and 0.55 pm)
0.12 pix @ 651.2364 nm (respective shifts of 1.40 pm and 0.24 pm)
0.01 pix @ 651.3846 nm (respective shifts of 0.67 pm and 0.61 pm)
Overlap accuracy between orders #88 and #87 :
0.07 pix @ 643.1555 nm (respective shifts of 0.00 pm and -0.67 pm)
-0.43 pix @ 644.1899 nm (respective shifts of -2.44 pm and 1.65 pm) WARNING!!
0.11 pix @ 644.3860 nm (respective shifts of 0.79 pm and -0.31 pm)
…
Name of file to save Stokes profiles to : th_r.ws
Name of file to save calibration table from : calib_r.dat
© Olivier THIZY / CALA & AstroQueyras - 2003
Wcal – check ok ?
© Olivier THIZY / CALA & AstroQueyras - 2003
Wcal – check pas ok ?
© Olivier THIZY / CALA & AstroQueyras - 2003
Spectre de raies calibré
Note: on voit bien le recouvrement des ordres…
© Olivier THIZY / CALA & AstroQueyras - 2003
Paramètres EXTRACT











../Data/mus98a110.fits
../Data/mus98a120.fits
../Data/mus98a057.fits
geom_r.dat
52
y
10
y
calib_r.dat
n
mus110.spc
© Olivier THIZY / CALA & AstroQueyras - 2003
Image spectre à extraire
Image Flat
Image Offset
Résultat GEOMETRY
Gain & Bruit (???)
Extraction Optimale ?
Seuil
Calibration disponible ?
Résultat WCAL
Normalisation ?
Fichier de sortie
Sortie Extract (1/2)
Byte swap on FITS files
Stellar exposure :
Name of file to read FITS data from : ../Data/mus98a108.fits ('HD35715
')
Flat field :
Name of file to read FITS data from : ../Data/mus98a120.fits ('Flat
')
Offset :
Name of file to read FITS data from : ../Data/mus98a057.fits ('Bias frame
')
Name of file to read geometry info from : geom_r.dat
Detector gain (e/ADU) and read-out noise (e) : 5.000 2.000
Optimal extraction of spectrum (y/n) : yes
Rejection threshold [default = 10.0] : 10.0
Trimming and transforming data files...
Trimming and transforming data files...
Trimming and transforming data files...
Removing offset...
Accuracy of 2d offset fit : 0.25 ADU; Readout noise : 2.00 ADU
Setting up error bars array...
Building coordinate system...
Looking for columns with more than 2.00% of maximum flux...
Order # 85 : columns -2.5 to 2.5
Order # 86 : columns -2.5 to 2.5
…
© Olivier THIZY / CALA & AstroQueyras - 2003
Sortie Extract (2/2)
…
Order #113 : columns -3.0 to 2.5
Order #114 : columns -3.0 to 2.5
Correcting pixel to pixel sensitivity differences...
Removing background...
Accuracy of 2d background fit : 2.55 ADU
Normalising to flat field flux...
Optimal extraction of spectrum...
Extracting order #85
Rejecting pixel @ [ 39: 873] (val : 2.362e-02, dev : 23.74 sig)
Rejecting pixel @ [ 43: 945] (val : 1.509e-02, dev : 23.61 sig)
…
Do you have calibration information : yes
Name of file to read calibration table from : calib_r.dat
Correcting wavelength scale from Earth motion...
Some information is missing in file headers
Do you want spectrum continuum to be normalised : no
Displaying SN statistics...
Signal to noise ratio in order # 114 : I> 210
Signal to noise ratio in order # 113 : I> 210
Signal to noise ratio in order # 112 : I> 220
…
© Olivier THIZY / CALA & AstroQueyras - 2003
(page suivante)
Extraction des ordres
© Olivier THIZY / CALA & AstroQueyras - 2003
Exemple de spectre
Doublet
Sodium
mus108: Omi Ori
© Olivier THIZY / CALA & AstroQueyras - 2003
Ha
Exemple de spectre
© Olivier THIZY / CALA & AstroQueyras - 2003
Recouvrement
H-alpha
© Olivier THIZY / CALA & AstroQueyras - 2003
Recouvrement (détail)
© Olivier THIZY / CALA & AstroQueyras - 2003
Et pour les frustrés de Linux…
© Olivier THIZY / CALA & AstroQueyras - 2003
Et maintenant:
travaux pratiques !!!
© Olivier THIZY / CALA & AstroQueyras - 2003