def calcphot(log, wavelengthArray, fluxArray, obsmode, extrapolate=False):
    """
    *Run calcphot on single spectrum and filter.*

    **Key Arguments:**
        - ``log`` -- logger
        - ``wavelengthArray`` -- the array containing the wavelength range of the spectrum
        - ``fluxArray`` -- the array contain the respective spectrum flux (as function of wavelength)
        - ``obsmode`` -- the observation mode (generally a filter system and filter type, e.g. "sdss,g")
        - ``extrapolate`` -- extrapolate spectra in database to cover the requested band-pass. Default *False*.

    **Return:**
        - None
    """
    import pysynphot as syn
    if extrapolate:
        force = 'extrapolate'
    else:
        force = None
    sp = syn.ArraySpectrum(wave=wavelengthArray, flux=fluxArray, waveunits=
        'angstrom', fluxunits='flam')
    bp = syn.ObsBandpass(obsmode)
    obs = syn.Observation(sp, bp, force=force)
    abMag = obs.effstim('abmag')
    return abMag
