def extract_spectra_from_file(log, pathToSpectrum, convertLumToFlux=False):
    """
    *Given a spectrum file this function shall convert the two columns (wavelength and luminosity) to a wavelegnth (wavelengthArray) and flux (fluxArray) array*

    **Key Arguments:**
        - ``log`` -- logger
        - ``pathToSpectrum`` -- absolute path the the spectrum file

    **Return:**
        - None
    """
    import os
    import numpy as np
    import dryxPython.astrotools as at
    pwd = os.getcwd()
    log.debug('pwd %s' % (pwd,))
    log.debug('pathToSpectrum %s' % (pathToSpectrum,))
    data = np.genfromtxt(pathToSpectrum, skip_header=0, usecols=(0, 1))
    wavelengthArray = data[:, (0)]
    luminosityArray = data[:, (1)]
    if convertLumToFlux:
        fluxArray = at.luminosity_to_flux(luminosityArray, 1e-05)
    else:
        fluxArray = luminosityArray
    log.debug('pathToSpectrum: %s' % (pathToSpectrum,))
    return wavelengthArray, fluxArray
