def write_fine_calibration(fname, calibration):
 _check_fname(fname, overwrite=True)
 check_fname(fname, 'cal', ('.dat',))
 with open(fname, 'wb') as cal_file:
  for (ci, chan) in enumerate(calibration['ch_names']):
   cal_line = np.concatenate([calibration['locs'][ci], calibration['imb_cals'][ci]]).round(6)
   cal_str = ((str(chan) + ' ') + ' '.join(map((lambda x: ('%.6f' % x)), cal_line)))
   cal_file.write((cal_str + '\n').encode('ASCII'))

def write_fine_calibration ( fname , calibration ) : _check_fname ( fname , overwrite = True ) check_fname ( fname , 'cal' , ( '.dat' , ) ) with open ( fname , 'wb' ) as cal_file : for ( ci , chan ) in enumerate ( calibration [ 'ch_names' ] ) : cal_line = np . concatenate ( [ calibration [ 'locs' ] [ ci ] , calibration [ 'imb_cals' ] [ ci ] ] ) . round ( 6 ) cal_str = ( ( str ( chan ) + ' ' ) + ' ' . join ( map ( ( lambda x : ( '%.6f' % x ) ) , cal_line ) ) ) cal_file . write ( ( cal_str + '\n' ) . encode ( 'ASCII' ) )
write fine calibration information to a .