# AUTOGENERATED! DO NOT EDIT! File to edit: ../notebooks/12_mission_config.ipynb.

# %% auto 0
__all__ = ['wind_plasma_3dp_meta', 'wind_plasma_k0_swe_meta', 'wind_mag_h2_meta', 'wind_mag_h4_rtn_meta', 'WindMeta',
           'WindConfig']

# %% ../notebooks/12_mission_config.ipynb 0
from space_analysis.ds.meta import Meta, PlasmaMeta, TempMeta
from .config import SpeasyIDsConfig
from datetime import timedelta
from pydantic import BaseModel

# %% ../notebooks/12_mission_config.ipynb 1
wind_plasma_3dp_meta = PlasmaMeta(
    dataset="WI_PM_3DP",
    parameters=["P_DENS", "P_VELS", "P_TEMP"],  # Proton velocity vector (GSE)
    description = "Wind 3dp, PESA LOW 1 spin resolution ion (proton and alpha) moments (computed on spacecraft)"
)

wind_plasma_k0_swe_meta = PlasmaMeta(
    dataset="WI_K0_SWE", parameters=["Np", "V_GSE", "THERMAL_SPD"]
)

wind_mag_h2_meta = Meta(dataset="WI_H2_MFI", parameters=["BGSE"])
wind_mag_h4_rtn_meta: Meta = Meta(dataset="WI_H4-RTN_MFI", parameters=["BRTN"])

# %% ../notebooks/12_mission_config.ipynb 2
class WindMeta(BaseModel):
    name: str = "Wind"
    ts: timedelta = timedelta(seconds=1 / 11)

    mag_meta: Meta = wind_mag_h2_meta
    plasma_meta: PlasmaMeta = wind_plasma_3dp_meta

    ion_temp_meta: TempMeta = TempMeta(
        dataset="WI_PLSP_3DP",
        parameters=["MOM.P.MAGT3"],  # T_perp = (MAGT3[0] + MAGT3[1])/2
        para_col="proton_MagT3_Z",
        perp_cols=["proton_MagT3_X", "proton_MagT3_Y"],
    )

    e_temp_meta: TempMeta = TempMeta(
        dataset="WI_ELM2_3DP",
        parameters=["MAGT3"],
        para_col="electron_MagT3_Para",
        perp_cols=["electron_MagT3_Perp1", "electron_MagT3_Perp2"],
    )

# %% ../notebooks/12_mission_config.ipynb 3
class WindConfig(WindMeta, SpeasyIDsConfig):
    pass
