#NEWLINE# def test_get_airmass( ) : #NEWLINE# #INDENT# tus = Location ( 32.2 , ( - 111 ) , 'US/Arizona' , 700 , 'Tucson' ) #NEWLINE# times = pd . DatetimeIndex ( start = '20160101T0600-0700' , end = '20160101T1800-0700' , freq = '3H' ) #NEWLINE# airmass = tus . get_airmass ( times ) #NEWLINE# expected = pd . DataFrame ( data = np . array ( [ [ nan , nan ] , [ 3.61046506 , 3.32072602 ] , [ 1.76470864 , 1.62309115 ] , [ 2.45582153 , 2.25874238 ] , [ nan , nan ] ] ) , columns = [ 'airmass_relative' , 'airmass_absolute' ] , index = times ) #NEWLINE# assert_frame_equal ( expected , airmass ) #NEWLINE# airmass = tus . get_airmass ( times , model = 'young1994' ) #NEWLINE# expected = pd . DataFrame ( data = np . array ( [ [ nan , nan ] , [ 3.6075018 , 3.31800056 ] , [ 1.7641033 , 1.62253439 ] , [ 2.45413091 , 2.25718744 ] , [ nan , nan ] ] ) , columns = [ 'airmass_relative' , 'airmass_absolute' ] , index = times ) #NEWLINE# assert_frame_equal ( expected , airmass )