#NEWLINE# def test_spectrum( self ) : #NEWLINE# #INDENT# roi = RectangularROI ( ) #NEWLINE# roi . update_limits ( 0 , 0 , 3 , 3 ) #NEWLINE# expected = self . x [ : , : 3 , : 3 ] . mean ( axis = 1 ) . mean ( axis = 1 ) #NEWLINE# ( _ , actual ) = Extractor . spectrum ( self . data , self . data . id [ 'x' ] , self , ( 0 , 'x' , 'y' ) , 0 ) #NEWLINE# np . testing . assert_array_almost_equal ( expected , actual )