Xmipp  v3.23.11-Nereus
python_constants.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 #include "xmippmodule.h"
27 #include "core/metadata_sql.h"
29 #include "core/xmipp_datatype.h"
30 #include "core/xmipp_color.h"
31 #include "core/xmipp_image_base.h"
32 #include "core/axis_view.h"
33 #include "core/xmipp_random_mode.h"
34 #include "core/xmipp_macros.h"
35 
36 /***************************************************************/
37 /* MDLabels constants */
38 /**************************************************************/
39 
40 void addIntConstant(PyObject * dict, const char * name, const long &value)
41 {
42  PyObject * pyValue = PyLong_FromLong(value);
43  PyDict_SetItemString(dict, name, pyValue);
44  Py_DECREF(pyValue);
45 }
46 
47 //Macro to add constants to xmipp module with the same name
48 #define ADD_CONST(label) addIntConstant(dict, #label, (long)label)
49 // and with different name
50 #define ADD_CONST2(name, label) addIntConstant(dict, name, (long)label)
51 
52 void addLabels(PyObject * dict)
53 {
54 
55  //Add constants
61 
62 
68 
78  ADD_CONST(LEFT);
81  ADD_CONST(EQ);
82  ADD_CONST(NE);
83  ADD_CONST(GT);
84  ADD_CONST(LT);
85  ADD_CONST(GE);
86  ADD_CONST(LE);
91 
92  //Metadata Labels
114 
118 
126 
142 
145 
149 
222 
238 
240 
244 
246 
251 
254 
269 
271 
276  ADD_CONST(MDL_LL);
307 
323 
328 
333 
359 
380 
431 
435 
436 
440 
442 
447 
449 
458 
474 
478  ADD_CONST(MDL_X);
479 
482  ADD_CONST(MDL_Y);
485  ADD_CONST(MDL_Z);
500 
501  /* Label types */
519  ADD_CONST(_NONE);
520  ADD_CONST(HEADER);
521  ADD_CONST2("HEADER_ALL", _HEADER_ALL);
522  ADD_CONST(DATA);
523  ADD_CONST2("DATA_ALL", _DATA_ALL);
524  ADD_CONST(xmipp_transformation::WRAP);
527  ADD_CONST2("XMIPP_BLACK", BLACK);
528  ADD_CONST2("XMIPP_RED", RED);
529  ADD_CONST2("XMIPP_GREEN", GREEN);
530  ADD_CONST2("XMIPP_YELLOW", YELLOW);
531  ADD_CONST2("XMIPP_BLUE", BLUE);
532  ADD_CONST2("XMIPP_MAGENTA", MAGENTA);
533  ADD_CONST2("XMIPP_CYAN", CYAN);
534  ADD_CONST2("XMIPP_WHITE", WHITE);
535  ADD_CONST2("XMIPP_RND_UNIFORM", RND_UNIFORM);
536  ADD_CONST2("XMIPP_RND_GAUSSIAN", RND_GAUSSIAN);
537 
538  ADD_CONST2("DT_DEFAULT", DT_Default);
539  ADD_CONST2("DT_UNKNOWN", DT_Unknown);
540  ADD_CONST2("DT_UCHAR", DT_UChar);
541  ADD_CONST2("DT_SCHAR", DT_SChar);
542  ADD_CONST2("DT_USHORT", DT_UShort);
543  ADD_CONST2("DT_SHORT", DT_Short);
544  ADD_CONST2("DT_UINT", DT_UInt);
545  ADD_CONST2("DT_INT", DT_Int);
546  ADD_CONST2("DT_LONG", DT_Long);
547  ADD_CONST2("DT_FLOAT", DT_Float);
548  ADD_CONST2("DT_DOUBLE", DT_Double);
549  ADD_CONST2("DT_COMPLEXSHORT", DT_CShort);
550  ADD_CONST2("DT_COMPLEXINT", DT_CInt);
551  ADD_CONST2("DT_COMPLEXFLOAT", DT_CFloat);
552  ADD_CONST2("DT_COMPLEXDOUBLE", DT_CDouble);
553  ADD_CONST2("DT_BOOL", DT_Bool);
554  ADD_CONST2("DT_HALFFLOAT", DT_HalfFloat);
555  ADD_CONST2("DT_LASTENTRY", DT_LastEntry);
556 
563 
564  ADD_CONST2("XMIPP_EQUAL_ACCURACY",XMIPP_EQUAL_ACCURACY);
565 
570 
574  ADD_CONST(RLN_COMMENT); // The RLN_COMMENT is handled specially as well
575 
598 
629 
639 
646 
768 
783 
784  // New helical labes in Relion 2.x
811 
812  // New SGD labels in Relion 2.1
824 
855 
861 
866 
867 }
object id (int), NOTE: This label is special and shouldn't be used
Logarithm of the structure factor.
scale y of continuous assignment
CTF Background parameter.
linear scale-factor
Z size (int)
CTF gain.
contribution of an image to log-likelihood value
correlation of references assigned by two methods
Feature vectors used to classify particles (vector double)
< Micrographs Gini Coeff. (double)
X shift of continuous assignment.
Name of Metadata file for all references(string)
Name of the original micrograph, MDL_MICROGRAPH is probably a downsampled version of this one (std::s...
Particular neighbor (pointed myNEIGHBORS)
tsne coefficients in 2D
Rotation angle of an image (double,degrees)
< Score 2 for volumes
score by alignability (double)
Current block number (for incremental EM)
Weight due to Alignability Precision and Accuracy.
Defocus U (Angstroms)
Name of the corresponding original, tilted micrograph (std::string)
weighted correlation value between a particle and its assigned projection taking into the difference ...
Tilting angle of an image (double,degrees)
CTF gain.
Fourier shell correlation (double)
Fourier shell occupancy (double)
shift difference (double)
sampling rate in A/pixel (double)
Frequency in A of the local resolution of a residue (double)
Shift for the image in the Y axis (double)
CTF Background parameter.
void addLabels(PyObject *dict)
Amplitude contrast.
Symmetry number for a projection (used in ART)
Defocus V (Angstroms)
sampling rate in A/pixel (double)
Cell location for crystals.
Weight due to Alignability Precision.
Not equal.
Feature vectors used to classify particles (vector double)
Less than.
sampling rate in A/pixel (double)
Weight due to angular jumping.
Name of a position file (std::string)
Image associated to this object (std::string)
score by alignability experimental particles (double)
Defocus angle (degrees)
Microscope voltage (kV)
Longitudinal displacement.
difference between rot angles (double,degrees)
Feature vectors used to classify particles (vector double)
Initial tilt angle in X for missing region in subtomogram.
Index of an image within a list (size_t)
Correlation between the denoised image and the projection proposed.
Sum of elements of a given type (double) [this is a genereic type do not use to transfer information ...
< Type of randomness for Tilt (std::string)
score by alignability references (double)
Parameters file for the CTF Model (std::string)
Flip of continuous assignment.
CTF Background parameter.
Name for the reconstructed tomogram volume (std::string)
Cost percentile for the image (double)
Z component (double)
Distance to graph filtered max.
< Rotational angle dev and mean noise (vector double)
Maximum frequency (in Angstroms) at which non-astigmatic CTF correction is valid. ...
Signal change for an image.
Maximum value (double)
Resolution anisotropy used to store the significance of the Bingham Test (double) ...
Tilting angle of an image (double,degrees)
Particle size for particle picking.
Weight due correlation between two images/subtomos.
Number of automatic particles picked.
difference between two angles (double,degrees)
Initial tilt angle in Y for missing region in subtomogram.
Shift for the image in the X axis (double)
score by alignability (double)
First zero average (in Angstroms)
Tilt series id (std::string)
#define ADD_CONST(label)
Convergence cone.
Z Score (double)
File for generated angles.
Z Score (double)
Percentage of images assigned to the same class as this image.
CTF Background parameter.
Average change in offset (double pixels)
PSD correlation at 90 degrees.
Special label to be used when gathering MDs in MpiMetadataPrograms.
Feature vectors used to classify particles (vector double)
void addIntConstant(PyObject *dict, const char *name, const long &value)
CTF Background parameter.
Name for the CTF Model (std::string)
difference in Shift along Y axis (double)
A collection of micrographs, e.g. a tilt serie (std::string)
if read from file original image datatype, this is an struct defined in image
Noise description for projected angles.
Defocus U (Angstroms)
Z Score (double)
Weight of t-student distribution in robust Maximum likelihood.
Chromatic aberration.
Lens stability.
<Bfactor of a map, or even a local bfactor
Store a score for the coords. consensus (it will change the behavoir of the viewer) ...
auxiliary label to be used as an index (long)
CTF Background parameter.
Maximum value observed for a given NMA mode.
Z Score (double)
NMA Atom shift in Angstroms.
Y shift of continuous assignment.
Coefficients of the defocus adjustment plane.
A Power Spectrum Density file name (std::string)
CTF Background parameter.
CTF Background parameter.
Weight assigned to the image accordint to its clusterability with a significance with respect noise (...
Spherical aberration.
Z Score (double)
Name of the tilted images associated to MDL_IMAGE.
correlation value between a particle and its assigned projection
CTF value.
Angle between y-axis and tilt-axis (double, degrees) for tilted micrographs.
when previous assignment validation
< Lattice vector for projection (vector double)
Is this image enabled? (int [-1 or 1])
differential phase residual (double)
Mean of the movement in y direction of the motion map> (double)
Unique identifier for items inside a list or set (std::size_t)
Microscope voltage (kV)
CTF Background parameter.
Correlation between the 1st and 3rd ring of the CTF.
Y size (int)
Shift for the image in the Z axis (double) for crystals.
Score corresponding to the mean of cc with cc>threshold.
Detector MTF value.
P-value (1-percentile) of the class size compared to a random distribution (double in [0...
Image associated to this object (std::string)
Store a second class (int)
Rotation angle of an image (double,degrees)
tsne coefficicient in 1D
Minimum value (double)
Name for the area (or field of view). If one does not use (tilt) series, area would be the same as mi...
score by alignability references (double)
Score of the fitting.
Shift for the image in the Y axis (double) for crystals.
Weight due to Angular significance.
NMA Score of a given mode.
shift difference (double)
Name of an image from which MDL_IMAGE is coming from.
Number of elements of a type (int) [this is a genereic type do not use to transfer information to ano...
Score corresponding to the min of cc with cc>threshold.
Micrograph state for particle picking.
Half map/image file name (string)
NMA Collectivity of a given mode.
Name of an image (std::string)
difference between psi angles (double,degrees)
< Shift file for crystal projection
<Orthogonal projection or not (bool)
The label MDL_OBJID is special and should not be used.
Inelastic absorption.
Frequency in 1/A squared (double)
Integral of the radial PSD.
Standard deviation of the movement in y direction of the motion map> (double)
original sampling rate in A/pixel (double)
Equal.
Weight due to angular jumping.
< Score corresponding to the sum of cc with cc>threshold
CTF Background parameter.
Deformation in voxels.
Defocus angle (degrees)
a value of continuous assignment
Minimum damping at border.
Origin for the image in the Y axis (double)
Longitudinal displacement.
Frequency in A (double)
Y component in tilted micrograph (int)
< Have a crystal projection (bool)
Unique id of frame inside a Movie.
group images by defocus
Defocus group.
Cost for the image (double)
NMA Eigenvalue of a given mode.
average defocus (Angtroms)
R2 coefficient of subtracted particle.
< Particle variance (double)
< Score 3 for volumes
Feature vectors used to classify particles (vector double)
Angle between y-axis and tilt-axis (double, degrees) for untilted micrographs.
State for particle picking.
Number of manual particles picked.
Convergence cone.
#define XMIPP_EQUAL_ACCURACY
Definition: xmipp_macros.h:119
X component (int)
Flip the image? (bool)
Name for a Metadata file (std::string)
Name of a movie (std::string)
Normality test between histogram of micrography and gaussian distribution.
Greater equal.
Size of data vectors for classification (int)
MLF signal (double)
< Number of non-redundant projections directions (size_t)
Unique identifier of a movie.
CTF Background parameter.
Phase-shift from a phase-plate (in degrees)
Maximum value of normalized probability function (now called "Pmax/sumP") (double) ...
Number of elements of a type (int) [this is a genereic type do not use to transfer information to ano...
CTF Background parameter.
Image associated to this object (std::string)
Sum of all weights in ML model.
Normal mode displacements (vector double)
Maximum frequency at which the envelope drops below 0.1 (in Angstroms)
Standard deviation of the noise in ML model.
Half map/image 1 file name (string)
Projection onto a reduced manifold (vector double)
Average change in class assignment(double dimensionaless)
Weight due phase correlation between two images/subtomos.
Greater than.
Name of a residual image associated to this image.
Noise description for pixels&#39; gray level (when projecting)
Image associated to this object (std::string)
Intensity scale for an image.
Digital frequency at which the FRC drops below 0.5 (double)
Z Score (double)
Maximum cross-correlation for the image (double)
Micrograph unique id for reference (MDL_ITEM_ID should be used for Micrographs list) ...
Name of a mask associated to image.
Defocus coefficient of determination.
CTF Background parameter.
Model fraction (alpha_k) for a Maximum Likelihood model.
Number of missing region in subtomogram.
scaling factor for an image or volume (double)
Z Score of the mean of the residuals (double)
name of an image describing the CTF model
Name of a micrograph (std::string)
score by alignability experimental particles (double)
< Psi angle dev and mean noise (vector double)
KS-test statistics.
Cumulative SSNR (double)
Image associated to this object (std::string)
First zero disagreement with second model (in Angstroms)
Psi angle of an image (double,degrees)
Runs test on the projection of the PSD on the first principal component.
CTF_ CTF Background parameter.
X component in tilted micrograph (int)
Standard deviation of the offsets in ML model.
Type of missing region in subtomogram.
Z component (int)
3D Class to which the image belongs (int)
Frequency in 1/A (double)
difference between two angles (double,degrees)
Particle unique identifier for reference. (The MDL_ITEM_ID should be used when particle list) ...
Weight due to SSNR.
Standatd deviation of the movement in x direction of the motion map> (double)
Correlation from previous alignment.
Name of the covariance imagee associated to this image.
Downsampling performed to estimate the CTF.
Pixel size for detector as used in CTF-determination.
#define ADD_CONST2(name, label)
CTF Background parameter.
score by alignability noise (double)
A enhanced Power Spectrum Density file name (std::string)
Beta 0 coefficient of adjusted model for subtract particle.
Class to which the image belongs (int)
Difference between the observed defocus value and the estimated defocus value.
Variance in the first principal component of the PSDs.
Weight due to angular continuous assignment.
Vector of indexes to points some "neighbors".
Shift for the image in the X axis (double)
ctffind3 FOM (CC) for quality of CTF-fit
b value of continuous assignment
X size (int)
Global Z Score (double)
Number of images assigned to the same class as this image.
< Lattice vector for projection (vector double)
Name of Metadata file for all images (string)
Small values represent worse particles. Much larger than 1 for good particles.
Name for another CTF model (std::string)
score by mirror (double)
Y component (double)
Mean of the movement in x direction of the motion map> (double)
ID for the area (or field of view). If one does not use (tilt) series, area would be the same as micr...
MLF CTF estimated value (double)
Iceness of the micrograph.
Error in l2 (double)
Fourier shell correlation noise (double)
Percentile of the maximum cross-correlation for the image (double)
Deformation coefficients.
#define ALL_IMAGES
Name of the corresponding tilted micrograph (std::string)
Data vector for classification (vector double)
transformation matrix in numpy string format or space separated (std::string)
Figure of Merit in 0-1 range (double)
Shift for the image in the Z axis (double)
Average change in angular orientation (double degrees)
X component (double)
average value in the micrograph (double)
Index within a list (size_t)
Final tilt angle in Y for missing region in subtomogram.
#define FILENAMENUMBERLENGTH
Angular temperature (double,degrees)
P-value (1-percentile) of the relative class size (size/max(original_classes)) compared to a random d...
CTF Background parameter.
difference between two angles (double,degrees)
Weight due to Mirror Precision.
< Type of randomness for Rotational (std::string)
Weight due to Alignability Accuracy.
< Score 1 for volumes
scale x of continuous assignment
Correlation between the denoised image and the noisy version.
Origin for the image in the Z axis (double)
average value (double)
difference between tilt angles (double,degrees)
Average intraclass distance (double)
score by alignability (double)
Y component (int)
Less equal.
Defocus change with respect to previous defoucs (Angstroms)
Z Score of the stddev of the residuals (double)
Final tilt angle in X for missing region in subtomogram.
Ratio sigma(firstMinimum-firstZero)/sigma(firstZero)
Mirror fraction for a Maximum Likelihood model.
when previous assignment validation
Weight due to angular jumping.
Minimum value observed for a given NMA mode.
Shift for the image in the Y axis (double)
Radius of the neighborhood (radians)
Z Score of the covariance matrix of the residuals (double)
< Disappearing threshold (double)
Transversal displacemente.
shift difference (double)
< Psi angle range (vector double)
Current iteration number (int)
Spherical aberration.
< Tilt angle dev and mean noise (vector double)
Defocus V (Angstroms)
Chromatic aberration.
Transversal displacemente.
MLF Wiener filter (double)
Correlation between assigned direction and graph filtered maximum.
File with an NMA mode.
Name of an image (std::string)
Lens stability.
Magnification used for CTF-determination.
< Type of randomness for Psi (std::string)
Name of of the class image from which MDL_IMAGE is coming from.
Number of templates.
Color for particle picking.
Feature vectors used to classify particles (vector double)
MLF Wiener filter (double)
Beta 1 coefficient of adjusted model for subtract particle.
< Score 4 for volumes
Cell location for crystals.
imed value between a particle and its assigned projection
Fourier shell correlation (double)
masked correlation value between a particle and its assigned projection inside the region with pixel ...
Dose e/A^2 (double)
Serve to make annotations on the metadata row.
Differential Phase Residual evaluated at FRC=0.5.
difference in Shift along X axis (double)
A comment for this object /*** NOTE THIS IS A SPECIAL CASE AND SO IS TREATED ***/.
CTF Background parameter.
Seed for random number generator.
Noise description for particle&#39;s center coordenates (when projecting)