PlotSettings#
- pydantic model skysim.settings.PlotSettings[source]#
Settingssubclass to hold values used when generating the final plot 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:
- field dpi [Required]#
Dots per inch, passed to
matplotlib.- Constraints:
gt = 0
- Validated by:
- field figure_size [Required]#
Size of the figure in inches to pass to
matplotlib.- Validated by:
- field filename [Required]#
Location to save the plot.
- Validated by:
- field fps [Required]#
Frames per second of the GIF/video generated. Zero if there is only one frame.
- Constraints:
ge = 0
- Validated by:
- validator check_parent_directory_exists » filename[source]#
Raise an error if the directory in which to save the image doesn’t exist.
- Parameters:
- filename
pathlib.Path Location to save image.
- filename
- Returns:
pathlib.PathSame as input.
- Raises:
ValueErrorRaised if parent directory does not exist.
- validator validate_fps » fps[source]#
Ensure fps conforms to the described requirements.
- Parameters:
- input_fps
pydantic.NonNegativeFloat Frames per second as input when instantiating the
PlotSettingsobject.- info
pydantic.ValidationInfo Pydantic
ValidationInfoobject allowing access to the other already-validated fields.
- input_fps
- Returns:
pydantic.NonNegativeFloatValidated fps.
- Raises:
ValueErrorRaised if
fpsis given as zero but the observationdurationimplies there should be multiple frames.
- property datetime_strings#
Printable observation times.
- property observation_info#
Generate a string containing information about the observation for the plot. Only contains information which is constant throughout all snapshots.
- Returns:
strFormatted string.
- property tempfile_path#
Path to store video frame files.
- Returns:
pathlib.PathDirectory.