Top / Optics / Software / tessa / help

Help on module tessa:

NAME
tessa - Generate HDF5 optical structures for FDTD simulations
FILE
/var/lib/python-support/python2.5/tessa.py
CLASSES
   GeomStruct
       Block
       GenericCone
           Cone
       Prism
           Cylinder
       Sphere
   IndexFile
   
class Block(GeomStruct?)
    |  Block object class
    |  
    |  Methods defined here:
    |  
    |  __init__(self, x1, x2, y1, y2, z1, z2, index=1, absor=0)
    |      Create and initialize a block object
    |      
    |      x1,x2,y1,y2,z1,z2: bounding coordinates for the block
    |      index: refractive index inside the block (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class Cone(GenericCone?)
    |  Ellipsoidal cone object class
    |  
    |  Method resolution order:
    |      Cone
    |      GenericCone
    |      GeomStruct
    |  
    |  Methods defined here:
    |  
    |  __init__(self, a0, b0, ra, rb, c1, c2, cvertex, avertex=None, bvertex=None, projplane='z', index=1, absor=0)
    |      Create and initialize an ellipsoidal cone object
    |      
    |      a0,b0: the coordinates of the center of the ellipse in the
    |             projection plane
    |      ra,rb: the two radii of the ellipse centered at (a0,b0). If
    |             rb=None, it is taken equal to ra and we have a circle
    |      c1,c2: the limits where to truncate the cone for the coordinate
    |             orthogonal to the projection plane; c1 is the coordinate
    |             where we calculate the ellipse
    |      cvertex: the coordinate of the vertex in the direction orthogonal
    |               to the projection plane
    |      avertex,bvertex: same in the other directions (default to a0,b0)
    |      projplane: the projection plane, defined by its normal
    |                 direction. Must be either of 'x', 'y', or 'z'
    |                 (default='z')
    |      index: the refractive index inside the structure (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class Cylinder(Prism)
    |  Cylinder object class
    |  
    |  Method resolution order:
    |      Cylinder
    |      Prism
    |      GeomStruct
    |  
    |  Methods defined here:
    |  
    |  __init__(self, a0, b0, ra, rb, c1, c2, projplane='z', index=1, absor=0, axis=None)
    |      Create and initialize a cylinder object
    |      
    |      a0,b0: the coordinates of the center of the cylinder in the
    |             projection plane
    |      ra,rb: the two radii of the ellipse centered at (a0,b0). If
    |             rb=None, it is taken equal to ra and we have a circle
    |      c1,c2: the limits of our cylinder for the coordinate orthogonal
    |             to the projection plane
    |      projplane: the projection plane, defined by its normal
    |                 direction. Must be either of 'x', 'y', or 'z'
    |                 (default='z')
    |      index: the refractive index inside the structure (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |      axis: a tuple of length 3, defining a vector outside the
    |            projection plane, which is the projection direction
    |            (default= normal to the projection plane)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class GenericCone?(GeomStruct?)
    |  Generic cone object class
    |  
    |  Methods defined here:
    |  
    |  __init__(self, func, a1, a2, b1, b2, c1, c2, x0, y0, z0, projplane='z', index=1, absor=0)
    |      Create and initialize a generic cone object
    |      
    |      func: a 2-variable function returning True when inside the
    |            object, with the two arguments being the coordinates
    |            inside the projection plane (the c=c1 plane)
    |      a1,a2,b1,b2: the bounding box outside which func(a,b)
    |                   is always False
    |      c1,c2: the limits of our prism for the coordinate orthogonal
    |             to the projection plane; c1 is taken as the plane
    |             where we calculate the 2D function
    |      x0,y0,z0: the position of the vertex
    |      projplane: the projection plane, defined by its normal
    |                 direction. Must be either of 'x', 'y', or 'z'
    |                 (default='z')
    |      index: the refractive index inside the structure (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class GeomStruct?
    |  Generic geometric object class
    |  
    |  Methods defined here:
    |  
    |  __init__(self, func, x1, x2, y1, y2, z1, z2, index=1, absor=0, check_bounds=False)
    |      Create a generic geometric object
    |      
    |      func: a 3-argument function describing the object. func(x,y,z)
    |            must be True when inside the object, and False outside
    |      x1,x2,y1,y2,z1,z2: bounds outside which func(x,y,z) is always
    |                         False, i.e. a bounding box surrounding the
    |                         object
    |      index: the refractive index inside the object (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |      check_bounds: set it to True when func(x,y,z) is not guaranteed
    |                    to be False outside the bounding box. E.g. if
    |                    func(x,y,z) is always True you can use it to
    |                    build a block (default=False)
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class IndexFile?
    |  Workspace class to build HDF5 index files
    |  
    |  This class defines a workspace in which you can put geometric
    |  structures, and finally you can write them to a HDF5 file.
    |  
    |  Methods defined here:
    |  
    |  __init__(self, lx, ly, lz, index=1)
    |      Initialize an IndexFile structure
    |      
    |      lx, ly, lz: dimensions of the workspace, in metric units
    |      index: the default index in this workspace (default: 1)
    |  
    |  addobj(self, struct)
    |      Add a geometric object to the structure
    |      
    |      struct: the object to add (must be a GeomStruct instance)
    |  
    |  write(self, filename, delta_x=1.0, oversampling=4)
    |      Actually write the data to a HDF5 file
    |      
    |      filename: name of the HDF5 file to be created
    |      delta_x: space step of the final grid (default=1.)
    |      oversampling: the grid is subdivized in a higher resolution grid
    |                    to smooth the borders. This parameter sets how much
    |                    better it should be (default: 4)
class Prism(GeomStruct?)
    |  Generic prism object class
    |  
    |  Methods defined here:
    |  
    |  __init__(self, func, a1, a2, b1, b2, c1, c2, projplane='z', index=1, absor=0, axis=None)
    |      Create and initialize a generic prism object
    |      
    |      func: a 2-variable function returning True when inside the
    |            object, with the two arguments being the coordinates
    |            inside the projection plane
    |      a1,a2,b1,b2: the bounding box outside which func(a,b)
    |                   is always False.
    |      c1,c2: the limits of our prism for the coordinate orthogonal
    |             to the projection plane
    |      projplane: the projection plane, defined by its normal
    |                 direction. Must be either of 'x', 'y', or 'z'
    |                 (default='z')
    |      index: the refractive index inside the structure (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |      axis: a tuple of length 3, defining a vector outside the
    |            projection plane, which is the projection direction
    |            (default= normal to the projection plane)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3
class Sphere(GeomStruct?)
    |  Sphere object class
    |  
    |  Methods defined here:
    |  
    |  __init__(self, x0, y0, z0, r, index=1, absor=0)
    |      Create and initialize a sphere object
    |              
    |      x0,y0,z0: center of the sphere
    |      r: radius of the sphere
    |      index: refractive index inside the sphere (default=1.)
    |      absor: the absorption coefficient inside the object (default=0.)
    |  
    |  ----------------------------------------------------------------------
    |  Methods inherited from GeomStruct:
    |  
    |  isinside(self, x, y, z)
    |      Check whether a given coordinate is inside the geometric object
    |      
    |      x,y,z: coordinates of where to check
    |  
    |  local_index_absor_fill(self, x0, y0, z0, delta_x, nb, ar, ar2)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside, and another array with the absorption
    |      coefficient.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled with the index, of size nb^3
    |      ar2: the array to be filled with the absorption coefficient, same size
    |  
    |  local_index_fill(self, x0, y0, z0, delta_x, nb, ar)
    |      Fill an cubic array with the index of the object at the
    |      coordinates where we are inside.
    |      
    |      x0,y0,z0: coordinates of the starting corner of the array
    |      delta_x: the space step between two consecutive positions in the
    |               array
    |      nb: number of cells in each direction
    |      ar: the array to be filled, of size nb^3

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2009-04-28 (火) 18:08:08 (3371d)