rubedo/pattern_info.py
Mike Abbott 9680132c10 Full end-to-end support.
Cleaned up a lot of code.  Some things are still kind of messy, but it's a vast improvement over what I used to have.  Data is easy to pass around the system, and the pattern info has proved invaluable for cleanly connecting prints, scans, and analysis.
2023-04-04 16:49:03 -06:00

16 lines
609 B
Python

import numpy as np
class PatternInfo:
def __init__(self, start_value, stop_value, start_x, start_y, num_lines, line_length, spacing) -> None:
# TODO: honestly might be better to just have people pass in
# the values they want to test. It's more flexible that way.
self.pa_values = np.linspace(start_value, stop_value, num_lines)
self.start_x = start_x
self.start_y = start_y
self.line_length = line_length
self.spacing = spacing
def lines_start_y(self):
return [(x * self.spacing) + self.start_y for x in range(len(self.pa_values))]