Пример #1
0
    outfile.close()
  else:
    for ind in range(len(freq)):
      print nm_u.report_func(freq[ind], [l for Q in fq for l in Q[ind]], P=1.)
    
####################################################################################################
#
#
#       perform forward FFT of |a| (amplitudue abs value)
#
#
####################################################################################################

if opts.amp_fft:
  if opts.verbose: print "computing forward FFT of abs(a)"
  freq, fA, N_m = nm_u.nmode_fft(t_P, [ [ [nm_u.amp(l1,l2), 0] for l1, l2 in Q] for Q in q], verbose=opts.verbose)

  if opts.amp_fft_outfilename:
    if opts.verbose: print "writing abs(a) FFT data to %s" % opts.amp_fft_outfilename 
    outfile = open(opts.amp_fft_outfilename, "w")
    for ind in range(len(freq)):
      print >>outfile, nm_u.report_func(freq[ind], [l for Q in fA for l in Q[ind]], P=1.)
    outfile.close()
  else:
    for ind in range(len(freq)):
      print nm_u.report_func(freq[ind], [l for Q in fA for l in Q[ind]], P=1.)