Esempio n. 1
0
   def loadTemplate(self, key):
      
      conf = {}
      
      if key == '1D ULA, water, critical sampling':
         
         # List the parameters we want:
         M     = 32        # Number of elements
         c     = 1540      # Acustic propagation speed in water
         fc    = 10e3      # Carrier frequency
         lmda  = c/fc      # Wavelength
         d     = lmda/2    # Distance between elements (spatial sampling)
#         w     = ones(M)/M # A rectangular window
         
         # Create some axes
         p     = linspace(0,1,M)*M*d
         
         # Find
#         kx  = k*cos(theta)

         conf['Medium'] = {
#            'id'       : 0                 ,
            'type'          : 'simple'          ,
            'c'             : c                 }

         conf['Interface'] = {
#            'id'       : 0                 ,
            'type'          : 'simple'          }


         p = Coordinate(x=p, y=None, z=None) 

         conf['Array'] = {
#            'id'       : 0                 ,
            'type'          : 'simple'          ,
            'p'             : p                 }

         conf['Data'] = {
#            'id'       : 0                 ,
            'type'          : 'none'            }

         w = Window()
         w.kaiser(32, 1, 0)

         conf['Window'] = {
#            'id'       : 0                 ,
            'type'          : 'custom'          ,
            'w'             : w.getData()       }
         
         conf['Signal' ] = {
#            'id'       : 0                 ,
            'type'          : 'continuous wave' ,
            'fc'            : fc                }

         conf['System' ] = {
#            'id'       : 0                 ,
            'type'          : 'Simple HUGIN template',
            'next'          : ('Window', 'Window')   }
      
      self.conf = conf
Esempio n. 2
0
    def loadTemplate(self, key):

        conf = {}

        if key == '1D ULA, water, critical sampling':

            # List the parameters we want:
            M = 32  # Number of elements
            c = 1540  # Acustic propagation speed in water
            fc = 10e3  # Carrier frequency
            lmda = c / fc  # Wavelength
            d = lmda / 2  # Distance between elements (spatial sampling)
            #         w     = ones(M)/M # A rectangular window

            # Create some axes
            p = linspace(0, 1, M) * M * d

            # Find
            #         kx  = k*cos(theta)

            conf['Medium'] = {
                #            'id'       : 0                 ,
                'type': 'simple',
                'c': c
            }

            conf['Interface'] = {
                #            'id'       : 0                 ,
                'type': 'simple'
            }

            p = Coordinate(x=p, y=None, z=None)

            conf['Array'] = {
                #            'id'       : 0                 ,
                'type': 'simple',
                'p': p
            }

            conf['Data'] = {
                #            'id'       : 0                 ,
                'type': 'none'
            }

            w = Window()
            w.kaiser(32, 1, 0)

            conf['Window'] = {
                #            'id'       : 0                 ,
                'type': 'custom',
                'w': w.getData()
            }

            conf['Signal'] = {
                #            'id'       : 0                 ,
                'type': 'continuous wave',
                'fc': fc
            }

            conf['System'] = {
                #            'id'       : 0                 ,
                'type': 'Simple HUGIN template',
                'next': ('Window', 'Window')
            }

        self.conf = conf