== Classification Matrix Image Files == Produced by: '''e2classify.py''' There are now two types of classification matrix files, those for 2-D image stacks and those for 3-D volume stacks. More 'layers' are used in the 3-D case because there are more alignment parameters. These image files are normally produced by programs like e2classify.py or e2classifykmeans.py. They contain information associating each of a set of particles with one or more reference particles, and by extension, 3-D orientations. They are generally produced (in some cases trivially) from a similarity matrix, by searching it for minimum (best matching) values. This file format permits each particle to (optionally) be associated with more than one reference image. The file normally contains a set of 6 images. The first image in the file contains the classification information. The size of the image in y is the number of particles that have been classified. The size of the x-axis determines the maximum number of different references each particle can be associated with. Most often nx = 1, meaning each particle is associated with a single reference. While the pixel values (like all EMAN2 images) are floating-point, they actually contain integers indicating reference image number. The file will normally contain 6 images for 2-D stacks: * Image 0 - which 'class' each particle (y axis) is associated with. Multiple values along x- axis * Image 1 - a 'weight' associated with each classification. This could be used for example, for something like maximum liklihood, so a particle has different probabilities of being in different classes, normally 1 * Image 2 - dx, translation to bring particle in alignment with this reference * Image 3 - dy, same * Image 4 - dalpha, rotation * Image 5 - 0 or 1, flip required * Image 6 - scale factor (1.0 no scaling) NEW 1/2011 Or 8 images for 3-D stacks: * Image 0 - which 'class' each particle (y axis) is associated with. Multiple values along x- axis * Image 1 - a 'weight' associated with each classification. This could be used for example, for something like maximum liklihood, so a particle has different probabilities of being in different classes, normally 1 * Image 2 - dx, translation to bring particle in alignment with this reference * Image 3 - dy, same * Image 3 - dz, same * Image 4 - az, rotation in EMAN convention * Image 5 - alt, same * Image 6 - phi, same * Image 7 - scale factor (1.0 no scaling)