Code Documentation¶
Module with astronomical geometrical functions.
- angular_distance(axis, vectors)¶
Angular distance between vectors and axis
- Parameters:
axis (NDArray) – the vector from which the distance is being calculated
vectors (NDArray) – the vectors being calculated):
- Returns:
angular distance between vectors and axis
- Return type:
- mag_to_radius(magnitude, max_magnitude, min_magnitude)¶
Returns radius of the point corresponds to given star magnitude.
- get_horizontal_coords(longitude, latitude, local_time, data)¶
Get horizontal coordinates from catalog data.
- make_stereo_projection(view_data)¶
Returns point stereographic projections array.
- Parameters:
view_data (NDArray) – observed object parameters in horizontal coordinates
- Returns:
image point parameters
- Return type:
NDArray
- make_pinhole_projection(center_direction, tilt_dec, focal_length, image_width, image_height, data)¶
Returns point pinhole projections array.
- Parameters:
- Returns:
a pair of mask and coordinates in reference plane system
- Return type:
- create_camera_frame_system(center_direction, tilt_dec)¶
Create camera coordinate system from shot conditions.
- Parameters:
center_direction (NDArray) – ECI unit vector of camera view direction
tilt_dec (float) – tilt angle of frame with respect to zenith direction
- Returns:
camera frame system matrix
- Return type:
NDArray
- generate_small_circle(spheric_normal_deg, alpha_deg, num_points)¶
Generate a small circle on unit sphere in ECI coordinates.
- Parameters:
- Returns:
array of points in cartesian ECI coordinates
- Return type:
NDArray
- make_points_stereo_projection(points)¶
Returns star point projections array.
- Parameters:
points (NDArray) – points to project, must contain azimuth and zenith args
- Returns:
projection point polar coordinates
- Return type:
NDArray
- make_equatorial_grid_pinhole(center_direction, tilt_dec, focal_length, image_width, image_height, grid_step_dec, grid_step_ra)¶
Creates an equatorial grid for pinhole image/
- Parameters:
center_direction (NDArray) – ECI unit vector of camera view direction
tilt_dec (float) – tilt angle in degrees
focal_length (float) – focal length in pixels
image_width (float) – image width in pixels
image_height (float) – image height in pixels
grid_step_dec (float) – declination grid step in degrees
grid_step_ra (float) – right ascension grid step in degrees
- Returns:
grid as LineCollection object
- Return type:
LineCollection
- clean_far_points(circle, fov_rad, center_direction, gap_threshold)¶
Removes points further than FOV from center direction out of circle