ImageSettings#

pydantic model skysim.settings.ImageSettings[source]#

Settings subclass to hold values used when populating the image array. Additionally contains a copy of all attributes belonging to the Settings instance it inherits from.

Config:
  • arbitrary_types_allowed: bool = True

  • extra: str = forbid

  • frozen: bool = True

Fields:
Validators:
field colour_time_indices [Required]#

Mapping between hour of the day (0-24, float) and the index corresponding to the colour in colour_values to use at that time.

Validated by:
field colour_values [Required]#

List of colours to use to fill out the background.

Validated by:
field magnitude_time_indices [Required]#

Same as colour_time_indices, except applying to magnitude_values. Need not be the same as colour_time_indices.

Validated by:
field magnitude_values [Required]#

List of maximum magnitude values, to be used in the same manner as colour_values.

Validated by:
field object_colours [Required]#

Mapping between object types, and the colours to use on the image.

Validated by:
brightness_gaussian(radius)[source]#

Calculate how much light is observed from a star at some radius away from it.

Parameters:
radiuspydantic.NonNegativeFloat

Distance in pixels.

Returns:
pydantic.NonNegativeFloat

Scaling factor for brightness.

property area_mesh#

Create a mesh of indices that spread out from a central point.

Returns:
IntArray

(2, X, X) array.

property brightness_scale_mesh#

Create a mesh of scaling factors that will dictate how a star’s light falls off with distance.

Returns:
FloatArray

2D mesh of [0,1] values.

property colour_mapping#

Interpolate between the colour-time mappings indicated by colour_values and colour_time_indices to generate an addressable mapping.

Returns:
matplotlib.colors.LinearSegmentedColormap

Callable object on the interval [0,1] returning a RGBTuple.

property light_spread_stddev#

Standard deviation for the Gaussian which defines the spread of starlight.

Returns:
pydantic.PositiveFloat

Standard deviation.

property magnitude_mapping#

Interpolate between the magnitude-time mappings indicated by magnitude_values and magnitude_time_indices to generate an addressable mapping.

Returns:
FloatArray

Array containing the calculated magnitude value for each second of the day.

property maximum_magnitude#

The highest magnitude that will ever be visible in the image.

Returns:
float

Magnitude.