ImageSettings#
- pydantic model skysim.settings.ImageSettings[source]#
Settingssubclass to hold values used when populating the image array. Additionally contains a copy of all attributes belonging to theSettingsinstance it inherits from.- Config:
arbitrary_types_allowed: bool = True
extra: str = forbid
frozen: bool = True
- Fields:
- Validators:
_convert_colour_dict»object_colours_convert_colour_list»colour_values
- field colour_time_indices [Required]#
Mapping between hour of the day (0-24, float) and the index corresponding to the colour in
colour_valuesto use at that time.- Validated by:
- field colour_values [Required]#
List of colours to use to fill out the background.
- Validated by:
_convert_colour_list
- field magnitude_time_indices [Required]#
Same as
colour_time_indices, except applying to magnitude_values. Need not be the same ascolour_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:
_convert_colour_dict
- brightness_gaussian(radius)[source]#
Calculate how much light is observed from a star at some radius away from it.
- Parameters:
- radius
pydantic.NonNegativeFloat Distance in pixels.
- radius
- Returns:
pydantic.NonNegativeFloatScaling 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:
FloatArray2D mesh of [0,1] values.
- property colour_mapping#
Interpolate between the colour-time mappings indicated by
colour_valuesandcolour_time_indicesto generate an addressable mapping.- Returns:
matplotlib.colors.LinearSegmentedColormapCallable 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.PositiveFloatStandard deviation.
- property magnitude_mapping#
Interpolate between the magnitude-time mappings indicated by
magnitude_valuesandmagnitude_time_indicesto generate an addressable mapping.- Returns:
FloatArrayArray containing the calculated magnitude value for each second of the day.