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

Loading data into ReciprocalViewer #9

Open
JBGreisman opened this issue Mar 10, 2022 · 2 comments
Open

Loading data into ReciprocalViewer #9

JBGreisman opened this issue Mar 10, 2022 · 2 comments

Comments

@JBGreisman
Copy link

I've been playing around with this project for making interactive GUIs for viewing maps using the UM.Viewer. In particular, I've been using MTZ files and the following call to load in data:

GemmiMtz().then(function(Module) {
	UM.load_maps_from_mtz(Module, V, "datafile.mtz", ['F_col', 'Phi_col']);
    });;

Is there a similar way to populate UM.ReciprocalViewer using a MTZ file? If not, is the main alternative to go through a CSV file that contains the relevant Miller indices? Do you mind explaining the columns in the example rlp.csv, and how they are used in the visualization?

@wojdyr
Copy link
Contributor

wojdyr commented Mar 17, 2022

Hi Jack,

I completely forgot how it worked, so I'll try to recollect.
Here is what I wrote in an email a few years ago:

Export spots from DIALS using:
dials.export datablock.json strong.pickle format=json
and then drag-and-drop the resulting rlp.json file on this page:
http://uglymol.github.io/reciprocal.html

I seems that this viewer works with reflections in either json or csv format.
json is from dials.export, but I don't remember where rlp.csv came from. Either DIALS has or used to have such an output format, or I converted it myself. I can't remember.
The meaning of the columns is in the first row in the csv file:

# x,y,z,experiment_id,imageset_id
-0.03520561,0.27965506,-0.57146448,0,0

I worked on the reciprocal viewer before I added reading of mtz files to UglyMol, so this wasn't considered at that time.
But also that's a different data, from an earlier stage of data processing.

@wojdyr
Copy link
Contributor

wojdyr commented Mar 17, 2022

I found a script that seems to write such csv files:
https://github.com/dials/dials/blob/v3.9.0/command_line/rl_csv.py

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

2 participants