Grid Generation¶
PtyLab.GridGeneration
¶
FermatGridGenerator
¶
GenerateFermatSpiral2(n, c=1)
¶
Generate a fermat spiral just like in matlab.
Source code in PtyLab/GridGeneration/FermatGridGenerator.py
solve_order(coords)
¶
A rather naive way to fix the orientation of any grid by taking the nearest point all the time.
There are smarter ways to do this, and it can probably go wrong but so far it does not seem to be horribly off.
Source code in PtyLab/GridGeneration/FermatGridGenerator.py
get_travel_distance(coords)
¶
display_spiral(coordinates, probe_size_coords=1)
¶
Make a plot of the coordinates, with an appropriately sized probe. :param coordinates: :param probe_size_coords: :return:
Source code in PtyLab/GridGeneration/FermatGridGenerator.py
scale_coordinates_by_probe_size(coordinates, probe_size, overlap=0.6)
¶
Scale the coordinates by a given probe size, with a desired overlap. Scales the coordinates in such a way that we have the required overlap.