Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/y/pyofss-0.9/pyofss/modules/linearity.py   pyofss(Download)
import numpy as np
 
from pyofss.field import fft, ifft, fftshift
# ==============================================================================
def convert_dispersion_to_physical( D = 0.0, S = 0.0, Lambda = 1550.0 ):
         for n, beta in enumerate( self.beta ):
            terms += beta * np.power( self.Domega, n ) / factorial(n)
         self.factor = 1j * fftshift( terms )
      # ========================================================================
      # Include attenuation term if available:
         for n, beta in enumerate( self.beta[1] ):
            terms[1] += beta * np.power( self.Domega[1], n ) / factorial(n)
         self.factor = (1j * fftshift(terms[0]), 1j * fftshift(terms[1]) )
      # ========================================================================
      # Include attenuation terms if available:

src/p/y/pyofss-0.9/pyofss/modules/nonlinearity.py   pyofss(Download)
from numpy import pi
 
from pyofss.field import fft, ifft, fftshift
from pyofss.domain import Domain
# ==============================================================================
   def __call__( self, domain ):
 
      self.centre_omega = domain.centre_omega
      self.omega = fftshift( domain.omega - domain.centre_omega )