femto.marker module#
- class Marker(name=None, scan=1, speed=1.0, samplesize=(100, 50), x_init=-2.0, y_init=0.0, z_init=None, shrink_correction_factor=1.0, lsafe=2.0, speed_closed=5, speed_pos=0.5, cmd_rate_max=1200, acc_max=500, end_off_sample=True, _x=<factory>, _y=<factory>, _z=<factory>, _f=<factory>, _s=<factory>, depth=0.0, lx=1.0, ly=0.06)#
Bases:
LaserPath
Class that computes and stores the coordinates of a superficial abletion marker.
- depth: float = 0.0#
- lx: float = 1.0#
- ly: float = 0.06#
- cross(position, lx=None, ly=None)#
Cross marker.
The function takes the position (x, y, z) of the center of the marker and two lengths of the arms (lx, ly) and draws a cross with the given lengths.
- positionlist(float)
2D (x, y) or 3D (x, y, z) coordinates of the center of the cross [mm]. In case of 2D position the z coordinate is set to self.depth.
- lxfloat, optional
Length of the cross arm along the x direction [mm]. The default value is
self.lx
.- lyfloat, optional
Length of the cross arm along the y direction [mm]. The default value is
self.ly
.
- Return type:
None
- ruler(y_ticks, lx=None, lx2=None, x_init=None)#
Ticks marker.
Draws a serie of horizontal ablation lines parallel to the x axis. The y-coordinates of the ticks are given as input.
- y_ticksarray-like, list[float], npt.NDArray[np.float32]
List of y-coordinate values for each tick in the marker.
- lxfloat, optional
Length of the longer tick marks [mm]. The default value is
self.lx
.- lx2float, optional
Length of the tick marks [mm]. The default value is
0.75 * self.lx
.- x_initfloat
Starting position for the x coordinate [mm]. The default values is
self.x_init
.
- Return type:
None
- meander(init_pos, final_pos, width=1, delta=0.001, orientation='x')#
Parallel serpentine marker.
The function takes in the initial and final positions, the width of the meander, the distance between the parallel lines and connects the two points with a serpentine-like pattern. The orientation of the meander (parallel to x or y axis) can be given as input.
- init_poslist(float)
Starting position of the meander [mm].
- final_poslist(float)
Ending position of the meander [mm].
- widthfloat
Longitudinal width of the meander [mm]. The default value is 1 mm.
- deltafloat
The distance between the parallel lines of the meander [mm]. The default value is 0.001 mm.
- orientationstr
Orientation of the meander, either parallel to the ‘x’-axis or ‘y’-axis. The default value is ‘x’.
- Return type:
None
- ablation(points, shift=None)#
Ablation line.
The function takes a list of points and connects them with linear segments. The first point is the starting point of the ablation line. The line can shifted by a value given as input. Given a shift of ds the line is rigidly shifted along x and y of ds and -ds. In the default behaviour ds is set to
None
(no shift is applied).- points: list[list[float]]
List of points representing the vertices of a polygonal chain line.
- shift: float
Amount of shift between different lines. The default value is
None
.
- box(lower_left_corner, width=1.0, height=0.06)#
Box. The function creates a rectangular ablation pattern. It takes in the lower left corner of the rectangle, the width and height of the rectangle as input and generates a list of points representing the vertices of the rectangle. The ablation method is then called with this list of points to create the ablation pattern.
- lower_left_corner: list[float]
List of points representing the lower left corner of the rectangle.
- width: float
Width of the rectangle [mm]. The default value is 1.0 mm.
- height: float
Height of the rectangle [mm]. The default value is 0.060 mm.