Inheritance diagram for ObjCryst::DiffractionDataSingleCrystal:
Public Member Functions | |
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",...). | |
const CrystVector_REAL & | GetIcalc () const |
returns the calculated diffracted intensity. | |
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 | |
void | ImportHklIobs (const string &fileName, const long nbRefl, const int skipLines=0) |
Import h,k,l,I from a file. | |
void | ImportHklIobsSigma (const string &fileName, const long nbRefl, const int skipLines=0) |
Import h,k,l,I,Sigma from a file. | |
void | ImportHklIobsSigmaJanaM91 (const string &fileName) |
Import h,k,l,I,Sigma from a Jana98 '*.m91' file. | |
void | ImportHklIobsGroup (const string &fileName, const unsigned int skipLines=0) |
Import h,k,l and grouped intensities from a file. | |
virtual REAL | GetRw () const |
Return the Crystal R-factor (weighted). | |
virtual REAL | GetR () const |
Return the Crystal R-factor (unweighted). | |
virtual REAL | GetChi2 () const |
Return conventionnal Chi^2. | |
virtual void | FitScaleFactorForRw () |
Compute the best scale factor minimising Rw. | |
virtual void | FitScaleFactorForR () |
Compute the best scale factor minimising R. | |
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. | |
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. | |
virtual void | GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst) |
Make a random move of the current configuration. | |
virtual REAL | GetLogLikelihood () const |
Get -log(likelihood) of the current configuration for the object. | |
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. | |
virtual void | XMLInput (istream &is, const XMLCrystTag &tag) |
Input From stream. | |
virtual const Radiation & | GetRadiation () const |
Get the radiation object for this data. | |
Radiation & | GetRadiation () |
virtual void | SetRadiationType (const RadiationType radiation) |
Set : neutron or x-ray experiment ? Wavelength ? | |
void | SetWavelength (const REAL) |
Set the (monochromatic) wavelength of the beam. | |
void | SetWavelength (const string &XRayTubeElementName, const REAL alpha2Alpha2ratio=0.5) |
\ brief Set X-Ray tube radiation. | |
void | SetEnergy (const REAL) |
Set the (monochromatic) energy of the beam. | |
Private Member Functions | |
virtual void | InitRefParList () |
void | CalcIcalc () const |
Calc intensities. | |
virtual CrystVector_long | SortReflectionBySinThetaOverLambda (const REAL maxTheta=-1.) |
void | InitOptions () |
Init options (currently only twinning). | |
void | PrepareTwinningCalc () const |
Determine the index of reflections to be summed because of twinning (GroupOption==1) 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). | |
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. | |
REAL | mChi2 |
Chi^2. | |
RefinableObjClock | mClockIcalc |
Last time Icalc was computed. | |
RefinableObjClock | mClockScaleFactor |
Last modification of the scale factor. | |
RefinableObjClock | mClockChi2 |
Clock the last time Chi^2 was computed. | |
RefObjOpt | mGroupOption |
Option for the type of grouping (0:no, 1:by theta values (twinning), 2:user-supplied groups). | |
CrystVector_REAL | mGroupIobs |
The observed intensities summed on all reflections that are (or could be) overlapped dur to a twinning. | |
CrystVector_REAL | mGroupSigma |
The uncertainty on observed grouped intensities. | |
CrystVector_REAL | mGroupIcalc |
The calculated intensities summed on all reflections that are grouped. | |
CrystVector_REAL | mGroupWeight |
The weight on each reflection sum in case of grouped reflections. | |
CrystVector_long | mGroupIndex |
The index of reflections which need to be summed. | |
long | mNbGroup |
Number of groups. | |
long | mNbGroupUsed |
Number of groups below max[sin(theta)/lambda]. | |
RefinableObjClock | mClockPrepareTwinningCorr |
Clock for twinning, when the preparation of twinning correction was last made. | |
Radiation | mRadiation |
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...
|
|
|
Constructor, with an assigned crystal structure.
|
|
Copy constructor.
|
|
|
|
Calc intensities.
|
|
So-called virtual copy constructor.
Implements ObjCryst::ScatteringData. |
|
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 |
|
Compute the best scale factor to minimize R, apply this scale factor and return the R value obtained.
|
|
Return conventionnal Chi^2.
|
|
Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry Reimplemented from ObjCryst::RefinableObj. |
|
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 array of observed intensities for all peaks.
|
|
Get -log(likelihood) of the current configuration for the object. By default (no likelihood evaluation available), this is equal to 0. This call should not be recursive, it is the task of the algorithm to get the sum of likelihoods for all objects invlolved.
Reimplemented from ObjCryst::RefinableObj. |
|
Get the current calculated value for the LSQ function.
Reimplemented from ObjCryst::RefinableObj. |
|
Get the observed values for the LSQ function.
Reimplemented from ObjCryst::RefinableObj. |
|
Get the weight values for the LSQ function.
Reimplemented from ObjCryst::RefinableObj. |
|
Number of LSQ functions.
Reimplemented from ObjCryst::RefinableObj. |
|
Return the Crystal R-factor (unweighted).
|
|
|
|
Get the radiation object for this data.
Implements ObjCryst::ScatteringData. |
|
Return the Crystal R-factor (weighted).
|
|
Scale factor (applied to Icalc to match Iobs).
|
|
Return the array of sigmas for observed intensities, for all peaks.
|
|
Return the weights (for each reflection) used for computing Rw.
|
|
Make a random move of the current configuration. This is for global optimization algorithms. the moves for each parameter are less than their global optimization step, multiplied by the mutation amplitude.
Reimplemented from ObjCryst::RefinableObj. |
|
Import h,k,l,I from a file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Import h,k,l and grouped intensities from a file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Import h,k,l,I,Sigma from a file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Import h,k,l,I,Sigma from a Jana98 '*.m91' file. The file is assumed to correspond to a single crystal diffraction file.
|
|
Init options (currently only twinning).
|
|
|
|
Determine the index of reflections to be summed because of twinning (GroupOption==1) The reflections must have been sorted by increasing theta beforehand.
|
|
Print H, K, L Iobs sigma Icalc for all reflections Iobs and sigma (if given) are scaled to Icalc (if available).
|
|
Print H, K, L Iobs sigma for all reflections.
|
|
Save H,K,L Iobs Icalc to a file, text format, 3 columns theta Iobs Icalc. If Iobs is missing, the column is omitted. |
|
Set the (monochromatic) energy of the beam.
|
|
input H,K,L, Iobs and Sigma
|
|
Return the array of observed intensities for all peaks.
|
|
Set Iobs to current values of Icalc. Mostly used for tests.
|
|
Set : neutron or x-ray experiment ? Wavelength ?
|
|
Return the array of sigmas for observed intensities, for all peaks.
|
|
Set sigma for all observed intensities to sqrt(obs).
|
|
|
|
\ brief Set X-Ray tube radiation.
NOTE : if the name of the wavelength is generic (eg"Cu"), then the program considers that there are both Alpha1 and Alpha2, and thus automatically changes the WavelengthType to WAVELENGTH_ALPHA12. If instead either alpha1 or alpha2 (eg "CuA1") is asked for, the WavelengthType is set to WAVELENGTH_MONOCHROMATIC. In both cases, the radiation type is set to X-Ray. |
|
Set the (monochromatic) wavelength of the beam.
|
|
Change the weights (for each reflection) used for computing Rw.
|
|
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. |
|
For internal use only. sort reflections by theta values (also get rid of [0,0,0] if present) If maxSTOL >0, then only reflections where sin(theta)/lambda<maxSTOL are kept
Reimplemented from ObjCryst::ScatteringData. |
|
Input From stream.
Reimplemented from ObjCryst::RefinableObj. |
|
Output to stream in well-formed XML.
Reimplemented from ObjCryst::RefinableObj. |
|
Calculated intensities.
|
|
Chi^2.
|
|
Clock the last time Chi^2 was computed.
|
|
Last time Icalc was computed.
|
|
Clock for twinning, when the preparation of twinning correction was last made.
|
|
Last modification of the scale factor.
|
|
The calculated intensities summed on all reflections that are grouped.
|
|
The index of reflections which need to be summed. They must have been sorted by increasing theta values. Each entry (the reflection index) marks the beginning of a new batch of reflections to be summed. Here only the groups of reflections are roughly sorted by sin(theta)/lambda. It is assumed, howver, that grouped reflections are of approximately the same d_hkl. After ScatteringData::GetNbReflBelowMaxSinThetaOvLambda(), the number of groups for which *all* reflections are below the limit are taken into account for the statistics. Note that DiffractionDataSingleCrystal::SortReflectionBySinThetaOverLambda() is called (i.e. immediately after importing the reflections) |
|
The observed intensities summed on all reflections that are (or could be) overlapped dur to a twinning.
|
|
Option for the type of grouping (0:no, 1:by theta values (twinning), 2:user-supplied groups).
|
|
The uncertainty on observed grouped intensities.
|
|
The weight on each reflection sum in case of grouped reflections. The sum is the inverse of the sum of all sigma^2 |
|
Are there observed intensities ?
|
|
Number of groups.
|
|
Number of groups below max[sin(theta)/lambda].
|
|
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. |
|
Sigma for observed intensities (either individual reflections or spectrum).
|
|
|
|
Scale factor. It is applied when computing intensities. The scale applies to intensities |
|
weight for computing R-Factor, for each observed value.
|