Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import subprocess
- import numpy as np
- import matplotlib.pyplot as plt
- plt.rcParams['figure.figsize'] = [50, 25]
- ###################### Banda I ######################
- data_i_teo_x, data_i_teo_y = np.loadtxt("data_i_teo.dat", ndmin=2, usecols=(0, 1), unpack = True)
- data_i_ph_x, data_i_ph_y, data_i_ph_yerr = np.loadtxt("data_i_ph.dat", ndmin=2, usecols=(0, 1, 2), unpack = True)
- plt.plot(data_i_ph_x, data_i_ph_y, '.', color="grey", label="Dados", linewidth=0.05)
- plt.plot(data_i_teo_x, data_i_teo_y, '-', color="r" ,label="Modelo", linewidth=1.0)
- plt.errorbar(data_i_ph_x, data_i_ph_y, yerr=data_i_ph_yerr, fmt='ro', label="data", ecolor='black')
- plt.text(0.9, 14.95, 'Banda I',
- #rotation=45,
- horizontalalignment='center',
- verticalalignment='top',
- multialignment='center')
- #####################################################
- ###################### Banda V ######################
- data_v_teo_x, data_v_teo_y = np.loadtxt("data_v_teo.dat", ndmin=2, usecols=(0, 1), unpack = True)
- data_v_ph_x, data_v_ph_y = np.loadtxt("data_v_ph.dat", ndmin=2, usecols=(0, 1), unpack = True)
- plt.plot(data_v_ph_x, data_v_ph_y, '.', color="grey", linewidth=0.05)
- plt.plot(data_v_teo_x, data_v_teo_y, '-', color="r", linewidth=1.0)
- plt.text(0.9, 15.25, 'Banda V',
- #rotation=45,
- horizontalalignment='center',
- verticalalignment='top',
- multialignment='center')
- #####################################################
- plt.title("VFTS 061")
- plt.xlim([-0.02, 1.02])
- plt.ylim([15.7, 14.9 ])
- plt.xlabel("Orbital Phase")
- plt.ylabel("Mag")
- plt.legend()
- #plt.savefig("polyfit_pfcsv.pdf")
- #from itertools import zip_longest as z
- ##########################################################################################################
- ###################### RV I ######################
- rv1_teo_x, rv1_teo_y = np.loadtxt("rv1_teo.dat", ndmin=2, usecols=(0, 1), unpack = True)
- rv1_obs_x, rv1_obs_y = np.loadtxt("rv1_obs.dat", ndmin=2, usecols=(0, 1), unpack = True)
- #plt.plot(t1, t2 ,'.', color="r" , label="Modelo", linewidth=1.0)
- l = list(rv1_teo_x)
- t1=list(np.sort(rv1_teo_x))
- t2 = [rv1_teo_y[j] for j in [l.index(i) for i in t1]]
- plt.plot(t1, t2 ,'-', color="r" , label="Modelo", linewidth=1.0)
- #plt.plot(rv1_teo_x, rv1_teo_y ,'.', color="r" , label="Modelo", linewidth=1.0)
- plt.plot( rv1_obs_x, rv1_obs_y ,'+', color="k", label="Dados", linewidth=0.05)
- #####################################################
- ###################### RV II ######################
- rv2_teo_x, rv2_teo_y = np.loadtxt("rv2_teo.dat", ndmin=2, usecols=(0, 1), unpack = True)
- rv2_obs_x, rv2_obs_y = np.loadtxt("rv2_obs.dat", ndmin=2, usecols=(0, 1), unpack = True)
- l2 = list(rv2_teo_x)
- t12=list(np.sort(rv2_teo_x))
- t22 = [rv2_teo_y[j] for j in [l2.index(i) for i in t12]]
- plt.plot(t12, t22 ,'-', color="r" , label="Modelo", linewidth=1.0)
- #plt.plot(rv2_teo_x, rv2_teo_y ,'-', color="r" ,label="Modelo", linewidth=1.0)
- plt.plot(rv2_obs_x, rv2_obs_y ,'+', color="k", label="Dados", linewidth=0.05)
- #####################################################
- #tmp1 = z(rv1_teo_x, rv1_teo_y)
- #print(rv1_teo_y)
- #print(t2)
- #t2=np.array([[i] for i in )
- #t2=np.array(tmp1[i] for i in )
- #t2=np.array(rv1_teo_x==i for i in t1)
- #print(list(t2)
- #print(dir(rv1_teo_x))
- #print(len(ttt1),len(set(ttt1)))
- #print(len(rv1_teo_y), len(set(rv1_teo_y)))
- #print(rv1_teo_x)
- #print(rv1_teo_y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement