Projection module¶
Project trajectories into a discrete format.
- pyrotor.projection.coef_to_trajectory(c, evaluation_points_nb, basis, basis_features, basis_dimension)¶
Given coefficients, build the associated trajectory with respect to a functional basis.
- Inputs:
- c: list of floats or list of pd.Series
Each element of the list contains coefficients of a state
- evaluation_points_nb: int
Number of points on which the trajectory is evaluated
- basis: string
Name of the functional basis
- basis_features: dict
Contain information on the basis for each state
- basis_dimension: dict
Give the number of basis functions for each state
- Output:
- y: DataFrame
Contains computed states of a flight
- pyrotor.projection.compute_weighted_coef(coefs, weights, basis_dimension)¶
Compute weighted sum of trajectories through coefficients.
- Inputs:
- coefs: list of pd.Series
Each element of the list contains coefficients of a trajectory
- weights: ndarray
Vector containing the weights
- basis_dimension: dict
Give the number of basis functions for each state
- Output:
- c_weight: ndarray
Vector containing weighted sum of the coefficients
- pyrotor.projection.trajectories_to_coefs(trajectories, basis, basis_features, basis_dimension, n_jobs)¶
Given trajectories, compute their associated coefficients for each state with respect to a functional basis.
- Inputs:
- y: list of DataFrame
List of trajectories - Index has to start at 0
- basis: string
Functional basis
- basis_features: dict
Contain information on the basis for each state
- basis_dimension: dict
Give the dimension of the basis for each state
- n_jobs: int
Number of processes to use - If None, no parallelization is used
- Output:
- coefs: list of pd.Series
Each element of the list contains coefficients of a trajectory
- pyrotor.projection.trajectory_to_coef(y, basis, basis_features, basis_dimension)¶
Given a trajectory, compute its associated coefficients for each state with respect to a functional basis.
- Inputs:
- y: DataFrame
Trajectory - Index has to start at 0
- basis: string
Name of the functional basis
- basis_features: dict
Contain information on the basis for each state
- basis_dimension: dict
Give the dimension of the basis for each state
- Output:
- coef: list of pd.Series
Each element of the list contains the coefficients of a state