def grid_getmatch_423to404(self, ratio, eratio):
         match,indbest,chi2r = grid_fitter.grid_getmatch(ratio, eratio,
                                                         self.modelratio_423_404)
         return chi2r
 def grid_getmatch_322to321(self, ratio, eratio):
         match,indbest,chi2r = grid_fitter.grid_getmatch(ratio, eratio,
                                                         self.modelratio2)
         return chi2r
Exemplo n.º 3
0
 def grid_getmatch_line(self, tline, etline, transition):
         match,indbest,chi2r = grid_fitter.grid_getmatch(tline, etline,
                                                         self.tline[transition])
         return chi2r
 def grid_getmatch_404to303(self, ratio, eratio):
         match,indbest,chi2r = grid_fitter.grid_getmatch(ratio, eratio,
                                                         self.modelratio_404_303)
         return chi2r
 def grid_getmatch_322to321(self, ratio, eratio, chi2_thresh=1):
     match, indbest, chi2r = grid_fitter.grid_getmatch(
         ratio, eratio, self.modelratio2, chi2_thresh=chi2_thresh)
     return chi2r
 def grid_getmatch_322(self, taline322, etaline322, chi2_thresh=1):
     match, indbest, chi2r = grid_fitter.grid_getmatch(
         taline322, etaline322, self.tline322, chi2_thresh=chi2_thresh)
     return chi2r
Exemplo n.º 7
0
 def grid_getmatch_322to321(self, ratio, eratio, chi2_thresh=1):
         match,indbest,chi2r = grid_fitter.grid_getmatch(ratio, eratio,
                                                         self.modelratio2,
                                                         chi2_thresh=chi2_thresh)
         return chi2r
 def grid_getmatch_322to321(self, ratio, eratio):
     match, indbest, chi2r = grid_fitter.grid_getmatch(
         ratio, eratio, self.modelratio2)
     return chi2r
 def grid_getmatch_423to404(self, ratio, eratio):
     match, indbest, chi2r = grid_fitter.grid_getmatch(
         ratio, eratio, self.modelratio_423_404)
     return chi2r
 def grid_getmatch_404to303(self, ratio, eratio):
     match, indbest, chi2r = grid_fitter.grid_getmatch(
         ratio, eratio, self.modelratio_404_303)
     return chi2r
xx,yy,zz = (90-1, 110-1, 110-1) # low dens, high *column* std but low *dens* std

cont1 = cont11[yy,xx]
cont2 = cont22[yy,xx]
tline1 = cube1.cube[zz,yy,xx]
tline2 = cube2.cube[zz,yy,xx]
etline1 = cube1.errorcube[zz,yy,xx]
etline2 = cube2.errorcube[zz,yy,xx]

pargrid1 = (cont1*np.exp(-taugrid1) + (1-np.exp(-taugrid1))*texgrid1)
pargrid2 = (cont2*np.exp(-taugrid2) + (1-np.exp(-taugrid2))*texgrid2)
#spec = (1.0-np.exp(-np.array(tau_nu_cumul)))*(Tex-Tbackground)

match, indbest, chi2 = grid_2p_getmatch(tline1+cont1, etline1, pargrid1,
                                        tline2+cont2, etline2, pargrid2)
match11, indbest11, chi2_11 = grid_getmatch(tline1+cont1, etline1, pargrid1)
match22, indbest22, chi2_22 = grid_getmatch(tline2+cont2, etline2, pargrid2)

bw,bz,by,bx = np.unravel_index(indbest, pargrid1.shape)

pl.jet()

pl.clf()
extent = [densityarr.flat[0],densityarr.flat[-1],
          columnarr.flat[0],columnarr.flat[-1]]
pl.imshow(pargrid1[bw,bz,:,:], alpha=0.5, extent=extent)
pl.contour(densityarr[bw,bz,:,:],columnarr[bw,bz,:,:],
           pargrid2[bw,bz,:,:], levels=np.linspace(tline2-20*etline2+cont2,
                                                   tline2+20*etline2+cont2,
                                                   10))