TidalPy.orbit package
Submodules
TidalPy.orbit.averaging module
Functions used during orbit averaging.
- TidalPy.orbit.averaging.orbit_average(orbital_period: float, time_domain: ndarray, array: ndarray, scale_by_period: bool = True)[source]
Calculates the orbit averaged values for the provided array. This function assumes that the provided array is only a function of time (one dimensional).
- Parameters:
orbital_period (float) – Orbital period [must be the same units as time_domain]
time_domain (np.ndarray) – Time domain array (1D array) [must be the same units as orbital_period]
array (np.ndarray) – Array that will be orbit averaged. This function assumes that the provided array is only a function of time (shape should equal shape of time_domain).
- Returns:
array_averaged – The orbit averaged array. This array will be one less dimension than the input array (since the time domain information has collapsed).
- Return type:
np.ndarray
- Raises:
ValueError – No points in the time domain found within orbital period.
ValueError – Very few points in the time domain found within orbital period.
- TidalPy.orbit.averaging.orbit_average_3d(orbital_period: float, time_domain: ndarray, array: ndarray, n_radius: int, n_longitude: int, n_colatitude: int, scale_by_period: bool = True)[source]
Calculates the orbit averaged values for the provided array. This function assumes that arrays include 3D spatial information: radius, longitude, and colatitude.
- Parameters:
orbital_period (float) – Orbital period [must be the same units as time_domain]
time_domain (np.ndarray) – Time domain array (1D array) [must be the same units as orbital_period]
array (np.ndarray) – Array that will be orbit averaged. This function assumes this array is structured with the shape (radius, longitude, colatitude, time).
n_radius (int) – Number of radius points.
n_longitude (int) – Number of longitude points.
n_colatitude (int) – Number of colatitude points.
- Returns:
array_averaged – The orbit averaged array. This array will be one less dimension than the input array (since the time domain information has collapsed).
- Return type:
np.ndarray
- Raises:
ValueError – No points in the time domain found within orbital period.
ValueError – Very few points in the time domain found within orbital period.
- TidalPy.orbit.averaging.orbit_average_3d_multiarray(orbital_period: float, time_domain: ndarray, array_list: List[ndarray], n_radius: int, n_longitude: int, n_colatitude: int, scale_by_period: bool = True)[source]
Calculates the orbit averaged values for the provided arrays. This function assumes that arrays include 3D spatial information: radius, longitude, and colatitude.
- Parameters:
orbital_period (float) – Orbital period [must be the same units as time_domain]
time_domain (np.ndarray) – Time domain array (1D array) [must be the same units as orbital_period]
array_list (List[np.ndarray]) – List of arrays that will be orbit averaged. All arrays must have the same dimensions and dtypes. This function assumes these arrays are structured with the shape (radius, longitude, colatitude, time).
radius_N (int) – Number of radius points.
longitude_N (int) – Number of longitude points.
colatitude_N (int) – Number of colatitude points.
scale_by_period (bool, optional) – If True, then the result will be scaled by 1/orbital_period, by default True
- Returns:
arrays_averaged – The orbit averaged arrays stored in the same order as array_list. Each array will be one less dimension than the input array (since the time domain information has collapsed).
- Return type:
List[np.ndarray]
- Raises:
ValueError – No points in the time domain found within orbital period.
ValueError – Very few points in the time domain found within orbital period.
TypeError – Arrays must have the same dtype.
TypeError – Arrays must have the same shape.
- TidalPy.orbit.averaging.orbit_average_4d_multiarray(orbital_period: float, time_domain: ndarray, array_list: List[ndarray], n_outer: int, n_radius: int, n_longitude: int, n_colatitude: int, scale_by_period: bool = True)[source]
Calculates the orbit averaged values for the provided arrays. This function assumes that arrays include 3D spatial information: radius, longitude, and colatitude.
- Parameters:
orbital_period (float) – Orbital period [must be the same units as time_domain]
time_domain (np.ndarray) – Time domain array (1D array) [must be the same units as orbital_period]
array_list (List[np.ndarray]) – List of arrays that will be orbit averaged. All arrays must have the same dimensions and dtypes. This function assumes these arrays are structured with the shape (radius, longitude, colatitude, time).
radius_N (int) – Number of radius points.
longitude_N (int) – Number of longitude points.
colatitude_N (int) – Number of colatitude points.
scale_by_period (bool, optional) – If True, then the result will be scaled by 1/orbital_period, by default True
- Returns:
arrays_averaged – The orbit averaged arrays stored in the same order as array_list. Each array will be one less dimension than the input array (since the time domain information has collapsed).
- Return type:
List[np.ndarray]
- Raises:
ValueError – No points in the time domain found within orbital period.
ValueError – Very few points in the time domain found within orbital period.
TypeError – Arrays must have the same dtype.
TypeError – Arrays must have the same shape.