Difference between revisions of "Binning tomograms"

From Dynamo
Jump to navigation Jump to search
Line 24: Line 24:
 
An example of use is:
 
An example of use is:
  
<tt>o = dpktomo.partition.bin(myFile.mrc,1,'of','binned.mrc','slabSize',100);</tt>
+
<tt>o = dpktomo.partition.bin(myFile.mrc,1,'of','binned.mrc','slabSize',100);</tt>
  
 
Here, {{t|slabSize}} determines that {{t|myFile.mrc}} will be read in vertical slabs, each one of 100 pixels.  {{t|of}} determines the output file. This procedure can be accelerated using the flag {{t|mw}} to engage several Matlab workers. However, this will only make sense if the total memory of   
 
Here, {{t|slabSize}} determines that {{t|myFile.mrc}} will be read in vertical slabs, each one of 100 pixels.  {{t|of}} determines the output file. This procedure can be accelerated using the flag {{t|mw}} to engage several Matlab workers. However, this will only make sense if the total memory of   
  
 
The extension needs to be {{t|mrc}}
 
The extension needs to be {{t|mrc}}

Revision as of 18:31, 19 May 2016

Tomograms can be binned in different ways from the command line.

Loading the full tomogram into memory

This is the simplest approach: read the full tomogram file into memory, bin it, and write the result onto a file. This is useful for small tomograms, or when working in machines with large memory, but it will probably not work when the tomogram is too big to fit into your memory.

For instance the order:

 dread myVolume.mrc a 

reads the file myVolume.mrc into the variable a. For a volume (), it takes 6 minutes on a MacBookPro (i5), during which the computer is close to frozen.

After reading the full tomogram, you still need to bin it. You can do it with the command dbin

 b=dbin(a,2); 

... which will also take some time to complete.


Creating chunks

An alternative way is to create several chunks that are read, binned and stored independently. The final (binned) volume is integrated after the different chunks have been processed separately. This happens transparently for the users.

An example of use is:

o = dpktomo.partition.bin(myFile.mrc,1,'of','binned.mrc','slabSize',100);

Here, slabSize determines that myFile.mrc will be read in vertical slabs, each one of 100 pixels. of determines the output file. This procedure can be accelerated using the flag mw to engage several Matlab workers. However, this will only make sense if the total memory of

The extension needs to be mrc