Skip to content

Service to run imod batchruntomo#258

Merged
stephen-riggs merged 18 commits into
mainfrom
imod-tomo-service
Jun 22, 2026
Merged

Service to run imod batchruntomo#258
stephen-riggs merged 18 commits into
mainfrom
imod-tomo-service

Conversation

@stephen-riggs

@stephen-riggs stephen-riggs commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

For SXT imod batchruntomo is desired as an alternative to aretomo. This makes a service which can run batchruntomo with a limited subset of options.
In particular, patch or bead and wbp or sirt, with two recipes to support this.

Some of the aretomo parts of this repo are renamed.

Tested through the dev setup and Imod runs successfully, but currently only with version 4.9.2

To do in future PR:

  • Upgrade imod version
  • Aln file for tilt series alignment image
  • xy shift plot
  • alignment quality value

Links to DiamondLightSource/python-murfey#830 and #273

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.08%. Comparing base (0ba2096) to head (0f53457).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #258      +/-   ##
==========================================
- Coverage   83.11%   83.08%   -0.03%     
==========================================
  Files          70       72       +2     
  Lines        9065     9265     +200     
  Branches     1245     1264      +19     
==========================================
+ Hits         7534     7698     +164     
- Misses       1048     1075      +27     
- Partials      483      492       +9     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stephen-riggs stephen-riggs requested a review from tieneupin June 19, 2026 09:44
)
# Let this run, and check later if the output file exists
subprocess.run(["tif2mrc", str(tifftomo), stack_file])
subprocess.run(["tif2mrc", str(tifftomo), stack_file], capture_output=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're capturing the output, but it doesn't look there are any logs in place to note the output.

adoc_file = Path(tomo_params.stack_file).with_suffix(".adoc")
with open(adoc_file, "w") as adoc:
# Commands for copytomocoms
adoc.write(f"setupset.datasetDirectory={adoc_file.parent}\n")

@tieneupin tieneupin Jun 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file writing logic could be implemented by running adoc.write(...) in a for loop over the lines, with if blocks to handle the optional sections. That way, you wouldn't have to write adoc.write(...) repeatedly for each line.

@tieneupin tieneupin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine overall, with some suggestions for optimisation.

@stephen-riggs stephen-riggs merged commit 944a17a into main Jun 22, 2026
12 checks passed
@stephen-riggs stephen-riggs deleted the imod-tomo-service branch June 22, 2026 10:54
stephen-riggs added a commit to DiamondLightSource/python-murfey that referenced this pull request Jun 22, 2026
This moves the SXT processing into a rabbitmq message, and adds support for more recipes.
Recipes in the machine config are detected and all of these are used to send processing if the collection type is SXT. This will allow for using imod and aretomo.

Links to DiamondLightSource/cryoem-services#258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants