def all_station_manipulation(df_1, df_2):
    """
    Performs math operations on both station's data together to calculate the differences between them, average and
    maximum values. These results are currently appended to the dataframe of station_1 but will eventually be stored in
    their own dataframe.

    All equations/constants are lifted from read_data_JETS.

    :param df_1: dataframe containing DAF data from station_1
    :param df_2: dataframe containing DAF data from station_2
    :return:
    """
    df_1['vel_diff'] = abs(df_1['vel'] - df_2['vel'])
    df_1['vel_avg'] = (df_1['vel'] + df_2['vel']) / 2
    df_1['max_abs_mag_diff'] = df_1['max_mag'] - df_2['max_mag']
    df_1['avg_abs_mag'] = df_1['max_mag'].where(df_1['max_mag'] < df_2[
        'max_mag'], df_2['max_mag'])
    df_1['intg_luminosity'] = df_1['intg_luminosity'].where(df_1[
        'intg_luminosity'] > df_2['intg_luminosity'], df_2['intg_luminosity'])
    df_1['intg_luminosity_err'] = df_1['intg_luminosity_err'].where(df_1[
        'intg_luminosity_err'] > df_2['intg_luminosity_err'], df_2[
        'intg_luminosity_err'])
    return df_1
