Opened 4 years ago
Closed 4 years ago
#6561 closed defect (fixed)
volume sdLevels option gives wrong levels on multiple volumes
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Volume Data | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
Begin forwarded message:
From: Moisés Maestro López via ChimeraX-users <chimerax-users@…>
Subject: [chimerax-users] Setting the same sdLevel threshold for several volumes
Date: April 7, 2022 at 2:03:01 AM PDT
To: chimerax-users@…
Good morning,
I would like to set the threshold of multiple CryoEM Volumes (10-20) at the same time, and I would like to put all of them at the same sdlevel.
I use the command:
volume #1 sdLevel 2
But this only work for one volume, if I use
volume all sdLevel 2, or volume #1 #2 #3 sdLevel 2
It does not work and the threshold are random.
In chimera I had a script that I use for doing that but I have not found the way to do it in ChimeraX. In Chimera, I normally called the script with an alias.
alias allsd runscript ~/chimeraScriptSD.py
allsd 3
And the script (chimeraScriptSD.py) was:
import sys
import chimera
from VolumeViewer import Volume
mlist = chimera.openModels.list(modelTypes=[Volume])
sdlevel = 2
if len(sys.argv)>1:
sdlevel = sys.argv[1]
for m in mlist:
chimera.runCommand('volume '+str(m)+' sdlevel '+ str(sdlevel))
But I do not know how to do this in ChimeraX. The key point I do not know how to do is to do a loop that say “for any volume in all the opened volumes”.
Thanks for your help
Moisés
Fixed.
The sdLevel and rmsLevel options of the volume command code modified the option values as it processed each volume resulting in this bug. Made it not modify the option values.