#include <DiffractionDataSingleCrystal.h>
Inheritance diagram for ObjCryst::DiffractionDataSingleCrystal::
Public Methods | |
DiffractionDataSingleCrystal () | |
DiffractionDataSingleCrystal (Crystal &cryst) | |
Constructor, with an assigned crystal structure. | |
DiffractionDataSingleCrystal (const DiffractionDataSingleCrystal &old) | |
Copy constructor. | |
~DiffractionDataSingleCrystal () | |
virtual DiffractionDataSingleCrystal * | CreateCopy () const |
So-called virtual copy constructor. | |
virtual const string & | GetClassName () const |
Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry. | |
const CrystVector_REAL & | GetIcalc () const |
returns the calculated diffracted intensity. More... | |
const CrystVector_REAL & | GetIobs () const |
Return the array of observed intensities for all peaks. | |
void | SetIobs (const CrystVector_REAL &) |
Return the array of observed intensities for all peaks. | |
const CrystVector_REAL & | GetSigma () const |
Return the array of sigmas for observed intensities, for all peaks. | |
void | SetSigma (const CrystVector_REAL &) |
Return the array of sigmas for observed intensities, for all peaks. | |
void | SetIobsToIcalc () |
Set Iobs to current values of Icalc. Mostly used for tests. | |
const CrystVector_REAL & | GetWeight () const |
Return the weights (for each reflection) used for computing Rw. | |
void | SetWeight (const CrystVector_REAL &) |
Change the weights (for each reflection) used for computing Rw. | |
void | SetHklIobs (const CrystVector_long &h, const CrystVector_long &k, const CrystVector_long &l, const CrystVector_REAL &iObs, const CrystVector_REAL &sigma) |
input H,K,L, Iobs and Sigma. More... | |
void | ImportHklIobs (const string &fileName, const long nbRefl, const int skipLines=0) |
Import h,k,l,I form a file. More... | |
void | ImportHklIobsSigma (const string &fileName, const long nbRefl, const int skipLines=0) |
Import h,k,l,I,Sigma form a file. More... | |
void | ImportHklIobsSigmaJanaM91 (const string &fileName) |
Import h,k,l,I,Sigma form a Jana98 '*.m91' file. More... | |
virtual REAL | GetRw () const |
Return the Crystal R-factor (weighted). More... | |
virtual REAL | GetR () const |
Return the Crystal R-factor (unweighted). More... | |
virtual REAL | GetChi2 () const |
Return conventionnal Chi^2. More... | |
virtual void | FitScaleFactorForRw () |
Compute the best scale factor minimising Rw. More... | |
virtual void | FitScaleFactorForR () |
Compute the best scale factor minimising R. More... | |
virtual REAL | GetBestRFactor () |
Compute the best scale factor to minimize R, apply this scale factor and return the R value obtained. | |
virtual void | SetSigmaToSqrtIobs () |
Set sigma for all observed intensities to sqrt(obs). | |
virtual void | SetWeightToInvSigma2 (const REAL minRelatSigma=1e-4) |
Set the weight for all observed intensities to 1/sigma^2. More... | |
REAL | GetScaleFactor () const |
Scale factor (applied to Icalc to match Iobs). | |
virtual void | PrintObsData () const |
Print H, K, L Iobs sigma for all reflections. | |
virtual void | PrintObsCalcData () const |
Print H, K, L Iobs sigma Icalc for all reflections Iobs and sigma (if given) are scaled to Icalc (if available). | |
virtual void | SetUseOnlyLowAngleData (const bool useOnlyLowAngle, const REAL angle=0.) |
void | SaveHKLIobsIcalc (const string &filename="hklIobsIcalc.out") |
Save H,K,L Iobs Icalc to a file, text format, 3 columns theta Iobs Icalc.If Iobs is missing, the column is omitted. | |
unsigned int | GetNbCostFunction () const |
Number of Cost functions. | |
const string & | GetCostFunctionName (const unsigned int) const |
Get a Cost function name from its id#. | |
const string & | GetCostFunctionDescription (const unsigned int) const |
Get the (short) description of a cost function. | |
virtual REAL | GetCostFunctionValue (const unsigned int) |
Get the current value of a cost function this should be const... | |
virtual unsigned int | GetNbLSQFunction () const |
Number of LSQ functions. | |
virtual const CrystVector_REAL & | GetLSQCalc (const unsigned int) const |
Get the current calculated value for the LSQ function. | |
virtual const CrystVector_REAL & | GetLSQObs (const unsigned int) const |
Get the observed values for the LSQ function. | |
virtual const CrystVector_REAL & | GetLSQWeight (const unsigned int) const |
Get the weight values for the LSQ function. | |
virtual void | XMLOutput (ostream &os, int indent=0) const |
Output to stream in well-formed XML. More... | |
virtual void | XMLInput (istream &is, const XMLCrystTag &tag) |
Input From stream. More... | |
Private Methods | |
virtual void | InitRefParList () |
void | CalcIcalc () const |
Calc intensities. | |
virtual CrystVector_long | SortReflectionByTheta (const REAL maxTheta=-1.) |
sort reflections by theta values (also get rid of [0,0,0] if present) If maxTheta >0, then only reflections where theta<maxTheta are kept
| |
void | InitOptions () |
Init options (currently only twinning). | |
void | PrepareTwinningCalc () const |
Determine the index of reflections to be summed because of twinning. The reflections must have been sorted by increasing theta beforehand. | |
Private Attributes | |
bool | mHasObservedData |
Are there observed intensities ? | |
CrystVector_REAL | mObsIntensity |
Observed intensity (after ABS and LP corrections). More... | |
CrystVector_REAL | mObsSigma |
Sigma for observed intensities (either individual reflections or spectrum). | |
CrystVector_REAL | mWeight |
weight for computing R-Factor, for each observed value. | |
CrystVector_REAL | mCalcIntensity |
Calculated intensities. | |
REAL | mScaleFactor |
Scale factor. It is applied when computing intensities. The scaleapplies to intensities. | |
RefinableObjClock | mClockIcalc |
Last time Icalc was computed. | |
RefinableObjClock | mClockScaleFactor |
Last modification of the scale factor. | |
RefObjOpt | mTwinningOption |
Option for the type of twinning. | |
CrystVector_REAL | mTwinnedIobsSum |
The observed intensities summed on all reflections that are (or could be) overlapped dur to a twinning. | |
CrystVector_REAL | mTwinnedIcalcSum |
The calculated intensities summed on all reflections that are (or could be) overlapped dur to a twinning. | |
CrystVector_REAL | mTwinnedWeight |
The weight on each reflection sum in case of twinning. The sum is the inverse of the sum of all sigma^2. | |
CrystVector_long | mTwinnedGroupIndex |
The index of reflections which need to be summed. They must have been sorted by increasing theta values. Each entry marks the beginning of a new batch of reflections to be summed. | |
RefinableObjClock | mClockPrepareTwinningCorr |
Clock for twinning, when the preparation of twiinning correction was last made. |
Currently this handles only in the simplest way single crystal dat: ie only data which has been completely corrected for Lorentz/Polarization and absorption.
What needs to be developped: define the geometry of the experiment (incident and emerging angles), the polarization of the beam, etc...
|
Compute the best scale factor minimising R. The computed scale factor is immediatly applied to Icalc |
|
Compute the best scale factor minimising Rw. The computed scale factor is immediatly applied to Icalc |
|
Return conventionnal Chi^2.
|
|
returns the calculated diffracted intensity. This is an array of calculated intensities for each reflections in the single crystal case, and the array with the full powder powder profile for powder diffraction. |
|
Return the Crystal R-factor (unweighted).
|
|
Return the Crystal R-factor (weighted).
|
|
Import h,k,l,I form a file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Import h,k,l,I,Sigma form a file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Import h,k,l,I,Sigma form a Jana98 '*.m91' file. The file is assumed to correspond to a single crystal diffraction file.
|
|
input H,K,L, Iobs and Sigma.
|
|
Set the weight for all observed intensities to 1/sigma^2. For sigmas which are smaller than minRelatSigma times the max value of sigma, the output weight is set to 0. |
|
sort reflections by theta values (also get rid of [0,0,0] if present) If maxTheta >0, then only reflections where theta<maxTheta are kept
For internal use only.
Reimplemented from ObjCryst::ScatteringData. |
|
Input From stream.
Reimplemented from ObjCryst::RefinableObj. |
|
Output to stream in well-formed XML.
Reimplemented from ObjCryst::RefinableObj. |
|
Observed intensity (after ABS and LP corrections). In the single crystal case, this is a list of intensity corresponding to (h,k,l). For a powder sample, this is a list of all peaks intensities. |