tests/test-atmos.R

library( colorSpec )

testAtmos <- function()
    {
    wave    = 400:700
    
    junk = atmosTransmittance( c(500,1000,2000), wave=wave, aerosol=list(metrange=1000) )
        
    #   for special sequence wave[], reference wavelength 550nm is index 151
    err = junk[ 550 - wave[1] + 1,  2 ] - 0.02
    
    if( 1.e-10 < abs(err) ) return(FALSE)
    
    return(TRUE)
    }
    

    
if( ! testAtmos() )  stop( "testAtmos() failed !" )

cat( "Passed all atmosphere tests !\n", file=stderr() )

Try the colorSpec package in your browser

Any scripts or data that you put into this service are public.

colorSpec documentation built on April 2, 2018, 5:05 p.m.