#NEWLINE# def test_extract_wave( ) : #NEWLINE# #INDENT# traces = np . arange ( 30 ) . reshape ( ( 6 , 5 ) ) #NEWLINE# mask = np . array ( [ 0 , 1 , 1 , 0.5 , 0 ] ) #NEWLINE# wave_len = 4 #NEWLINE# hwl = ( wave_len // 2 ) #NEWLINE# ae ( _extract_wave ( traces , ( 0 - hwl ) , mask , wave_len ) [ 0 ] , [ [ 0 , 0 ] , [ 0 , 0 ] , [ 1 , 2 ] , [ 6 , 7 ] ] ) #NEWLINE# ae ( _extract_wave ( traces , ( 1 - hwl ) , mask , wave_len ) [ 0 ] , [ [ 0 , 0 ] , [ 1 , 2 ] , [ 6 , 7 ] , [ 11 , 12 ] ] ) #NEWLINE# ae ( _extract_wave ( traces , ( 2 - hwl ) , mask , wave_len ) [ 0 ] , [ [ 1 , 2 ] , [ 6 , 7 ] , [ 11 , 12 ] , [ 16 , 17 ] ] ) #NEWLINE# ae ( _extract_wave ( traces , ( 5 - hwl ) , mask , wave_len ) [ 0 ] , [ [ 16 , 17 ] , [ 21 , 22 ] , [ 0 , 0 ] , [ 0 , 0 ] ] )