fix: changes for saxs_params_start_stop

This commit is contained in:
e21536
2023-09-21 10:34:21 +02:00
parent 35b89ab86f
commit 6b51ad110a
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -11,6 +11,7 @@ class ScanItem:
def __init__(self, offset_xy: Callable) -> None:
self.entry = None
self.offset_xy = offset_xy
self.split_upon_points = 8000
def to_scan_params(self) -> List[dict]:
interval_x = int(
@@ -41,11 +42,11 @@ class ScanItem:
"md": {"sample_name": self.entry["sample name"]},
# "tilt": self.entry["tilt [deg]"]
}
if interval_x * interval_y <= 10000:
if interval_x * interval_y <= self.split_upon_points:
return [base_scan_params]
scan_params = []
# if we have more than 10000 points, split them along x
num_blocks = int(np.ceil((interval_x * interval_y) / 10000))
num_blocks = int(np.ceil((interval_x * interval_y) / self.split_upon_points))
start_end_positions = np.linspace(
base_scan_params["start_x"], base_scan_params["end_x"], num_blocks + 1
)
+1 -1
View File
@@ -2,7 +2,7 @@ module add psi-python38/2020.11
cd ~/Data10/software
python -m venv ./bec_widgets_venv
source ./bec_venv/bin/activate
source ./bec_widgets_venv/bin/activate
pip install --upgrade pip
cd ~/Data10/software/bec/bec_lib
pip install -e .