def sapm_spectral_loss(airmass_absolute, module):
am_coeff = [module['<STR_LIT>'], module['<STR_LIT>'], module['<STR_LIT>'], module['<STR_LIT>'],<EOL>module['<STR_LIT>']]<EOL>spectral_loss = np.polyval(am_coeff, airmass_absolute)<EOL>spectral_loss = np.where(np.isnan(spectral_loss), <NUM_LIT:0>, spectral_loss)<EOL>spectral_loss = np.maximum(<NUM_LIT:0>, spectral_loss)<EOL>if isinstance(airmass_absolute, pd.Series):<EOL><INDENT>spectral_loss = pd.Series(spectral_loss, airmass_absolute.index)<EOL><DEDENT>return spectral_loss<EOL>
Calculates the SAPM spectral loss coefficient, F1.

Parameters
----------
airmass_absolute : numeric
    Absolute airmass

module : dict-like
    A dict, Series, or DataFrame defining the SAPM performance
    parameters. See the :py:func:`sapm` notes section for more
    details.

Returns
-------
F1 : numeric
    The SAPM spectral loss coefficient.

Notes
-----
nan airmass values will result in 0 output.