geopyv.templates¶
Module Contents¶
Classes¶
Class for circular subset template. Subclassed from Template. |
|
Class for square subset template. Subclassed from Template. |
|
Base class for geopyv subset template. |
- class geopyv.templates.Circle(radius=25)¶
Bases:
TemplateClass for circular subset template. Subclassed from Template.
- Parameters:
radius (int, optional) – Radius of the subset. Defaults to a value of 25.
- shape¶
String describing the shape of the subset.
- Type:
str
- dimension¶
String describing the meaning of the size attribute.
- Type:
str
- size¶
Radius of the subset.
- Type:
int
- n_px¶
Number of pixels in the subset template.
- Type:
int
- coords¶
2D array of subset template coordinates of type float.
- Type:
numpy.ndarray (Nx, 2)
- subset_mask¶
2D array of coordinates to mask of type float.
- Type:
numpy.ndarray (Nx, 2)
- class geopyv.templates.Square(length=25)¶
Bases:
TemplateClass for square subset template. Subclassed from Template.
- Parameters:
length (int, optional) – Half length of the side of the subset. Defaults to a value of 25.
- shape¶
String describing the shape of the subset.
- Type:
str
- dimension¶
String describing the meaning of the size attribute.
- Type:
str
- size¶
Half length of side of the subset.
- Type:
int
- n_px¶
Number of pixels in the subset template.
- Type:
int
- coords¶
2D array of subset template coordinates of type float.
- Type:
numpy.ndarray (Nx, 2)
- subset_mask¶
2D array of coordinates to mask of type float.
- Type:
numpy.ndarray (Nx, 2)
- class geopyv.templates.Template(size)¶
Base class for geopyv subset template.
- Parameters:
size (int) – Size of the subset.
- shape¶
String describing the shape of the subset.
- Type:
str
- dimension¶
String describing the meaning of the size attribute.
- Type:
str
- size¶
Size of the subset.
- Type:
int
- n_px¶
Number of pixels in the subset template.
- Type:
int
- coords¶
2D array of subset template coordinates of type float.
- Type:
numpy.ndarray (Nx, 2)
- subset_mask¶
2D array of coordinates to mask of type float.
- Type:
numpy.ndarray (Nx, 2)
- mask(centre, mask)¶
Method to mask subset based on binary mask from mesh.
- Parameters:
centre (numpy.ndarray (x,y)) – Centre of subset.
mask (numpy.ndarray (Nx,Ny)) – Mask to be applied to the mesh. Value of 0 indicates pixels to mask in template.