Exemplo n.º 1
0
#Load the finished SOMz 
#A = load('SOMz_finished.npy')
#finished_SOMz = A.item()

#total_obs = len(sample_points)

#Run the first method
#Phi_tilde = Point estimate
#psf = psf from all data points in the SOMz cell
#Initial guess = uniform

                    

Nsample = len(Mean_test)

L0,L1 = df.get_limits(Nsample, size, rank)


initial_guess = ones(200)*.01


base_point_dist = []
base_pdf_dist = []
matias_point_dist =[]
matias_pdf_dist =[]
#bootstrap_point_dist = []
#bootstrap_pdf_dist = []
#pseudo_boot_dist=[]

for obs_num in xrange(L0,L1):
    #obs_num = sample_points[j]
Exemplo n.º 2
0
#Run the first method
#Phi_tilde = Point estimate
#psf = psf from all data points in the SOMz cell
#Initial guess = uniform


if rank ==0 :sample_points = rnd.sample(range(total_obs),900)
if rank == 0: save('900_sampled_points.npy',sample_points)

comm.Barrier()

sample_points = load('900_sampled_points.npy')
Nsample = len(sample_points)

L0,L1 = df.get_limits(Nsample, size, rank)
initial_guess = ones(200)*.01


final_z_dist = []
for jj in xrange(L0,L1):
    obs_num = sample_points[jj]
    indices = finished_SOMz.ivals[finished_SOMz.get_best(X[obs_num])]

    #Pull the relevant galaxies from the full data-set
    new_data = train_data_nocol.iloc[indices]
    new_data.reset_index(inplace=True)

    #Calculate the point spread function
    psf = df.point_spread_function(new_data,smoothed=False)