Skip to content

Vmxm spotfinding#343

Open
amyjaynethompson wants to merge 2 commits intomainfrom
vmxm_spotfinding
Open

Vmxm spotfinding#343
amyjaynethompson wants to merge 2 commits intomainfrom
vmxm_spotfinding

Conversation

@amyjaynethompson
Copy link
Contributor

Due to the unique optics and sample environment of VMXm, the standard spot finding parameters in DIALS are not ideal for processing their data. As a result, they always reprocess all useful data using their own scripts with the same non-standard parameters. They have requested that this be done automatically, and this PR is aimed to automate this process.

Parameters are passed into the recipe via Mimas for all VMXm datasets. As these parameters are not directly accessible in xia2, spots.phil is created in the processing directory, and these are passed directly into this file.

Comment on lines +59 to +60
if param.startswith("spotfinder"):
if "find_spots.phil_file=spots.phil" not in command:
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit nit-picky but I think this would be more readable as an if and statement rather than nested if statements

Copy link
Contributor

Choose a reason for hiding this comment

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

On second thoughts, if you keep the nested if statement, you could create a list of the spotfinder commands and use that later on to create the phil file, rhater than looping through all of the parameters again.

Comment on lines +209 to +217
# Write out spot finding parameters that are not directly accessible in xia2 to phil file

if "find_spots.phil_file=spots.phil" in command:
with open(subprocess_directory / "spots.phil", "w") as phil:
for param, value in params["ispyb_parameters"].items():
if "spotfinder" in param:
phil.write(f"{param}={value}\n")
self.log.info(f"Created spots.phil in {subprocess_directory}")

Copy link
Contributor

@pblowey pblowey Feb 20, 2026

Choose a reason for hiding this comment

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

If you moved the block that creates the find_spots phil file before the xia2_script you wouldn't need to distinguish run_command and command and I think the code would be more readable as a result

Copy link
Contributor

Choose a reason for hiding this comment

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

To add to the comment I made on the earlier code block, if you created a list of spotfinder params, you could just do if spotfinder_params: and write the list to file, rather than looping over all of the parameters again. This would also still save you having to distinguish command and run command.

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

Comments