Hi Richard,
Here's a Python script that will make 6 thumbnail images of each map
in a directory along +/- x, y and z axes. It sets the map contour level
to the mean plus two standard deviations.
To use it edit the line that sets the directory where the maps
reside. Then start Chimera and open the Python file. Make sure not to
cover the Chimera window while it is capturing images. The JPEG image
file are placed in the same directory and have names matching the map
files with suffixes 1,2,3,4,5,6.
Tom
# ----------------------------------------------------------------------------
# Make 6 views along +/- xyz axes of each map in a directory.
#
# Sets image size, background color, silhouette edges, and map contour level.
#
from chimera import runCommand as run
run('windowsize 100 100') # Set image size.
run('cd /tmp/emdb') # Go to directory containing maps
run('set bg_color white') # White background
from chimera import viewer
viewer.showSilhouette = True # Turn on silhouette edges
import os # Get all files that end with ".map"
filenames = os.listdir('.')
filenames = [f for f in filenames if f.endswith('.map')]
# Create images
for f in filenames:
run('open %s' % f) # Open map
# Set contour level to (mean + two standard deviations)
from VolumeViewer import active_volume
v = active_volume()
m = v.matrix()
level = m.mean() + 2*m.std()
run('volume #0 level %.6g' % level)
# Create 6 map images.
fprefix = f.rstrip('.map') # Remove ".map" suffix
run('copy file %s_1.jpg jpeg' % fprefix)
run('turn y 90')
run('copy file %s_2.jpg jpeg' % fprefix)
run('turn y 90')
run('copy file %s_3.jpg jpeg' % fprefix)
run('turn y 90')
run('copy file %s_4.jpg jpeg' % fprefix)
run('turn y 90')
run('turn x 90')
run('copy file %s_5.jpg jpeg' % fprefix)
run('turn x 180')
run('copy file %s_6.jpg jpeg' % fprefix)
run('close all')