populate#

Create an RGB image matrix of the observation using objects found by skysim.query and image configuration from an ImageSettings object.

Constants#

MINIMUM_BRIGHTNESS

Minimum brightness for an object.

Functions#

High-Level Functions#

create_image_matrix(image_settings, ...)

Primary function for the populate module.

Low-Level Functions#

get_empty_image(frames, image_pixels)

Initialize an empty image array.

get_seconds_from_midnight(local_time)

Calculate the number of seconds since midnight for some time value.

get_timed_background_colour(...)

Get the background colour for the image based on the colour-time mapping.

get_timed_magnitude(magnitude_mapping, ...)

Get the maximum magnitude value visible for a current time.

fill_frame_background(colour, frame_matrix)

Fill an RGB image with a colour.

filter_objects_brightness(maximum_magnitude, ...)

Filter a table of objects by the maximum magitude that can be seen.

filter_objects_fov(radec, fov, objects_table)

Filter a table of objects by their distance to a point.

magnitude_to_flux(magnitude)

Magnitude to flux conversion (relative to some reference value).

linear_rescale(data[, new_min, new_max])

Generic function to linearly scale data between some minimum and maximum.

get_scaled_brightness(object_table)

Add a new column to object_table with a relative [0,1] brightness value based on the "magnitude" column.

pixel_in_frame(xy, image_pixels)

Check if an xy pixel is in a square frame of size image_pixels.

add_object_to_frame(object_row, frame, ...)

Add a celestial object to the image.

fill_frame_objects(index, frame, ...)

Pickle-able function to call add_object_to_frame for a whole table of objects.

prepare_object_table(image_settings, ...)

Converts the star and planet tables into a single combined unit for a given frame.