• Non ci sono risultati.

Exercise 5

N/A
N/A
Protected

Academic year: 2021

Condividi "Exercise 5"

Copied!
5
0
0

Testo completo

(1)

Exercise 5

Derive V extinction through least square fitting

Suppose you have observed a (standard) star at different  airmasses and you  have obtained the following values Airmass      V magnitude

1.10      10.40 1.24      10.41 1.44      10.50 1.58      10.53 1.63      10.55 1.72      10.61 1.98      10.66 2.03      10.71

1) create a graph showing V_mag versus Airmass. (You must 

set a value for psym to have single points plotted!)

(2)

2) use linfit command in IDL to obtain the coefficients a and b of the best fit line to data       where x correspond to  the airmasses and y to the corresponding measured V 

magnitudes.   a dimension is magnitude/airmass (i.e. the so  called extinction coefficient)      

3) Understand the meaning of the parameters chisqr and prob  provided  by linfit and evaluate the goodness of the fit.

4) Make a plot showing the residuals to the fit (i.e. y­y_fit versus  y_fit).

5) Overplot the best fit line on original graph (point [1]).

6) Derive the best linear fit for the (inverse) relation (i.e. Airmass  versus V mag) to obtain the value for the correlation 

coefficient   

7)  Write a procedure which makes all this.

y

i

=a x

i

b

(3)

 How to create an IDL  procedure (script)

With a text editor (nedit, emacs, xemacs...) create (and  save) a file coventianally named with the extension pro For example linearfit.pro or ese4.pro or extinction.pro or... 

whatever

Write all your instructions (one for line) To execute the script you must digit Idl> .run extinction.pro

if the first row of the  instructions is pro extinction Then to execute your script you must digit 

idl>extinction

(4)

  Exercise 5.... continue...

 8) what happens to your fit if you use only half of the         data? 

 ­ Randomly select for 5 times  4 of your 8 points

 ­    Make a fit and derive the average value for a and its  dispersion. 

(To randomly select 4 data you can use the command 

randomu(x,4). X is the seed (a number that you choose)

Try  idl>randomu(100,4) or randomu(21,4) or whatever

See how works and then find the way to use this result to

pick up your data.

(5)

pro randomselect k=0

while (k le 4) do begin

ind=fix(randomu(seed,4)*7) ind=ind(sort(ind))

if(ind(0) lt ind(1) and ind(1) lt ind(2) and ind(2) lt ind(3)) then begin k=k+1

if(k eq 1) then begin ind1=ind

endif

if(k eq 2) then begin ind2=ind

endif

if(k eq 3) then begin ind3=ind

endif

if(k eq 4) then begin ind4=ind

endif endif endwhile End

---

PS fix e' un'illuminazione di Robin

Riferimenti

Documenti correlati

The cortical stimulation during denomination test (Laiacona-Capitani) elicited semantic paraphasias (tag 3) at the level of the posterior thirds of the inferior temporal sulcus

Case presentation: We report a case of severe osteoarticular Blastomycosis occurring in a 3-years-old presented to our Emergency Department with pain and swelling of the left

Per  far  si  che  Emacs  visualizzi  automaticamente  il  numero  di  riga  e  di  colonna,  basta  aggiungere  nel  file  di  configurazione  (~/.emacs)   

11) go back to the original data (saved in the script) and 

Aims The two main symptoms referred by chronic heart failure (HF) patients as the causes of exercise termination during maximal cardiopulmonary exercise testing (CPET) are

LearningToAdapt with Word Embeddings: Domain Adaptation of Named Entity Recognition Systems.. Final publisher’s version (to

* Computation of the input resistance of a bipolar transistor amplifier... * Evaluation of the input-output relationship of

▷ Literature currently offers a number of solutions based on BoW (Harris, Word’54) A text is a vector of ambiguous keywords :. ▷ LDA/LSI (Huffman, NIPS’10) and Word Embeddings