RenameImages
The names of the images, collected at synchrotrons, are choosen by
the operator. Often the name contains information about the compound,
the crystal, the experimental conditions, the scan number and
the frame number.
The name itself is irrelevant for the integration process, but a
simplified name makes the process understandable.
renameimages is a small program to rename
a set of images.
- renameimages searches the current
directory for images.
- The imagename is split into a scan-dependent part and a frame number
- The user may select a new global name.
- The scan dependent part is changed into a scannumber.
- The new name is build using the global name,
the scannumber, the letter f and the framenumber.
renameimages
- The program searches the current directory for images with filetypes
mar2300, mar2000, mar1600, mar1200, img, sfrm, mccd, osc, tif
- If the filetype = img, you have to
specify a new filetype (adsc for an
ADSC detector
or mccd for a MarCCD detector)
- If the filetype = tif, you have to
specify a new filetype (mccd for a
MarCCD detector)
- You specify a global name. Defaults to
s
- Then for each new scan, you specify the framenumber of the first
frame.
Input Files
None
Output files
Suppose the set of images is stored in a directory
/synchrotrondata/experiment/user/crystal27.
The images are called pc4_hex_001.mar2300,
pc4_hex_002.mar2300 .....
pc4_hex_066.mar2300.
We are creating a new directory for the integration process.
cd ~/process
mkdir crystal27
cd crystal27
ln -s /synchrotrondata/experiment/user/crystal27/*.mar2300 .
By using softlinks, the amount of occupied diskspace is kept small.
ls
pc4_hex_001.mar2300 pc4_hex_015.mar2300 pc4_hex_029.mar2300 pc4_hex_043.mar2300 pc4_hex_057.mar2300
pc4_hex_002.mar2300 pc4_hex_016.mar2300 pc4_hex_030.mar2300 pc4_hex_044.mar2300 pc4_hex_058.mar2300
pc4_hex_003.mar2300 pc4_hex_017.mar2300 pc4_hex_031.mar2300 pc4_hex_045.mar2300 pc4_hex_059.mar2300
pc4_hex_004.mar2300 pc4_hex_018.mar2300 pc4_hex_032.mar2300 pc4_hex_046.mar2300 pc4_hex_060.mar2300
pc4_hex_005.mar2300 pc4_hex_019.mar2300 pc4_hex_033.mar2300 pc4_hex_047.mar2300 pc4_hex_061.mar2300
pc4_hex_006.mar2300 pc4_hex_020.mar2300 pc4_hex_034.mar2300 pc4_hex_048.mar2300 pc4_hex_062.mar2300
pc4_hex_007.mar2300 pc4_hex_021.mar2300 pc4_hex_035.mar2300 pc4_hex_049.mar2300 pc4_hex_063.mar2300
pc4_hex_008.mar2300 pc4_hex_022.mar2300 pc4_hex_036.mar2300 pc4_hex_050.mar2300 pc4_hex_064.mar2300
pc4_hex_009.mar2300 pc4_hex_023.mar2300 pc4_hex_037.mar2300 pc4_hex_051.mar2300 pc4_hex_065.mar2300
pc4_hex_010.mar2300 pc4_hex_024.mar2300 pc4_hex_038.mar2300 pc4_hex_052.mar2300 pc4_hex_066.mar2300
pc4_hex_011.mar2300 pc4_hex_025.mar2300 pc4_hex_039.mar2300 pc4_hex_053.mar2300
pc4_hex_012.mar2300 pc4_hex_026.mar2300 pc4_hex_040.mar2300 pc4_hex_054.mar2300
pc4_hex_013.mar2300 pc4_hex_027.mar2300 pc4_hex_041.mar2300 pc4_hex_055.mar2300
pc4_hex_014.mar2300 pc4_hex_028.mar2300 pc4_hex_042.mar2300 pc4_hex_056.mar2300
renameimages
*_*.mar2300* --> pc4_hex_001.mar2300 oldfiletype=[mar2300] scanname=pc4_hex
scannumber=0 framenumber=1
new scan name [s] s
Created renameimages.log new scanname s01f first frame encountered = 1
Enter new first frame number[1] 1
ls
renameimages.log s01f0012.mar2300 s01f0024.mar2300 s01f0036.mar2300 s01f0048.mar2300 s01f0060.mar2300
s01f0001.mar2300 s01f0013.mar2300 s01f0025.mar2300 s01f0037.mar2300 s01f0049.mar2300 s01f0061.mar2300
s01f0002.mar2300 s01f0014.mar2300 s01f0026.mar2300 s01f0038.mar2300 s01f0050.mar2300 s01f0062.mar2300
s01f0003.mar2300 s01f0015.mar2300 s01f0027.mar2300 s01f0039.mar2300 s01f0051.mar2300 s01f0063.mar2300
s01f0004.mar2300 s01f0016.mar2300 s01f0028.mar2300 s01f0040.mar2300 s01f0052.mar2300 s01f0064.mar2300
s01f0005.mar2300 s01f0017.mar2300 s01f0029.mar2300 s01f0041.mar2300 s01f0053.mar2300 s01f0065.mar2300
s01f0006.mar2300 s01f0018.mar2300 s01f0030.mar2300 s01f0042.mar2300 s01f0054.mar2300 s01f0066.mar2300
s01f0007.mar2300 s01f0019.mar2300 s01f0031.mar2300 s01f0043.mar2300 s01f0055.mar2300
s01f0008.mar2300 s01f0020.mar2300 s01f0032.mar2300 s01f0044.mar2300 s01f0056.mar2300
s01f0009.mar2300 s01f0021.mar2300 s01f0033.mar2300 s01f0045.mar2300 s01f0057.mar2300
s01f0010.mar2300 s01f0022.mar2300 s01f0034.mar2300 s01f0046.mar2300 s01f0058.mar2300
s01f0011.mar2300 s01f0023.mar2300 s01f0035.mar2300 s01f0047.mar2300 s01f0059.mar2300
The old and new names are stored in
renameimages.log.
EVPY Suite Overview