Xmipp  v3.23.11-Nereus
phantom_simulate_microscope.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Carlos Oscar S. Sorzano (coss@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 #ifndef _PROG_MICROSCOPE_HH
26 #define _PROG_MICROSCOPE_HH
27 
29 #include "data/fourier_filter.h"
30 
34 /* Microscope Program Parameters ------------------------------------------- */
37 {
38 public:
42  double sigma;
50  double targetSNR;
54  bool CTFpresent;
66  size_t Xdim;
68  size_t Ydim;
72  double downsampling;
73  /* save U defocus in case we randomize it */
74  double defocusU;
75  /* save V defocus in case we randomize it */
76  double defocusV;
77 
78 public:
83  void readParams();
84 
87  void defineParams();
88 
90  void show();
91 
93  void estimateSigma();
94 
96  void setupFourierFilter(FourierFilter &filter, bool isBackground, double &power);
97 
99  void updateCtfs();
100 
102  void preProcess();
103 
104 
105  void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut);
106 
110  void apply(MultidimArray<double> &I);
111 
112 };
114 #endif
double defocus_change
Defocus change (%)
void apply(MultidimArray< double > &I)
size_t Ydim
Input image Ydim.
double low_pass_before_CTF
Low pass frequency before CTF.
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
bool after_ctf_noise
Filename with the root squared spectrum for noise after CTF.
FileName fn_ctf
Filename with the CTF.
double sigma_after_CTF
Noise power after CTF.
double sigma_before_CTF
Noise power before CTF.
double sigma
Total noise power.
FourierFilter lowpass
Low pass filter, if it is 0 no lowpass filter is applied.
FourierFilter after_ctf
After CTF noise root squared spectrum.
size_t Xdim
Input image Xdim.
void power(Image< double > &op)
MetaDataVec * pmdIn
Particular reference to mdIn to manipulated.
void setupFourierFilter(FourierFilter &filter, bool isBackground, double &power)