Skip to content

Observer

The Observer model represents an observer at a specific time and place on Earth. It's used by every plot type, and it's one of the few models you'll often instantiate directly.

Basic usage

Create an observer at Palomar Mountain (California, USA) for October 13, 2025 at 9pm Pacific time:

observer = Observer(
    dt=datetime(2025, 10, 13, 21, 0, 0, tzinfo=ZoneInfo('US/Pacific')),
    lat=33.363484,
    lon=-116.836394,
)

Observer at Specific Epoch

There's a static helper function for creating an observer at a specific epoch:

observer = Observer.at_epoch(2000) # J2000

starplot.Observer

Represents an observer at a specific time and place.

dt class-attribute instance-attribute

dt: AwareDatetime = Field(default_factory=lambda: datetime.now(timezone.utc))

Date and time of observation (must be timezone-aware).

Defaults to current time in UTC.

elevation class-attribute instance-attribute

elevation: float = 0

Elevation of observer, in meters

lat class-attribute instance-attribute

lat: float | None = Field(default=0, ge=-90, le=90)

Latitude of observer location

lon class-attribute instance-attribute

lon: float | None = Field(default=0, ge=-180, le=180)

Longitude of observer location

lst cached property

lst: float

Read-only Property

Local sidereal time (in degrees)

pressure class-attribute instance-attribute

pressure: float | None = None

Atmospheric pressure in millibars. If None, then it'll be estimated based on the observer's elevation. This is only used for determining atmospheric refraction for apparent positions.

temperature class-attribute instance-attribute

temperature: float = 10

Temperature in degrees Celsius. This is only used for determining atmospheric refraction for apparent positions.

timescale cached property

timescale: Timescale

Read-only Property

Timescale instance of the specified datetime (used by Skyfield)

at_epoch classmethod

at_epoch(epoch: float) -> Observer

Returns an Observer for the specified epoch (Julian year)

position cached

position(ephemeris: str = 'de440s.bsp')

Returns a Skyfield position for this observer.

If the observer has no lat/lon, then the Earth's center will be returned.

Parameters:

Name Type Description Default
ephemeris str

Ephemeris to use

'de440s.bsp'