plotter.plot_sptypes(fitter, cpar = fitter.rp['data_header']['fov_radius']) pl.xlim(9,42) pl.savefig(rp['outname']+'_sptype_byFOVradius.png') pl.xlim(9,42) plotter.plot_sptypes(fitter, cpar = fitter.rp['data_header']['NUV_exptime']) pl.xlim(9,42) pl.savefig(rp['outname']+'_sptype_byNUVexptime.png') plot_switch = False if plot_switch: gf = {'goodfit':(fitter.rp['data_header']['spType'] != '') & (fitter.max_lnprob[0,:]*(-2) < 100), 'glabel': r'spTyped $\chi^2 < 100$'} #gf = {'goodfit':(np.char.find(fitter.rp['data_header']['spType'],'WN') >=0) & (fitter.max_lnprob[0,:]*(-2) < 100), #'glabel': r'WN $\chi^2 < 100$'} plotter.plot_precision(fitter, PAR = 'LOGT', **gf) #pl.savefig('logt_unc.png') #plotter.plot_precision(fitter, PAR = 'A_V', **gf) #plotter.plot_precision(fitter, PAR = 'A_V',versus = fitter.parval['LOGT'][0,:,1], **gf) plotter.plot_precision(fitter, PAR = 'galex_NUV', **gf) plotter.plot_pars(fitter, PAR1 = 'LOGT', PAR2 = 'LOGL', loc = 4, **gf) pl.savefig(rp['outname']+'_logl_logt.png') plotter.plot_pars(fitter, PAR1 = 'LOGT', PAR2 = 'A_V', **gf) plotter.residuals(fitter, bands = [0, 1, 2, 3], colors = ['m','b','g','r'], **gf) #### Plot grid information pl.scatter(fitter.stargrid.pars['LOGT'], fitter.stargrid.sed[:,0]-fitter.stargrid.sed[:,4], c = fitter.stargrid.pars['A_V'], alpha = 0.5) pl.scatter(fitter.stargrid.sed[:,0]-fitter.stargrid.sed[:,1],
prediction_sed, tmp1, tmp2 = fitter.basel.generateSEDs(fitter.stargrid.pars, pred_filt,attenuator = dust, wave_min = 92, wave_max = 1e7) #for i in xrange(len(pred_filt)-1) : fitter.stargrid.add_par(prediction_sed[:,0] + 5.0*np.log10(rp['dist'])+25,pred_filt[0].name) fitter.rp['outparnames']+= [pred_filt[0].name] fitter.load_data() #Chhange the number of lines to extract #fitter.rp['nlines'] = 1e4 #fitter.rp['lines'] =None #fitter.load_data() fitter.fit_image() fitter.write_catalog(outparlist = ['galex_NUV', 'LOGT','LOGL', 'A_V']) gf = {'goodfit':(fitter.rp['data_header']['flag'] == 10) & (fitter.data_mag[0,:,2] +18.5 < 20.0),'glabel': 'V<20 & flag==10'} plotter.plot_precision(fitter, PAR = 'LOGT', **gf) pl.savefig('logt_unc.png') plotter.plot_precision(fitter, PAR = 'A_V', **gf) plotter.plot_precision(fitter, PAR = 'A_V',versus = fitter.parval['LOGT'][0,:,1], **gf) plotter.plot_precision(fitter, PAR = 'galex_NUV', **gf) plotter.plot_pars(fitter, PAR1 = 'LOGT', PAR2 = 'LOGL', **gf) pl.savefig('logl_logt.png') plotter.plot_pars(fitter, PAR1 = 'LOGT', PAR2 = 'A_V', **gf) plotter.residuals(fitter, bands = [0, 1, 2, 3], colors = ['m','b','g','r'], **gf)