# -*- coding: utf-8 -*-
"""
Created on Thu Apr 20 16:33:44 2017

Create the wavelength grid that samples the overall spectral energy distribution

@author: ishort
"""

import math
import numpy

def lamgrid(numLams, lamSetup):
    
    lambdaScale = []
    logLambda = 0.0
    
    #// Space lambdas logarithmically:
    logLam1 = numpy.double(math.log10(lamSetup[0]))
    logLam2 = numpy.double(math.log10(lamSetup[1]))
    delta = ( logLam2 - logLam1 ) / numpy.double(numLams)
    
    ii = 0.0
    
    for i in range(numLams):
        ii = numpy.double(i);
        logLambda = logLam1 + ( ii * delta );
        lambdaScale.append(math.pow(10.0, logLambda))
        
    return lambdaScale;
