acoustic_data_science/processing/process_data.py
def calc_broadband_spl(df, noramlise=False):
    """
    Calculates unnormalised broadband SPL by averaging over TOLs.
    """

    unnormalised_broadband_spl = 10 * np.log10(
        df.loc[:, "25":"25119"].applymap(broadband_func).sum(axis=1)
    )

    if noramlise == False:
        logging.info(
            "Calculating unnormalised broadband SPL (normalise later)."
        )
        # Broadband SPL will be normalised later compared to other months.
        df["unnormalised_broadband_spl"] = unnormalised_broadband_spl

    else:
        logging.info("Calculating normalised broadband SPL.")
        df["broadband_spl"] = (
            unnormalised_broadband_spl - unnormalised_broadband_spl.max()
        )

    return df

    Calculates unnormalised broadband SPL by averaging over TOLs.
    
Calculates unnormalised broadband SPL by averaging over TOLs.
Calculates unnormalised broadband SPL by averaging over TOLs .
def calc_broadband_spl(df, noramlise=False):
    unnormalised_broadband_spl = 10 * np.log10(
        df.loc[:, "25":"25119"].applymap(broadband_func).sum(axis=1)
    )
    if noramlise == False:
        logging.info(
            "Calculating unnormalised broadband SPL (normalise later)."
        )
        df["unnormalised_broadband_spl"] = unnormalised_broadband_spl
    else:
        logging.info("Calculating normalised broadband SPL.")
        df["broadband_spl"] = (
            unnormalised_broadband_spl - unnormalised_broadband_spl.max()
        )
    return df
def calc_broadband_spl ( df , noramlise = False ) : unnormalised_broadband_spl = 10 * np . log10 ( df . loc [ : , "25" : "25119" ] . applymap ( broadband_func ) . sum ( axis = 1 ) ) if noramlise == False : logging . info ( "Calculating unnormalised broadband SPL (normalise later)." ) df [ "unnormalised_broadband_spl" ] = unnormalised_broadband_spl else : logging . info ( "Calculating normalised broadband SPL." ) df [ "broadband_spl" ] = ( unnormalised_broadband_spl - unnormalised_broadband_spl . max ( ) ) return df
Calculates unnormalised broadband SPL by averaging over TOLs.
Calculates unnormalised broadband SPL by averaging over TOLs .
"""
    Calculates unnormalised broadband SPL by averaging over TOLs.
    """ # Broadband SPL will be normalised later compared to other months.
df
noramlise