Skip to content

Commit d407f45

Browse files
committed
Allow multiple reconstruction recipes for sxt
1 parent 3f56224 commit d407f45

2 files changed

Lines changed: 30 additions & 25 deletions

File tree

src/murfey/client/contexts/sxt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def register_sxt_data_collection(
8585
)
8686

8787
recipes_to_assign_pjids = [
88-
"sxt-tomo-align",
88+
"sxt-aretomo",
89+
"sxt-imod-patch",
8990
]
9091
for recipe in recipes_to_assign_pjids:
9192
capture_post(

src/murfey/workflows/sxt/process_sxt_tilt_series.py

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def process_sxt_tilt_series_workflow(
5656
murfey_db.add(tilt_series)
5757
murfey_db.commit()
5858

59+
# Find all processing jobs registered for this tilt series
5960
collected_ids = murfey_db.exec(
6061
select(DataCollectionGroup, DataCollection, ProcessingJob, AutoProcProgram)
6162
.where(DataCollectionGroup.session_id == session_id)
@@ -64,8 +65,7 @@ def process_sxt_tilt_series_workflow(
6465
.where(DataCollection.dcg_id == DataCollectionGroup.id)
6566
.where(ProcessingJob.dc_id == DataCollection.id)
6667
.where(AutoProcProgram.pj_id == ProcessingJob.id)
67-
.where(ProcessingJob.recipe == "sxt-tomo-align")
68-
).one()
68+
).all()
6969
instrument_name = (
7070
murfey_db.exec(select(Session).where(Session.id == session_id))
7171
.one()
@@ -92,25 +92,29 @@ def process_sxt_tilt_series_workflow(
9292
/ f"{tilt_series.tag}_stack.mrc"
9393
)
9494
stack_file.parent.mkdir(parents=True, exist_ok=True)
95-
zocalo_message = {
96-
"recipes": ["sxt-tomo-align"],
97-
"parameters": {
98-
"txrm_file": tilt_series_info.txrm,
99-
"dcid": collected_ids[1].id,
100-
"appid": collected_ids[3].id,
101-
"stack_file": str(stack_file),
102-
"tilt_axis": 0,
103-
"pixel_size": tilt_series_info.pixel_size,
104-
"manual_tilt_offset": -tilt_series_info.tilt_offset,
105-
"node_creator_queue": machine_config.node_creator_queue,
106-
},
107-
}
108-
if _transport_object:
109-
logger.info(
110-
f"Sending Zocalo message for processing: {sanitise(str(zocalo_message))}"
111-
)
112-
_transport_object.send("processing_recipe", zocalo_message, new_connection=True)
113-
else:
114-
logger.info(
115-
f"No transport object found. Zocalo message would be {sanitise(str(zocalo_message))}"
116-
)
95+
for recipe_ids in collected_ids:
96+
# Loop over all processing jobs, and send the alignment recipe for it
97+
zocalo_message = {
98+
"recipes": recipe_ids[2].recipe,
99+
"parameters": {
100+
"txrm_file": tilt_series_info.txrm,
101+
"dcid": recipe_ids[1].id,
102+
"appid": recipe_ids[3].id,
103+
"stack_file": str(stack_file),
104+
"tilt_axis": 0,
105+
"pixel_size": tilt_series_info.pixel_size,
106+
"manual_tilt_offset": -tilt_series_info.tilt_offset,
107+
"node_creator_queue": machine_config.node_creator_queue,
108+
},
109+
}
110+
if _transport_object:
111+
logger.info(
112+
f"Sending Zocalo message for processing: {sanitise(str(zocalo_message))}"
113+
)
114+
_transport_object.send(
115+
"processing_recipe", zocalo_message, new_connection=True
116+
)
117+
else:
118+
logger.info(
119+
f"No transport object found. Zocalo message would be {sanitise(str(zocalo_message))}"
120+
)

0 commit comments

Comments
 (0)