# SunPy sun¶

## sunpy.sun Package¶

Contains astronomical and physical constants for use in SunPy or other places.

The package contains a _constants module that define the constants. A typical use case might be:

from sunpy.sun._constants import physical_constants as con


### Functions¶

 apparent_declination([t]) Returns the apparent declination of the Sun. apparent_latitude([t]) Returns the true latitude. apparent_longitude([t]) Returns the apparent longitude of the Sun. apparent_obliquity_of_ecliptic([t]) Return the apparent obliquity of the ecliptic. apparent_rightascension([t]) Returns the apparent right ascension of the Sun. carrington_rotation_number([t]) Return the Carrington Rotation number eccentricity_SunEarth_orbit([t]) Returns the eccentricity of the Sun Earth Orbit. equation_of_center([t]) Returns the Sun’s equation of center (in degrees) geometric_mean_longitude([t]) Returns the geometric mean longitude (in degrees) heliographic_solar_center([t]) Returns the position of the solar center in heliographic coordinates. longitude_Sun_perigee([t]) mean_anomaly([t]) Returns the mean anomaly (the angle through which the Sun has moved assuming a circular orbit) as a function of time. mean_ecliptic_longitude([t]) Returns the mean ecliptic longitude. position([t]) Returns the position of the Sun (right ascension and declination) on the celestial sphere using the equatorial coordinate system in arcsec. print_params([t]) Print out a summary of Solar ephemeris solar_cycle_number([t]) Return the solar cycle number. solar_north([t]) Returns the position of the Solar north pole in degrees. solar_semidiameter_angular_size([t]) Return the angular size of the semi-diameter of the Sun as sunearth_distance([t]) Returns the Sun Earth distance (AU). true_anomaly([t]) Returns the Sun’s true anomaly (in degrees). true_declination([t]) Return the true declination. true_latitude([t]) Returns the true latitude. true_longitude([t]) Returns the Sun’s true geometric longitude (in degrees) (Referred to the mean equinox of date. true_obliquity_of_ecliptic([t]) Returns the true obliquity of the ecliptic. true_rightascension([t]) Return the true right ascension.

## sunpy.sun.constants Module¶

### Fundamental Solar Physical Constants¶

These constants are taken from various sources. The structure of this module is heavily based on if not directly copied from the SciPy constants module but contains Solar Physical constants.

### Object¶

constants : dict
A dictionary containing physical constants. Keys are the names of physical constants, values are tuples (value, units, uncertainty). The dictionary contains the following solar physical constants:
average density:
The average density of the Sun.
average_angular_size:
The average angular size of the Sun as seen from Earth in arcseconds.
effective temperature:
The effective black-body temperature of the Sun in Kelvin.
oblateness:
The ellipticity of the Sun.
escape velocity:
The velocity which an object needs to escape from the gravitational pull of the Sun.
luminosity:
The luminosity of the Sun.
mass:
The mass of the Sun.
mass conversion rate:
The rate at which the Sun converts mass to energy.
mean energy production:
The mean rate at which the Sun produces energy.
mean intensity:
The mean intensity of the Sun.
metallicity:
The metallicity of the Sun.
The radius of the Sun at the equator.
solar flux unit:
The definition of a solar flux unit.
sunspot cycle:
The average duration of the solar activity cycle.
surface area:
The surface area of the Sun.
surface gravity:
The gravitational acceleration at the surface of the Sun as measured at the equator.
visual magnitude:
A measure of the Sun’s brightness as seen by an observer on Earth without the presence of the atmosphere.
volume:
The volume of the Sun.

### Attributes¶

A number of variables from constants are made available for convenience as attributes.

### Functions¶

 get(key) Retrieve a constant by key. find([sub]) Return list of constants keys containing a given string print_all([key]) Provides a table of the complete list of constants.

## sunpy.sun.models Module¶

### Solar Physical Models¶

This module contains standard models of the sun from various sources. All data is saved in pandas DataFrames with two added attributes

• source : names the source of the data
• units : a dictionary with the units of each of the columns

### Object¶

interior : pandas.DataFrame
The standard model of the solar interior
evolution : pandas.DataFrame
The evolution as a function of time of the Sun