calc_M_v

ssapy.compute.calc_M_v(r_sat, r_earth, r_sun, r_moon=False, radius=0.4, albedo=0.2, sun_Mag=4.8, albedo_earth=0.3, albedo_moon=0.12, albedo_back=0.5, albedo_front=0.05, area_panels=100, return_components=False)[source][source]

Calculate the apparent magnitude (M_v) of a satellite due to reflections from the Sun, Earth, and optionally the Moon.

This function computes the apparent magnitude of a satellite based on its reflected light from the Sun, Earth, and optionally the Moon. It uses separate functions to calculate the flux contributions from each of these sources and combines them to determine the overall apparent magnitude.

Parameters:

r_sat(n, 3) numpy.ndarray

Position of the satellite in meters.

r_earth(n, 3) numpy.ndarray

Position of the Earth in meters.

r_sun(n, 3) numpy.ndarray

Position of the Sun in meters.

r_moon(n, 3) numpy.ndarray or False, optional

Position of the Moon in meters. If False, the Moon’s contribution is ignored (default is False).

radiusfloat, optional

Radius of the satellite in meters (default is 0.4 m).

albedofloat, optional

Albedo of the satellite’s surface, representing its reflectivity (default is 0.20).

sun_Magfloat, optional

Solar magnitude (apparent magnitude of the Sun) used in magnitude calculations (default is 4.80).

albedo_earthfloat, optional

Albedo of the Earth, representing its reflectivity (default is 0.30).

albedo_moonfloat, optional

Albedo of the Moon, representing its reflectivity (default is 0.12).

albedo_backfloat, optional

Albedo of the back surface of the satellite (default is 0.50).

albedo_frontfloat, optional

Albedo of the front surface of the satellite (default is 0.05).

area_panelsfloat, optional

Area of the satellite’s panels in square meters (default is 100 m^2).

return_componentsbool, optional

If True, returns the magnitude as well as the flux components from the Sun, Earth, and Moon (default is False).

Returns:

float

The apparent magnitude (M_v) of the satellite as observed from Earth.

dict, optional

If return_components is True, a dictionary containing the flux components from the Sun, Earth, and Moon.

Notes:

  • The function uses separate calculations for flux contributions from the Sun, Earth, and Moon:
    • sun_shine calculates the flux from the Sun.

    • earth_shine calculates the flux from the Earth.

    • moon_shine calculates the flux from the Moon (if applicable).

  • The apparent magnitude is calculated based on the distances between the satellite, Sun, Earth, and optionally the Moon, as well as their respective albedos and other parameters.

Example usage:

>>> r_sat = np.array([[1e7, 2e7, 3e7]])
>>> r_earth = np.array([1.496e11, 0, 0])
>>> r_sun = np.array([0, 0, 0])
>>> Mag_v = calc_M_v(r_sat, r_earth, r_sun, return_components=True)
>>> Mag_v
(15.63, {'sun_bus': 0.1, 'sun_panels': 0.2, 'earth_bus': 0.05, 'earth_panels': 0.1, 'moon_bus': 0.03, 'moon_panels': 0.07})