def sphinpq(phi2, phinot, ql, phinoopt=0.2, fmf0=4.88):
    """Calculate S~PhiNPQ

    S~PhiNPQ = 1 - ((phi2 * 1 / (1 + phi2 * (1/phinoopt - 1/phinot) / (ql * fmf0) ))+fmf0)

    :param phi2: Phi2
    :param phinot: PhiNOt
    :param ql: qL
    :param phinoopt: Optimum PhiNO (default: 0.2)
    :param fmf0: Fv/Fm (default: 4.88)
    :returns: SPhiNPQ (float)
    """
    return 1 - ((phi2 * 1 / (1 + phi2 * (1/phinoopt - 1/phinot) / (ql * fmf0)))+phinoopt)