Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French-Wilson script #51

Open
tjlane opened this issue Nov 4, 2024 · 3 comments
Open

French-Wilson script #51

tjlane opened this issue Nov 4, 2024 · 3 comments

Comments

@tjlane
Copy link
Collaborator

tjlane commented Nov 4, 2024

@kmdalton what do you think? If you guys have a good implementation, a simple CLI utility to turn intensities into SFAs would be great.

I'd love to not have to use phenix.reflection_file_converter...

@tjlane
Copy link
Collaborator Author

tjlane commented Nov 4, 2024

And I should say -- I volunteer myself for this task.

@JBGreisman
Copy link
Member

seems reasonable -- we have a French-Wilson implementation in reciprocalspaceship: https://github.com/rs-station/reciprocalspaceship/blob/cbf30c1c8438326baddf6a9898c2f5b5be3f7b43/reciprocalspaceship/algorithms/scale_merged_intensities.py#L178

We also currently use this in rs-booster as an internal IO convenience, so I agree it would make sense to have a standalone CLI if you think that would be useful:

# Run French-Wilson if intensities are provided
if isinstance(mtz[data_col].dtype, rs.IntensityDtype):
scaled = rs.algorithms.scale_merged_intensities(
mtz, data_col, sig_col, mean_intensity_method="anisotropic"
)
mtz = scaled.loc[:, ["FW-F", "FW-SIGF"]]
mtz.rename(columns={"FW-F": data_col, "FW-SIGF": sig_col}, inplace=True)

@kmdalton
Copy link
Member

kmdalton commented Nov 4, 2024

Yeah this makes sense to me. It should be relatively quick to implement. Let me know if you need help.

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

No branches or pull requests

3 participants