Xmipp  v3.23.11-Nereus
volume_correct_bfactor.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Author: Sjors H.W. Scheres (scheres@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 
26 #ifndef VOLUME_CORRECT_BFACTOR_H
27 #define VOLUME_CORRECT_BFACTOR_H
28 
29 #include "core/geometry.h"
31 
38 {
39 protected:
40 
44  double sampling_rate;
45 
53  enum class MODES {
54  BFACTOR_AUTO = 1,
55  BFACTOR_REF = 2,
56  BFACTOR_ADHOC = 3,
57  ALLPOINTS_REF = 4
58  };
59 
61 
63  int xsize;
64 
67 
69  double adhocB;
70 
73 
76  void show();
77  void defineParams();
78  void readParams();
79  void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut);
80 
81 public:
82 
85 
88  { }
89  ;
90 
94  void make_guinier_plot(MultidimArray< std::complex< double > > &m1,
95  std::vector<fit_point2D> &guinier);
96 
101  void apply_bfactor(MultidimArray< std::complex< double > > &FT1,
102  double bfactor);
103 
108  void apply_allpoints(MultidimArray< std::complex< double > > &FT1,
109  std::vector<fit_point2D> &guinier_diff);
110 
114  void get_snr_weights(std::vector<double> &snr);
115 
119  void apply_snr_weights(MultidimArray< std::complex< double > > &FT1,
120  std::vector<double> &snr);
121 
125  void write_guinierfile(const FileName& fn_guinier,
126  std::vector<fit_point2D> &guinierin,
127  std::vector<fit_point2D> &guinierweighted,
128  std::vector<fit_point2D> &guiniernew,
129  double intercept,
130  std::vector<fit_point2D> &guinierref);
131 
135  void bfactor_correction(MultidimArray< double > &m1, const FileName &fn_guinier);
136 };
138 #endif
void bfactor_correction(MultidimArray< double > &m1, const FileName &fn_guinier)
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
void write_guinierfile(const FileName &fn_guinier, std::vector< fit_point2D > &guinierin, std::vector< fit_point2D > &guinierweighted, std::vector< fit_point2D > &guiniernew, double intercept, std::vector< fit_point2D > &guinierref)
void apply_allpoints(MultidimArray< std::complex< double > > &FT1, std::vector< fit_point2D > &guinier_diff)
void make_guinier_plot(MultidimArray< std::complex< double > > &m1, std::vector< fit_point2D > &guinier)
void apply_snr_weights(MultidimArray< std::complex< double > > &FT1, std::vector< double > &snr)
void get_snr_weights(std::vector< double > &snr)
void apply_bfactor(MultidimArray< std::complex< double > > &FT1, double bfactor)