astrohack.utils.ray_tracing_general

Attributes

nanvec3d

return_line

Classes

GlobalQPS

LocalQPS

Functions

generalized_dot(vec_map_a, vec_map_b)

generalized_norm(vecmap)

generalized_dist(vec_map_a, vec_map_b)

normalize_vector_map(vector_map)

reflect_light(light, normals)

simple_axis(minmax, resolution[, margin])

Creates an array spaning from min to max (may go over max if resolution is not an integer division) spaced by resolution

np_qps_fitting(pcd)

degrade_pcd(pcd, degrading_factor)

Degrades de number of points in a pcd by an integer factor

qps_compute_point_and_normal(pnt, qps_coeffs, pcd)

qps_compute_point_and_normal_jit(pnt, qps_coeffs, pcd)

qps_compute_normal_jit(pnt, qps_coeffs, pcd)

local_qps_image_jit(global_pcd, local_qps_coeffs, ...)

global_qps_image_jit(pcd, qps_coeffs, points)

global_qps_normal_image_jit(pcd, qps_coeffs, points)

Module Contents

nanvec3d[source]
return_line = '\x1b[F'[source]
generalized_dot(vec_map_a, vec_map_b)[source]
generalized_norm(vecmap)[source]
generalized_dist(vec_map_a, vec_map_b)[source]
normalize_vector_map(vector_map)[source]
reflect_light(light, normals)[source]
simple_axis(minmax, resolution, margin=0.05)[source]

Creates an array spaning from min to max (may go over max if resolution is not an integer division) spaced by resolution :param minmax: the minimum and maximum of the axis :param resolution: The spacing between array elements :param margin: Add a margin at the edge of the array beyonf min and max

Returns:

A numpy array representation of a linear axis.

np_qps_fitting(pcd)[source]
degrade_pcd(pcd, degrading_factor)[source]

Degrades de number of points in a pcd by an integer factor :param pcd: pcd data, assumes [:, 3] :param degrading_factor: integer pcd degrading factor

Returns: degraded pcd

qps_compute_point_and_normal(pnt, qps_coeffs, pcd)[source]
qps_compute_point_and_normal_jit(pnt, qps_coeffs, pcd)[source]
qps_compute_normal_jit(pnt, qps_coeffs, pcd)[source]
local_qps_image_jit(global_pcd, local_qps_coeffs, local_pcds, points)[source]
global_qps_image_jit(pcd, qps_coeffs, points)[source]
global_qps_normal_image_jit(pcd, qps_coeffs, points)[source]
class GlobalQPS[source]
n_qps_extra_vars = 6[source]
n_points = None[source]
point_cloud = None[source]
qps_coefficients = None[source]
classmethod from_point_cloud(pcd_data, degradation_factor=None, displacement=(0, 0, 0))[source]
classmethod from_point_cloud_and_coefficients(point_cloud, qps_coefficients)[source]
classmethod from_pickle(filename)[source]
to_pickle(filename)[source]
classmethod from_zarr(filepath)[source]
to_zarr(filepath)[source]
compute_gridded_z_cos(u_axis, v_axis, mask, light=(0, 0, 1))[source]
compute_gridded_z_val_and_z_cos(u_axis, v_axis, mask, light=(0, 0, 1))[source]
class LocalQPS[source]
n_qps_extra_vars = 6[source]
npnt = -1[source]
local_qps_n_pnt = -1[source]
global_pcd = None[source]
local_qps_coeffs = None[source]
local_pcds = None[source]
current_z_val = None[source]
current_z_cos = None[source]
current_u_axis = None[source]
current_v_axis = None[source]
high_res_z_val = None[source]
high_res_z_cos = None[source]
high_res_u_axis = None[source]
high_res_v_axis = None[source]
classmethod from_pcd(pcd_data, local_qps_n_pnt=20, displacement=(0, 0, 0))[source]
export_to_xr_data_variables()[source]

Idea is to return pcd values and qpd coeffs as Xarray data variables for storage. Returns: xarray data variables

classmethod from_xr_data_variable()[source]

Idea is to init an object from a few xarray Data variables from storage Returns: initialized obj

compute_z_val_and_z_cos(point)[source]

Idea is to compute value of QPS and angle with boresight :param point:

Returns:

vectorized_z_val_and_z_cos(point_arr)[source]
plot_z_val_and_z_cos(colormap='viridis', zlim=None, dpi=300, display=False)[source]
compute_gridded_z_val_and_z_cos(u_axis, v_axis, mask, gridding_engine='2D regrid', light=(0, 0, -1), vectorized=True)[source]
downgrid_high_resolution_z_val_and_z_cos(u_axis, v_axis, gridding_engine)[source]
compute_high_resolution_z_val_and_z_cos(x_resolution, y_resolution)[source]
classmethod from_pickle(filename)[source]
get_local_qps(ipnt)[source]
to_pickle(filename)[source]