yt.utilities.lib.pixelization_routines module

Pixelization routines

class yt.utilities.lib.pixelization_routines.SPHKernelInterpolationTable

Bases: object

interpolate_array(q2_vals)
kernel_name
populate_table()
yt.utilities.lib.pixelization_routines.get_rotation_matrix(normal_vector, final_vector)

Returns a numpy rotation matrix corresponding to the rotation of the given normal vector to the specified final_vector. See https://math.stackexchange.com/a/476311 although note we return the inverse of what’s specified there.

yt.utilities.lib.pixelization_routines.interpolate_sph_grid_gather(buff, tree_positions, bounds, hsml, pmass, pdens, quantity_to_smooth, kdtree, use_normalization=1, kernel_name='cubic', pbar=None, num_neigh=32, *, return_mask=0)

This function takes in the bounds and number of cells in a grid (well, actually we implicitly calculate this from the size of buff). Then we can perform nearest neighbor search and SPH interpolation at the centre of each cell in the grid.

yt.utilities.lib.pixelization_routines.interpolate_sph_positions_gather(buff, tree_positions, field_positions, hsml, pmass, pdens, quantity_to_smooth, kdtree, use_normalization=1, kernel_name='cubic', pbar=None, num_neigh=32)

This function takes in arbitrary positions, field_positions, at which to perform a nearest neighbor search and perform SPH interpolation.

The results are stored in the buffer, buff, which is in the same order as the field_positions are put in.

yt.utilities.lib.pixelization_routines.normalization_1d_utility(num, den)
yt.utilities.lib.pixelization_routines.normalization_2d_utility(num, den)
yt.utilities.lib.pixelization_routines.normalization_3d_utility(num, den)
yt.utilities.lib.pixelization_routines.off_axis_projection_SPH(px, py, pz, particle_masses, particle_densities, smoothing_lengths, bounds, center, width, quantity_to_smooth, projection_array, mask, normal_vector, north_vector, weight_field=None)
yt.utilities.lib.pixelization_routines.pixelize_aitoff(azimuth, dazimuth, colatitude, dcolatitude, buff_size, field, bounds, input_img=None, azimuth_offset=0.0, colatitude_offset=0.0, *, return_mask=0)
yt.utilities.lib.pixelization_routines.pixelize_cartesian(buff, px, py, pdx, pdy, data, bounds=1, antialias=None, period=1, check_period=0.0, line_width=0, *, return_mask)
yt.utilities.lib.pixelization_routines.pixelize_cartesian_nodal(buff, px, py, pz, pdx, pdy, pdz, data, coord, bounds, antialias=1, period=None, check_period=1, *, return_mask=0)
yt.utilities.lib.pixelization_routines.pixelize_cylinder(buff, radius, dradius, theta, dtheta, field, extents, *, return_mask=0)
yt.utilities.lib.pixelization_routines.pixelize_element_mesh(coords, conn, buff_size, field, extents, index_offset=0, *, return_mask=False)
yt.utilities.lib.pixelization_routines.pixelize_element_mesh_line(coords, conn, start_point, end_point, npoints, field, index_offset=0)
yt.utilities.lib.pixelization_routines.pixelize_off_axis_cartesian(buff, x, y, z, px, py, pdx, pdy, pdz, center, inv_mat, indices, data, bounds, *, return_mask=0)
yt.utilities.lib.pixelization_routines.pixelize_sph_kernel_arbitrary_grid(buff, posx, posy, posz, hsml, pmass, pdens, quantity_to_smooth, bounds, pbar=None, kernel_name='cubic', check_period=1, period=None)
yt.utilities.lib.pixelization_routines.pixelize_sph_kernel_projection(buff, mask, posx, posy, hsml, pmass, pdens, quantity_to_smooth, bounds, kernel_name='cubic', weight_field=None, check_period=1, period=None)
yt.utilities.lib.pixelization_routines.pixelize_sph_kernel_slice(buff, mask, posx, posy, hsml, pmass, pdens, quantity_to_smooth, bounds, kernel_name='cubic', check_period=1, period=None)
yt.utilities.lib.pixelization_routines.rotate_particle_coord(px, py, pz, center, width, normal_vector, north_vector)