2,684
edits
(0.19) |
No edit summary |
||
Line 1: | Line 1: | ||
This script | This script generates XDS.INP based on a list of frame names supplied on the commandline. | ||
Currently works for MarCCD, ADSC and Pilatus 6M detectors. Also supports bzip2-ed frames (when specifying the frame names, leave out the .bz2 extension, as [http://strucbio.biologie.uni-konstanz.de/~dikay/XDS_html_doc/html_doc/xds_parameters.html#NAME_TEMPLATE_OF_DATA_FRAMES= documented] for XDS!). | |||
Installation: ask your system adminstrator to cut-and-paste it into e.g. /usr/local/bin/generate_XDS.INP , and to make it "executable". Usage is then just (don't forget the quotation marks!): | |||
generate_XDS.INP "frms/mydata_1_???.img" | |||
But you may also just cut-and-paste the script from this webpage into e.g. your home directory; the filename should be generate_XDS.INP. After creating the file, make it executable - e.g. if it's in your $HOME, use: | |||
chmod +x ~/generate_XDS.INP | |||
After that, you can just run it in the same way: | |||
~/generate_XDS.INP "frms/mydata_1_???.img" | |||
By using your own file, you can easily update to the latest revision, or even change the script, without having to bother the system administrator. | |||
This is the script: | |||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash | ||
Line 26: | Line 36: | ||
# revision 0.18 . KD 4/2011 - faster by doing "strings" only once; revert "images/${1##/*/}" "correction" | # revision 0.18 . KD 4/2011 - faster by doing "strings" only once; revert "images/${1##/*/}" "correction" | ||
# revision 0.19 . KD 6/2011 - bugfix for 0.18 | # revision 0.19 . KD 6/2011 - bugfix for 0.18 | ||
REVISION="0. | # revision 0.20 . KD 7/2011 - redirect stderr of /bin/ls to /dev/null | ||
REVISION="0.20 (15-Jul-2011)" | |||
# | # | ||
# usage: e.g. generate_XDS.INP "frms/mydata_1_???.img" | # usage: e.g. generate_XDS.INP "frms/mydata_1_???.img" | ||
Line 100: | Line 111: | ||
# list frames matching the wildcards in NAME_TEMPLATE_OF_DATA_FRAMES | # list frames matching the wildcards in NAME_TEMPLATE_OF_DATA_FRAMES | ||
# don't accept the "direct beam" shot at SLS/Pilatus PX-I and PX-II | # don't accept the "direct beam" shot at SLS/Pilatus PX-I and PX-II | ||
/bin/ls -C1 $1 $1.bz2 | egrep -v "_00000.cbf|_000.img" > tmp1 || exit 1 | /bin/ls -C1 $1 $1.bz2 2>/dev/null | egrep -v "_00000.cbf|_000.img" > tmp1 || exit 1 | ||
# we can continue - the frames are found | # we can continue - the frames are found |