#NEWLINE# def _write_header( self , block , fi ) : #NEWLINE# #INDENT# 'Write header info about block to fi' #NEWLINE# if ( len ( block . segments ) > 0 ) : #NEWLINE# #INDENT# channel_indexes = channel_indexes_in_segment ( block . segments [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# channel_indexes = [ ] #NEWLINE# #UNINDENT# fi . write ( 'NEURALSG' ) #NEWLINE# fi . write ( '30 kS/s\x00' ) #NEWLINE# for _ in range ( 8 ) : #NEWLINE# #INDENT# fi . write ( '\x00' ) #NEWLINE# #UNINDENT# fi . write ( struct . pack ( '<I' , 1 ) ) #NEWLINE# fi . write ( struct . pack ( '<I' , len ( channel_indexes ) ) ) #NEWLINE# for chidx in channel_indexes : #NEWLINE# #INDENT# fi . write ( struct . pack ( '<I' , block ) )