Basin classes
- class pygaf.basins.CircBasin(cx=0.0, cy=0.0, diam=10, name='Circle basin')
Bases:
object
Circular basin.
- cx
Basin center x coordinate (units L, default 0.0).
- Type:
float
- cy
Basin center y coordinate (units L, default 0.0).
- Type:
float
- diam
Basin diameter (default 10.0).
- Type:
float
- rot
Basin rotation angle in radians (default 0.0).
- Type:
float
- name
Basin name (default ‘Unnamed’).
- Type:
str
- property area
basin area.
- Type:
float
- property diam
Basin diameter.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- Type:
float
- draw(dw=4)
Display a drawing of the basin.
- Parameters:
dw (float) – Width of basin drawing (default 4.0).
- info()
Print the basin information.
- is_circular = True
- is_rectangular = False
- property rad
Basin radius.
- Type:
float
- class pygaf.basins.RectBasin(cx=0.0, cy=0.0, lx=10, ly=10, rot=0, name='Rectangle basin')
Bases:
object
Rectangular basin.
- cx
Basin center x coordinate (units L, default 0.0).
- Type:
float
- cy
Basin center y coordinate (units L, default 0.0).
- Type:
float
- lx
Basin length in x direction (default 10.0)
- Type:
float
- ly
Basin length in y direction (default 10.0)
- Type:
float
- rot
Basin rotation angle in radians (default 0.0).
- Type:
float
- name
Basin name (default ‘Unnamed’).
- Type:
str
- property area
Basin area.
- Type:
float
- draw(dw=4)
Display a drawing of the basin.
- Parameters:
dw (float) – Width of basin drawing (default 4.0).
- info()
Print the basin information.
- is_circular = False
- is_rectangular = True
- property lx
Basin length in x direction.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- Type:
float
- property ly
Basin length in y direction.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- Type:
float
- property rot
Basin rotation angle in degrees.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- Type:
float
- property rot_rad
Basin rotation angle in radians.
- Type:
float
- property verts
x and y coordinates of basin verticies.
Vertex keys: ll - lower left, ul - upper left, lr - lower right and ur - upper right.
- Type:
dict
- property verts_rot
x and y rotated coordinates of basin verticies.
Vertex keys: ll - lower left, ul - upper left, lr - lower right and ur - upper right.
- Type:
dict