Settings#
- pydantic model skysim.settings.Settings[source]#
Base class to interpret often-used configuration values. The
Settingsclass should never be used or passed directly, but instead should be created only for the purpose of then callingget_image_settings()andget_plot_settings().- Config:
arbitrary_types_allowed: bool = True
extra: str = forbid
frozen: bool = True
- Fields:
- Validators:
compare_timespans»all fields
- field altitude_angle [Required]#
Angle of observation (measured from horizon).
- Constraints:
_unit = rad
_physical_type = {‘angle’}
_physical_type_list = [‘angle’]
- Validated by:
- field azimuth_angle [Required]#
Angle of observation (Eastwards from North).
- Constraints:
_unit = rad
_physical_type = {‘angle’}
_physical_type_list = [‘angle’]
- Validated by:
- field duration [Required]#
How long the total observation should last - should be given in concert with
snapshot_frequency- Validated by:
- field field_of_view [Required]#
Diameter of the area being observed at any time.
- Constraints:
_unit = rad
_physical_type = {‘angle’}
_physical_type_list = [‘angle’]
- Validated by:
- field image_pixels [Required]#
Number of pixels (diameter) for the resulting image.
- Constraints:
gt = 0
- Validated by:
- field input_location [Required]#
User-input version of the observing location.
- Validated by:
- field snapshot_frequency [Required]#
How often an observation should be taken - should be given in concert with
duration- Validated by:
- field start_date [Required]#
Starting (local) date of observation.
- Validated by:
- field start_time [Required]#
Starting (local) time of observation.
- Validated by:
- validator convert_to_deg » altitude_angle, field_of_view, azimuth_angle[source]#
Convert angular quantities to degrees.
- Parameters:
- angular
astropy.units.Quantity[angle] Astropy angular quantity.
- angular
- Returns:
astropy.units.Quantity[degree]Input angle in degrees.
- validator compare_timespans » all fields[source]#
Confirm that the time between snapshots is not greater than the observation duration.
- Returns:
SelfSettingsobject.
- Raises:
ValueErrorRaised if the snapshot frequency is greater than the duration.
- get_image_settings(**kwargs)[source]#
Generate an
ImageSettingsobject inheriting this object’s information.- Parameters:
- **kwargs
Dictionary of arguments to be passed to
ImageSettings.
- Returns:
ImageSettingsObject containing all passed configuration values as well as those from the instantiation of this
Settingsobject.
- get_plot_settings(**kwargs)[source]#
Generate an
PlotSettingsobject inheriting this object’s information.- Parameters:
- **kwargs
Dictionary of arguments to be passed to
PlotSettings.
- Returns:
PlotSettingsObject containing all passed configuration values as well as those from the instantiation of this
Settingsobject.
- property degrees_per_pixel#
Calculates the number of degrees spanned by each pixel in the resulting image.
- Returns:
astropy.units.Quantity[angle]Degrees per pixel (pixel considered unitless).
- property earth_location#
Looks up where on Earth the user requested the observation be taken from.
- Returns:
astropy.coordinates.EarthLocationAstropy representation of location on Earth.
- Raises:
NotImplementedErrorRaised if location lookup fails.
- property frames#
Calculates number of frames for movie/observations to take.
- Returns:
pydantic.PositiveIntNumber of frames.
- property local_datetimes#
Observation snapshot times as timezone-aware python times.
- Returns:
list[datetime.time]List of observation times.
- property observation_radec#
Calculates the observed RA/Dec position for each observation snapshot.
- Returns:
astropy.coordinates.SkyCoordAstropy representation of one or more coordinates.
- property observation_times#
Calculates the times at which to take a snapshot.
- Returns:
astropy.time.TimeAstropy representation of one or more times.
- property timezone#
Look up timezone based on Lat/Long.
- Returns:
zoneinfo.ZoneInfoTimezone information.
- Raises:
NotImplementedErrorRaised in the case that the lookup fails.
- property wcs_objects#
WCS objects for each timestep.
- Returns:
list[astropy.wcs.WCS]WCS objects for each timestep.