| 30 |
#include <map> |
#include <map> |
| 31 |
#include "LatticeFigureOfMeritZeroShift.hh" |
#include "LatticeFigureOfMeritZeroShift.hh" |
| 32 |
#include "../utility_data_structure/range.hh" |
#include "../utility_data_structure/range.hh" |
| 33 |
|
#include "../qc/reflection_conditions.hh" |
| 34 |
|
|
| 35 |
|
|
| 36 |
// Class for outputting information about a lattice in IGOR file. |
// Class for outputting information about a lattice in IGOR file. |
| 47 |
vector< VecDat3<Int4> > m_hkl_to_fit; |
vector< VecDat3<Int4> > m_hkl_to_fit; |
| 48 |
vector<bool> m_fix_or_fit_flag; // 0:fix, 1:fit. |
vector<bool> m_fix_or_fit_flag; // 0:fix, 1:fit. |
| 49 |
|
|
| 50 |
|
// If this is negative value, only the reflection conditions derived from the Bravais type are considered. |
| 51 |
|
Int4 m_type_of_reflection_conditions; |
| 52 |
|
|
| 53 |
// for GUI |
// for GUI |
| 54 |
bool m_showsTicks; |
bool m_showsTicks; |
| 55 |
|
|
| 97 |
|
|
| 98 |
inline const vector<QData>& putQDataModifiedWithNewPeakShiftParam() const { return m_qdata; }; |
inline const vector<QData>& putQDataModifiedWithNewPeakShiftParam() const { return m_qdata; }; |
| 99 |
|
|
| 100 |
// Return false if Qdata is not set or |
inline void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit){ m_latfom.setDeWolffFigureOfMerit(num_ref_figure_of_merit, m_type_of_reflection_conditions, m_qdata); }; |
|
// the number of unindexed reflections is larger max_num_false_peak. |
|
| 101 |
inline void setFigureOfMerit(const Int4& num_ref_figure_of_merit){ m_latfom.setFigureOfMerit(num_ref_figure_of_merit, m_qdata); }; |
inline void setFigureOfMerit(const Int4& num_ref_figure_of_merit){ m_latfom.setFigureOfMerit(num_ref_figure_of_merit, m_qdata); }; |
| 102 |
|
|
| 103 |
|
void setTypeOfSystematicAbsences(const Int4& arg); |
| 104 |
|
inline string putShortStringTypeOfSystematicAbsences() const |
| 105 |
|
{ |
| 106 |
|
return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putShortStringType(); |
| 107 |
|
}; |
| 108 |
|
inline const string& putStringTypeOfSystematicAbsences() const |
| 109 |
|
{ |
| 110 |
|
return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putStringType(); |
| 111 |
|
}; |
| 112 |
|
inline const string& putStringReflectionConditions() const |
| 113 |
|
{ |
| 114 |
|
return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putStringConditions(); |
| 115 |
|
}; |
| 116 |
|
inline const DataReflectionConditions& putDataOnReflectionConditions() const |
| 117 |
|
{ |
| 118 |
|
return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions); |
| 119 |
|
}; |
| 120 |
|
|
| 121 |
|
|
| 122 |
// Resets m_associated_hkl_tray and q-values in m_cal_hkl_tray. |
// Resets m_associated_hkl_tray and q-values in m_cal_hkl_tray. |
| 123 |
void resetQValuesInRange(const Int4& num_fit_data); |
void resetQValuesInRange(const Int4& num_fit_data); |
| 124 |
// Resets m_associated_hkl_tray and m_cal_hkl_tray. |
// Resets m_associated_hkl_tray and m_cal_hkl_tray. |
| 204 |
VCData::putPeakQData().size(), m_qdata); |
VCData::putPeakQData().size(), m_qdata); |
| 205 |
}; |
}; |
| 206 |
|
|
| 207 |
|
|
| 208 |
|
inline VecDat3<Int4> product_hkl(const VecDat3<Int4>& lhs, const NRMat<Int4>& rhs) |
| 209 |
|
{ |
| 210 |
|
assert( rhs.nrows() >= 3 && rhs.ncols() == 3 ); |
| 211 |
|
|
| 212 |
|
VecDat3<Int4> ans; |
| 213 |
|
ans[0] = lhs[0]*rhs[0][0] + lhs[1]*rhs[1][0] + lhs[2]*rhs[2][0]; |
| 214 |
|
ans[1] = lhs[0]*rhs[0][1] + lhs[1]*rhs[1][1] + lhs[2]*rhs[2][1]; |
| 215 |
|
ans[2] = lhs[0]*rhs[0][2] + lhs[1]*rhs[1][2] + lhs[2]*rhs[2][2]; |
| 216 |
|
return ans; |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
|
| 220 |
inline void LatticeFigureOfMeritToDisplay::reduceLatticeConstants() |
inline void LatticeFigureOfMeritToDisplay::reduceLatticeConstants() |
| 221 |
{ |
{ |
| 222 |
NRMat<Int4> trans_mat; |
NRMat<Int4> trans_mat; |
| 223 |
|
// trans_mat * m_latfom.m_S_optimized.first(new) * transpose(trans_mat) = m_latfom.m_S_optimized.first(old). |
| 224 |
m_latfom.reduceLatticeConstants(trans_mat); |
m_latfom.reduceLatticeConstants(trans_mat); |
| 225 |
|
|
| 226 |
for(vector<HKL_Q>::iterator it=m_cal_hkl_tray.begin(); it<m_cal_hkl_tray.end(); it++) |
for(vector<HKL_Q>::iterator it=m_cal_hkl_tray.begin(); it<m_cal_hkl_tray.end(); it++) |
| 234 |
} |
} |
| 235 |
}; |
}; |
| 236 |
|
|
| 237 |
|
inline bool cmpDeWolff(const LatticeFigureOfMeritToDisplay& lhs, const LatticeFigureOfMeritToDisplay& rhs) |
| 238 |
|
{ |
| 239 |
|
return lhs.putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() |
| 240 |
|
> rhs.putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff(); |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
|
| 244 |
#endif /*LatticeFigureOfMeritToDisplay_HH_*/ |
#endif /*LatticeFigureOfMeritToDisplay_HH_*/ |