Clean up debug prints; minor cleanup in README

This commit is contained in:
2025-07-07 10:05:29 +02:00
parent 8e4301c443
commit d9ef09a69e
3 changed files with 3 additions and 5 deletions

View File

@@ -142,6 +142,7 @@ options:
* `'bragg_counts': list[float]` - Provides the intensity sum within identified streaks.
* `'streaks': 4*list[float]` - Provides coordinates of the identified streaks: x0, y0, x1, y1.
* `'is_hit_frame': True/False` - Marks whether a frame qualifies as a hit based on the number of identified streaks.
* `'cbd_error': str` - An error message in case the streak finder failed on one of it's stages.
* **Radial Profile Integration**
@@ -272,7 +273,7 @@ Algorithms use input parameters specified in a JSON file provided to worker.py (
"roi_x1": [],
"roi_y1": [],
"roi_x2": [],
"roi_y2": [],
"roi_y2": []
}
```

View File

@@ -13,6 +13,7 @@ from streak_finder.label import Structure2D
DEFAULT_NUM_THREADS = 16
def calc_streakfinder_analysis(results, data, pf_pixel_mask):
do_snr = results.get("do_snr", False)
do_streakfinder_analysis = results.get("do_streakfinder_analysis", False)
@@ -22,7 +23,6 @@ def calc_streakfinder_analysis(results, data, pf_pixel_mask):
try:
cryst_data = _generate_cryst_data(results, data, pf_pixel_mask)
except Exception as error: # Broad exception - we don't want to break anything here
print(f"Error processing CBD data:\n{error}")
results["cbd_error"] = f"Error processing CBD data:\n{error}"
return data
@@ -34,7 +34,6 @@ def calc_streakfinder_analysis(results, data, pf_pixel_mask):
try:
_calc_streakfinder_analysis(results, cryst_data)
except Exception as error: # Broad exception - we don't want to break anything here
print(f"Error processing CBD data:\n{error}")
results["cbd_error"] = f"Error processing CBD data:\n{error}"
return data
@@ -164,7 +163,6 @@ def _calc_streakfinder_analysis(results, cryst_data: CrystData):
streak_lines = streak_lines.T
_, number_of_streaks = streak_lines.shape
print(f"Found {number_of_streaks} streaks")
list_result = [line.tolist() for line in streak_lines] # arr(4, n_lines); 0coord x0, y0, x1, y1

View File

@@ -121,7 +121,6 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
# Streak finder processing for convergent-beam diffraction experiments
# changes image and mask in place if do_snr=True in parameters file
image = calc_streakfinder_analysis(results, image, pixel_mask_pf)
print(f"Done\n{results=}")
image, aggregation_is_ready = calc_apply_aggregation(results, image, pixel_mask_pf, aggregator)