Data gaps were filled with dummy numbers for the missing hours or entire
days to make all files of equal length. The character ‘9’ is used to
fill all fields for missing data according to their format, e.g.
’ 9999.9’ for a field with the FORTRAN format F7.1. Note that format F7.1
below really means (1X,F6.1),etc.
The flow OMNI "phi" angle is opposite GSE "phi" angle, threrfore, Flow-vector cartesian components in GSE coordinates may be derived from the given speed and angles as
Vx = - V * cos(theta) * cos(phi)
Vy = + V * cos(theta) * sin(phi)
Vz = + V * sin(theta)
and vise versa: two angles may be derived from the given speed and Vx,Vy,Vz comp. as
a_theta=vz/V
theta=(180.*asin(a_theta))/!PI
a_phi=Vy/(-Vx)
phi=(180.*atan(a_phi))/!PI
(*) Quasi-GSE for the flow longitude angle means the angle increases from zero
to positive values as the flow changes from being aligned along the -X(GSE)
axis towards the +Y(GSE) axis. The flow longitude angle is positive for
flow from west of the sun, towards +Y(GSE).
The flow latitude angle is positive for flow from south of the sun,
towards +Z(GSE)
def preprocess_data( raw_data: pl.LazyFrame,vars: dict= OMNI_VARS,) -> pl.LazyFrame:""" Preprocess the raw dataset (only minor transformations) - Applying naming conventions for columns - Extracting variables from `CDF` files, and convert them to DataFrame """ columns_name_mapping = {key: value["COLNAME"] for key, value invars.items()}return raw_data.rename(columns_name_mapping)