| 24 |
THE SOFTWARE. |
THE SOFTWARE. |
| 25 |
* |
* |
| 26 |
*/ |
*/ |
| 27 |
#include "gather_additional_Q.hh" |
#include "gather_q_of_3D_lattice.hh" |
| 28 |
#include "../utility_func/zmath.hh" |
#include "../utility_func/zmath.hh" |
| 29 |
#include "../zlog/zlog.hh" |
#include "../zlog/zlog.hh" |
| 30 |
#include "../ControlParam.hh" |
#include "../ControlParam.hh" |
| 76 |
qobs_range.begin = 0.0; |
qobs_range.begin = 0.0; |
| 77 |
qobs_range.end = m_qdata.rbegin()->q + sqrt(cv2 * m_qdata.rbegin()->q_var); |
qobs_range.end = m_qdata.rbegin()->q + sqrt(cv2 * m_qdata.rbegin()->q_var); |
| 78 |
|
|
| 79 |
m_latfom.putMillerIndicesInRange(qobs_range.begin, qobs_range.end, m_cal_hkl_tray); |
m_latfom.putMillerIndicesInRange(qobs_range.end, m_cal_hkl_tray); |
| 80 |
m_associated_hkl_tray.clear(); |
m_associated_hkl_tray.clear(); |
| 81 |
m_associated_hkl_tray.resize(num_fit_data); |
m_associated_hkl_tray.resize(num_fit_data); |
| 82 |
|
|
| 199 |
const Double& wave_length = cdata.putWaveLength(); |
const Double& wave_length = cdata.putWaveLength(); |
| 200 |
|
|
| 201 |
const vector< VecDat3<Int4> >& hkl_to_fit = putMillerIndicesToFit(); |
const vector< VecDat3<Int4> >& hkl_to_fit = putMillerIndicesToFit(); |
| 202 |
const ArrayIndex num_obsQ = hkl_to_fit.size(); |
const size_t num_obsQ = hkl_to_fit.size(); |
| 203 |
const SymMat<Double>& dbl_S = m_latfom.putOptimizedForm().first; |
const SymMat<Double>& dbl_S = m_latfom.putOptimizedForm().first; |
| 204 |
|
|
| 205 |
cal_q_tray.clear(); |
cal_q_tray.clear(); |
| 206 |
cal_pos_tray.clear(); |
cal_pos_tray.clear(); |
| 207 |
cal_q_tray.resize(num_obsQ); |
cal_q_tray.resize(num_obsQ); |
| 208 |
cal_pos_tray.resize(num_obsQ); |
cal_pos_tray.resize(num_obsQ); |
| 209 |
for(ArrayIndex l=0; l<num_obsQ; l++) |
for(size_t l=0; l<num_obsQ; l++) |
| 210 |
{ |
{ |
| 211 |
const VecDat3<Int4>& hkl = hkl_to_fit.at(l); |
const VecDat3<Int4>& hkl = hkl_to_fit.at(l); |
| 212 |
const Double q_cal = norm(hkl, dbl_S); |
const Double q_cal = norm(hkl, dbl_S); |
| 245 |
|
|
| 246 |
const vector< VecDat3<Int4> >& hkl_to_fit = putMillerIndicesToFit(); |
const vector< VecDat3<Int4> >& hkl_to_fit = putMillerIndicesToFit(); |
| 247 |
const vector<bool>& fix_or_fit_flag = putFittingIDs(); |
const vector<bool>& fix_or_fit_flag = putFittingIDs(); |
| 248 |
const ArrayIndex num_obsQ = hkl_to_fit.size(); |
const size_t num_obsQ = hkl_to_fit.size(); |
| 249 |
|
|
| 250 |
Vec_DP cal_q_tray, cal_pos_tray; |
Vec_DP cal_q_tray, cal_pos_tray; |
| 251 |
this->putPeakPosToFit(cdata, cal_q_tray, cal_pos_tray); |
this->putPeakPosToFit(cdata, cal_q_tray, cal_pos_tray); |
| 252 |
|
|
| 253 |
os->width(label_start); |
os->width(label_start); |
| 254 |
*os << "" << "<!-- q_obs, q_err, q_cal, peak_pos, peak_width, pos_cal, hkl, fix_or_fit.-->\n"; |
*os << "" << "<!-- q_obs, q_err, q_cal, peak_pos, peak_width, pos_cal, hkl, fix_or_fit.-->\n"; |
| 255 |
for(ArrayIndex l=0; l<num_obsQ; l++) |
for(size_t l=0; l<num_obsQ; l++) |
| 256 |
{ |
{ |
| 257 |
os->width(15); |
os->width(15); |
| 258 |
*os << m_qdata.at(l).q; |
*os << m_qdata.at(l).q; |