import math


def soundpressure_to_soundlevel(Pa, p0=0.00002):
    """
    convert soundpressure in Pascal to sound level in dB (dBSPL)

    Lp(dBSPL) = 20 * log10(p/p0)

    p0: threshold of hearing, 0.00002 Pa (20uPa)
    """
    return 20 * math.log10(Pa / p0)