Chazin Home Chazin Home | Ca-binding Protein DB | Vanderbilt Home Vanderbilt Home
Research Description | Publications | Wisdom | Search

How to convert multiple .osc files into a composite image

Jonathan Sheehan
Chazin Lab
5144D MRBIII
6-2233

Assumptions:

Two Steps:

1) You can run a simple script like this to create a .jpg file from each .osc file:


#!/bin/csh -f

set exten01 = "osc"
set exten02 = "jpg"
set MOSFLM = ipmosflm
set files = *.osc

foreach I ($files)
set base = `basename ${I} .${exten01}`

$MOSFLM << EOF
image ${I}
xgui on
go
CREATE_IMAGE BINARY TRUE FILENAME ${base}.${exten02}
return
exit
exit
EOF

end

(You can copy this text into a file named convertOsc.csh
Then make it executable with 'chmod +x convertOsc.csh'
Then run it with './convertOsc.csh'
In our lab, you set up your environment first with 'source /sb/apps/ccp4-5.0/include/ccp4.setup')

2) Then use a command like this to combine all the jpegs, label them with their filenames, and output a .png image:

montage -geometry 200x200 -label "%f" -tile 5x6 *.jpg composite.png

[This information was adapted from the mosflm documentation].


back to my home page


created 9-8-2004 by Jonathan Sheehan