Exemplo n.º 1
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1547.6, wl1)
] + [13.5, 20.3, auto.Wave2V(1551, wl2)] + [
    13, 20.3, auto.Wave2V(1547.8, wl1)
] + [13.2, 20.3, auto.Wave2V(1552.5, wl2)] + [
    13.3, 20.3, auto.Wave2V(1551.5, wl2)
] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)
     ]  #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [1, 0, 2, 1, 2, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))
Exemplo n.º 2
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[108]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[119]:

x0 = [13.5, 20.3, auto.Wave2V(1548.5, wl1)] + [
    13, 20.3, auto.Wave2V(1549.2, wl1)
] + [13.3, 20.3, auto.Wave2V(1550, wl2)] + [
    13.2, 20.3, auto.Wave2V(1549.5, wl1)
]  #+ [13, 20.3, auto.Wave2V(1552.4, wl2)] #+ [13, 20.3, auto.Wave2V(1551.67, wl2)]
feat = [0, 1, 2,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 3
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[183]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[194]:

x0 = [13, 20.3, auto.Wave2V(1547.8, wl1)] + [
    13.3, 20.3, auto.Wave2V(1548, wl1)
] + [13.3, 20.3, auto.Wave2V(1548.3, wl1)] + [
    13, 20.3, auto.Wave2V(1548.5, wl1)
] + [
    13, 20.3, auto.Wave2V(1547.2, wl1)
]  #+ [13, 20.3, auto.Wave2V(1551.2, wl2)] + [13, 20.3, auto.Wave2V(1548.7, wl1)]
feat = [0, 0, 1, 0,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 4
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1547.5, wl1)] + [
    13.3, 20.3, auto.Wave2V(1548.2, wl1)
] + [13.5, 20.3, auto.Wave2V(1548.6, wl1)] + [
    13.6, 20.3, auto.Wave2V(1552.5, wl2)
] + [
    13.5, 20.3, auto.Wave2V(1548.6, wl1)
]  #+ [13.3, 20.3, auto.Wave2V(1550.8, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] + [13.4, 20.3, auto.Wave2V(1549.4, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.5, wl2)] + [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [1, 0, 0, 2,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1549, wl1)
] + [13.5, 20.3, auto.Wave2V(1547.5, wl1)] + [
    13, 20.3, auto.Wave2V(1548.3, wl1)
] + [13.5, 20.3, auto.Wave2V(1550, wl2)] + [
    13.3, 20.3, auto.Wave2V(1548.2, wl1)
] + [13.2, 20.3, auto.Wave2V(1552, wl2)
     ]  #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 1, 1, 2, 1,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))
Exemplo n.º 6
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1547.9, wl1)] + [13.5, 20.3, auto.Wave2V(1548.2, wl1)] + [13.3, 20.3, auto.Wave2V(1548.4, wl1)] + [13.3, 20.3, auto.Wave2V(1549.3, wl1)] + [13.3, 20.3, auto.Wave2V(1547.6, wl1)] + [13.3, 20.3, auto.Wave2V(1549, wl1)] #+ [13.3, 20.3, auto.Wave2V(1551, wl2)] + [13.3, 20.3, auto.Wave2V(1552.8, wl2)] + [13.3, 20.3, auto.Wave2V(1550.4, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 1, 1, 1] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1547, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 7
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.2, wl1)
] + [13.5, 20.3, auto.Wave2V(1549.8, wl2)] + [
    13.5, 20.3, auto.Wave2V(1546.4, wl1)
] + [
    13.3, 20.3, auto.Wave2V(1548.5, wl1)
]  #+ [13.3, 20.3, auto.Wave2V(1547.6, wl1)] #+ [13.3, 20.3, auto.Wave2V(1550.5, wl2)] + [13.2, 20.3, auto.Wave2V(1551.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 2, 0,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1546, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
fn = fl / new_ctn
fne = fe / new_ctn

# In[19]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[25]:

x0 = [13.5, 20.3, auto.Wave2V(1547.9, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548, wl2)
] + [13.2, 20.3, auto.Wave2V(1548.8, wl1)] + [
    13, 20.3, auto.Wave2V(1547.5, wl1)
]  #+ [12.5, 20.3, auto.Wave2V(1551, wl2)] + [13, 20.3, auto.Wave2V(1550.4, wl2)] #+ [13, 20.3, auto.Wave2V(1550.5, wl2)]
feat = [0, 1, 1,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 9
0
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [
    14, 20.3, auto.Wave2V(1547, wl1)
] + [14, 20.3, auto.Wave2V(1547.2, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548, wl1)
] + [13, 20.3, auto.Wave2V(1546.4, wl1)] + [
    13.5, 20.3, auto.Wave2V(1550.8, wl2)
] + [13, 20.3, auto.Wave2V(1552.5, wl2)] + [
    13, 20.3, auto.Wave2V(1551.2, wl2)
]  #+ [13, 20.3, auto.Wave2V(1547.2, wl1)] + [13, 20.3, auto.Wave2V(1548.5, wl1)]
feat = [0, 0, 0, 0, 2, 2, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1546, 1553]))
Exemplo n.º 10
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.4, wl1)
] + [13.5, 20.3, auto.Wave2V(1549, wl1)] + [
    13.5, 20.3, auto.Wave2V(1550.7, wl2)
] + [13.5, 20.3, auto.Wave2V(1551, wl2)] + [
    13.5, 20.3, auto.Wave2V(1551.5, wl2)
] + [13.5, 20.3, auto.Wave2V(1552.8, wl2)] + [
    13.5, 20.3, auto.Wave2V(1552.2, wl2)
] + [13.5, 20.3, auto.Wave2V(1550, wl2)
     ] + [13.5, 20.3, auto.Wave2V(1551.8, wl2)]
feat = [0, 0, 0, 2, 2, 2, 2, 2, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
Exemplo n.º 11
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.6, wl1)
] + [13.5, 20.3, auto.Wave2V(1551.5, wl2)] + [
    13.5, 20.3, auto.Wave2V(1552, wl2)
] + [13.5, 20.3, auto.Wave2V(1552.4, wl2)] + [
    13.2, 20.3, auto.Wave2V(1549.6, wl2)
]  #+ [13.3, 20.3, auto.Wave2V(1546.4, wl1)] #+ [13.4, 20.3, auto.Wave2V(1552, wl2)] + [13.2, 20.3, auto.Wave2V(1552.5, wl2)] #+ [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 2, 2, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 12
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548.3, wl1)] + [
    13.3, 20.3, auto.Wave2V(1549, wl1)
] + [
    13.3, 20.3, auto.Wave2V(1550.3, wl2)
]  #+ [13.5, 20.3, auto.Wave2V(1548.3, wl1)] #+ [13, 20.3, auto.Wave2V(1551.5, wl2)] + [13, 20.3, auto.Wave2V(1547.8, wl1)] + [13.3, 20.3, auto.Wave2V(1552.5, wl2)]
feat = [0, 0, 2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 13
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1547.5, wl1)] + [13.5, 20.3, auto.Wave2V(1548, wl1)] + [13.5, 20.3, auto.Wave2V(1548.2, wl1)] + [13.5, 20.3, auto.Wave2V(1551, wl2)] + [13, 20.3, auto.Wave2V(1551.6, wl2)] + [13.2, 20.3, auto.Wave2V(1552.5, wl2)] + [13.2, 20.3, auto.Wave2V(1547.2, wl1)] #+ [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 2, 2, 2, 1] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1547, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 14
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548.2, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.3, wl1)
] + [13.3, 20.3, auto.Wave2V(1548.5, wl1)] + [
    13.3, 20.3, auto.Wave2V(1551.2, wl2)
]  #+ [13.3, 20.3, auto.Wave2V(1552.5, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.4, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.5, wl2)] + [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 1, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 15
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1547, wl1)] + [13.5, 20.3, auto.Wave2V(1547.2, wl1)] + [13.5, 20.3, auto.Wave2V(1547.8, wl1)] + [13.3, 20.3, auto.Wave2V(1548, wl1)] + [13.2, 20.3, auto.Wave2V(1548.6, wl1)] #+ [13, 20.3, auto.Wave2V(1549.2, wl1)] #+ [13.3, 20.3, auto.Wave2V(1552.8, wl2)] + [13.3, 20.3, auto.Wave2V(1548.2, wl1)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 0, 0] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1546, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1546, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 16
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548.2, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.3, wl1)
] + [13.5, 20.3, auto.Wave2V(1548.6, wl1)] + [
    13.4, 20.3, auto.Wave2V(1549, wl1)
] + [13.4, 20.3, auto.Wave2V(1549.3, wl1)] + [
    13.5, 20.3, auto.Wave2V(1549.5, wl1)
] + [13.5, 20.3, auto.Wave2V(1550, wl2)] + [
    13.5, 20.3, auto.Wave2V(1551.4, wl2)
] + [13.5, 20.3, auto.Wave2V(1549.2, wl1)
     ]  #+ [13.5, 20.3, auto.Wave2V(1551.8, wl2)]
feat = [1, 0, 1, 1, 1, 1, 2, 2,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
Exemplo n.º 17
0
# In[56]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[63]:


x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [13.5, 20.3, auto.Wave2V(1548.5, wl1)] + [13.5, 20.3, auto.Wave2V(1549.5, wl2)] + [13.5, 20.3, auto.Wave2V(1551.5, wl2)] #+ [13.4, 20.3, auto.Wave2V(1549.8, wl2)] #+ [13.5, 20.3, auto.Wave2V(1551.8, wl2)] + [13.5, 20.3, auto.Wave2V(1552.4, wl2)] + [13.5, 20.3, auto.Wave2V(1551.6, wl2)] + [13.5, 20.3, auto.Wave2V(1552.5, wl2)] #+ [13.5, 20.3, auto.Wave2V(1551.8, wl2)]
feat = [0, 1, 2, 2] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1547, 1553]) #normally [1547, 1553]
print(p0)


# In[64]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 18
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1546.5, wl1)] + [
    13.5, 20.3, auto.Wave2V(1547, wl1)
] + [13.5, 20.3, auto.Wave2V(1547.5, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548, wl1)
] + [13.3, 20.3, auto.Wave2V(1550.4, wl2)] + [
    13.3, 20.3, auto.Wave2V(1550.8, wl2)
]  #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] + [13.4, 20.3, auto.Wave2V(1549.4, wl2)] #+ [13.2, 20.3, auto.Wave2V(1552.5, wl2)] + [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 0, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1546, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 19
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1549.8, wl1)
] + [13.5, 20.3, auto.Wave2V(1549.5, wl1)] + [
    13.3, 20.3, auto.Wave2V(1550.4, wl2)
] + [
    13, 20.3, auto.Wave2V(1552.5, wl2)
]  #+ [13, 20.3, auto.Wave2V(1549.2, wl1)] #+ [13.3, 20.3, auto.Wave2V(1552.8, wl2)] + [13.3, 20.3, auto.Wave2V(1548.2, wl1)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 1, 1, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 20
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [13.5, 20.3, auto.Wave2V(1548.5, wl1)] + [13.4, 20.3, auto.Wave2V(1550.3, wl2)] #+ [13.5, 20.3, auto.Wave2V(1548.2, wl1)] #+ [13.3, 20.3, auto.Wave2V(1547.8, wl1)] #+ [13.3, 20.3, auto.Wave2V(1546.4, wl1)] #+ [13.4, 20.3, auto.Wave2V(1552, wl2)] + [13.2, 20.3, auto.Wave2V(1552.5, wl2)] #+ [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 1, 2] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1547, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 21
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1547.2, wl1)] + [
    13.5, 20.3, auto.Wave2V(1547.7, wl1)
] + [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.3, 20.3, auto.Wave2V(1548.3, wl1)
] + [13.4, 20.3, auto.Wave2V(1551, wl2)] + [
    13.5, 20.3, auto.Wave2V(1551.8, wl2)
] + [13.5, 20.3, auto.Wave2V(1552.4, wl2)] + [
    13.5, 20.3, auto.Wave2V(1551.6, wl2)
] + [13.5, 20.3, auto.Wave2V(1552.5, wl2)
     ]  #+ [13.5, 20.3, auto.Wave2V(1551.8, wl2)]
feat = [0, 0, 0, 0, 2, 2, 2, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
Exemplo n.º 22
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.2, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548, wl1)
] + [13.5, 20.3, auto.Wave2V(1549.5, wl2)] + [
    13.3, 20.3, auto.Wave2V(1551.4, wl2)
]  #+ [13.5, 20.3, auto.Wave2V(1549, wl1)] + [13.5, 20.3, auto.Wave2V(1552.3, wl2)] + [13.3, 20.3, auto.Wave2V(1552.8, wl2)] + [13.3, 20.3, auto.Wave2V(1548.2, wl1)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 2,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 23
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.2, wl1)
] + [
    13.5, 20.3, auto.Wave2V(1550.6, wl2)
]  #+ [13.5, 20.3, auto.Wave2V(1549, wl1)] + [13.5, 20.3, auto.Wave2V(1549.4, wl1)] + [13.5, 20.3, auto.Wave2V(1552.6, wl2)] + [13.5, 20.3, auto.Wave2V(1552.9, wl2)] #+ [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 24
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[156]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[165]:

x0 = [13.5, 20.3, auto.Wave2V(1547.8, wl1)] + [
    13, 20.3, auto.Wave2V(1548, wl1)
] + [13.3, 20.3, auto.Wave2V(1548.8, wl1)] + [
    13, 20.3, auto.Wave2V(1549.5, wl2)
] + [13, 20.3, auto.Wave2V(1550.2, wl2)] + [
    13, 20.3, auto.Wave2V(1551.2, wl2)
] + [13, 20.3, auto.Wave2V(1548.7, wl1)]
feat = [0, 0, 0, 2, 2, 2,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 25
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1547.4, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.4, wl1)
] + [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.3, 20.3, auto.Wave2V(1549.5, wl2)
] + [
    13.3, 20.3, auto.Wave2V(1547.8, wl1)
]  #+ [13.3, 20.3, auto.Wave2V(1546.4, wl1)] #+ [13.4, 20.3, auto.Wave2V(1552, wl2)] + [13.2, 20.3, auto.Wave2V(1552.5, wl2)] #+ [13.3, 20.3, auto.Wave2V(1551.5, wl2)] + [13.2, 20.3, auto.Wave2V(1550.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 2,
        0]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
Exemplo n.º 26
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[9]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[10]:

x0 = [13.5, 20.3, auto.Wave2V(1547.6, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.2, wl1)
] + [13.5, 20.3, auto.Wave2V(1548.7, wl1)] + [
    13.2, 20.3, auto.Wave2V(1549.5, wl2)
] + [12.5, 20.3, auto.Wave2V(1552.5, wl2)] + [
    13, 20.3, auto.Wave2V(1552.8, wl2)
] + [13, 20.3, auto.Wave2V(1550, wl2)
     ] + [13, 20.3, auto.Wave2V(1550.2, wl2)] + [
         13, 20.3, auto.Wave2V(1547.2, wl1)
     ] + [13, 20.3, auto.Wave2V(1548.5, wl1)]
feat = [1, 0, 0, 2, 2, 2, 2, 2, 1,
        1]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
Exemplo n.º 27
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [13.5, 20.3, auto.Wave2V(1548.2, wl1)] + [13.5, 20.3, auto.Wave2V(1547, wl1)] + [13.5, 20.3, auto.Wave2V(1547.5, wl1)] + [13.5, 20.3, auto.Wave2V(1548.3, wl1)] + [13.2, 20.3, auto.Wave2V(1549.4, wl2)] #+ [13.2, 20.3, auto.Wave2V(1549.8, wl2)] #+ [13.3, 20.3, auto.Wave2V(1547.6, wl1)] #+ [13.3, 20.3, auto.Wave2V(1550.5, wl2)] + [13.2, 20.3, auto.Wave2V(1551.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 0, 1, 1, 2, 2] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1546.8, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1546.8, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])
Exemplo n.º 28
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[59]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[61]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.5, 20.3, auto.Wave2V(1548.2, wl1)
] + [13.5, 20.3, auto.Wave2V(1548.4, wl1)] + [
    13, 20.3, auto.Wave2V(1548.7, wl1)
]  #+ [12.8, 20.3, auto.Wave2V(1547, wl1)] + [13, 20.3, auto.Wave2V(1548.1, wl1)] #+ [13, 20.3, auto.Wave2V(1550, wl2)] + [13, 20.3, auto.Wave2V(1550.2, wl2)] + [13, 20.3, auto.Wave2V(1547.2, wl1)] + [13, 20.3, auto.Wave2V(1548.5, wl1)]
feat = [0, 0, 1,
        0]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
print(p0)
Exemplo n.º 29
0
fn = fl / new_ctn
fne = fe / new_ctn

# In[464]:

#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)

# In[467]:

x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [
    13.3, 20.3, auto.Wave2V(1547.8, wl1)
] + [13.3, 20.3, auto.Wave2V(1552, wl2)] + [
    13.5, 20.3, auto.Wave2V(1550.5, wl2)
] + [13, 20.3, auto.Wave2V(1548.6, wl1)
     ] + [13, 20.3, auto.Wave2V(1552.5, wl2)]
feat = [0, 0, 2, 2, 1,
        2]  #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting,
                                x0,
                                full_output=1,
                                args=(feat, wl, wl1, wl2, f1, f2, gamma1,
                                      gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf,
                [1547, 1553])  #normally [1547, 1553]
Exemplo n.º 30
0
# In[9]:


#chi, chi_mean = auto.find_chi(wl, fl, fe, new_ctn)
#auto.plot_chi_histogram(chi, chi_mean)

#flag_chi = auto.mask_wl(wl, [1546, 1546.7, 1548, 1551.2]) # mask out regions for better calculation of chi histogram

#new_chi, new_chi_mean = auto.find_chi(wl[flag_chi], fl[flag_chi], fe[flag_chi], new_ctn[flag_chi])
#auto.plot_chi_histogram(new_chi, new_chi_mean)


# In[10]:


x0 = [13.5, 20.3, auto.Wave2V(1548, wl1)] + [13.5, 20.3, auto.Wave2V(1548.1, wl1)] + [13.3, 20.3, auto.Wave2V(1548.4, wl1)] #+ [13.3, 20.3, auto.Wave2V(1550.2, wl2)] #+ [13.3, 20.3, auto.Wave2V(1547.8, wl1)] #+ [13.5, 20.3, auto.Wave2V(1551.6, wl2)] + [13.4, 20.3, auto.Wave2V(1550.4, wl2)] #+ [13.3, 20.3, auto.Wave2V(1552.4, wl2)] #+ [13.3, 20.3, auto.Wave2V(1548.2, wl1)] #+ [13.2, 20.3, auto.Wave2V(1552.6, wl2)] #+ [13.5, 20.3, auto.Wave2V(1549.6, wl2)]
feat = [0, 0, 1] #which features used to model 0 - both, 1 - strong, 2 - weak
p0, cov, a, b, c = auto.leastsq(auto.fitting, x0, full_output=1, args=(feat, wl, wl1, wl2, f1, f2, gamma1, gamma2, lsf, fn, fne, [1547, 1553]))

auto.plot_model(p0, feat, wl, fn, wl1, wl2, f1, f2, gamma1, gamma2, lsf, [1547, 1553]) #normally [1547, 1553]
print(p0)


# In[11]:


p0 = auto.make_ten(p0)
N1, N2 = auto.make_features(p0, feat, wl, wl1, wl2, lsf, gamma1, gamma2)
Ne1 = auto.nfle2Nev(fn, fne, f1, wl1)
Ne2 = auto.nfle2Nev(fn, fne, f2, wl2)
auto.plot_features(wl, wl1, wl2, N1, N2, Ne1, Ne2, [-500, 500])