Exemplo n.º 1
0
def smoothing_function(input_array, sigma):
    print 'performing smoothing with sigma = ' + str(sigma)
    for layer in xrange(0,len(input_array)-1):
        input_array[:,:,layer] = c2t.smooth_gauss(input_array[:,:,layer], sigma) #gaussian 2D smoothing

    tophat = c2t.tophat_kernel_3d((1,1,sigma))
    input_array = c2t.smooth_with_kernel(input_array, kernel = tophat) #tophat smoothing in line of sight
  
    return input_array
Exemplo n.º 2
0
def smoothing_function(input_array, sigma):
    print 'performing smoothing with sigma = ' + str(sigma)
    for layer in xrange(0, len(input_array) - 1):
        input_array[:, :,
                    layer] = c2t.smooth_gauss(input_array[:, :, layer],
                                              sigma)  #gaussian 2D smoothing

    tophat = c2t.tophat_kernel_3d((1, 1, sigma))
    input_array = c2t.smooth_with_kernel(
        input_array, kernel=tophat)  #tophat smoothing in line of sight

    return input_array
Exemplo n.º 3
0
def angular_direction(lightcone, sigma=1.0):
	nx, ny, nz = lightcone.shape
	smooth = np.zeros((nx,ny,nz))
	for k in xrange(nz):
		smooth[:,:,k] = c2t.smooth_gauss(lightcone[:,:,k], sigma=sigma)
	return smooth