Clipper
|
#include <hkl_data.h>
Public Types | |
typedef HKL_info::HKL_reference_index | HKL_reference_index |
Basic HKL_reference_index: see HKL_info. | |
typedef HKL_info::HKL_reference_coord | HKL_reference_coord |
HKL HKL_reference_index: see HKL_info. | |
Public Member Functions | |
virtual void | init (const HKL_info &hkl_info, const Cell &cell) |
initialiser: from parent hkl_info and cell | |
virtual void | init (const HKL_data_base &hkl_data) |
initialiser: from another hkl_data | |
virtual void | init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling) |
[CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling | |
bool | is_null () const |
test if object has been initialised | |
const HKL_info & | base_hkl_info () const |
get the parent HKL_info object | |
const Cell & | base_cell () const |
get the parent cell | |
const Spacegroup & | spacegroup () const |
[CLIPPER2] get spacegroup | |
const Cell & | cell () const |
[CLIPPER2] get cell | |
const Resolution & | resolution () const |
[CLIPPER2] get resolution | |
const HKL_sampling & | hkl_sampling () const |
[CLIPPER2] get HKL_sampling | |
const HKL_info & | hkl_info () const |
[CLIPPER2] get HKL_info object | |
ftype | invresolsq (const int &index) const |
get resolution by reflection index (based on true cell) | |
Range< ftype > | invresolsq_range () const |
get resolution limits of the list (based on true cell and missing data) | |
int | num_obs () const |
get number of observations in this list (based on missing data) | |
virtual void | update ()=0 |
update: synchornize info with parent HKL_info | |
virtual String | type () const =0 |
get data type (a list of names corresponding to the im/export values) | |
virtual bool | missing (const int &index) const =0 |
check if a data entry in the list is marked as 'missing' | |
virtual void | set_null (const int &index)=0 |
set data entry in the list to its null value | |
virtual int | data_size () const =0 |
return number of data elements in this type | |
virtual String | data_names () const =0 |
return names of data elements in this type | |
virtual void | data_export (const HKL &hkl, xtype array[]) const =0 |
conversion to array (for I/O) | |
virtual void | data_import (const HKL &hkl, const xtype array[])=0 |
conversion from array (for I/O) | |
virtual void | mask (const HKL_data_base &mask)=0 |
mask the data by marking any data missing in 'mask' as missing | |
HKL_reference_index | first () const |
return HKL_reference_index pointing to first reflection | |
HKL_reference_index | first_data () const |
return HKL_reference_index pointing to first non-missing data | |
HKL_reference_index & | next_data (HKL_reference_index &ih) const |
increment HKL_reference_index to next non-missing data | |
void | debug () const |
Protected Member Functions | |
HKL_data_base () | |
null constructor | |
virtual | ~HKL_data_base () |
destructor | |
Protected Attributes | |
const HKL_info * | parent_hkl_info |
const Cell * | parent_cell |
bool | cell_matches_parent |
ObjectCache< HKL_data_cacheobj > ::Reference | cacheref |
object cache ref | |
Spacegroup | spacegroup_ |
Cell | cell_ |
HKL_sampling | hkl_sampling_ |
Resolution | resolution_ |
This is the virtual base for the typed hkl_data objects. It exists to guarantee and interface by which data can be managed without knowledge of the specific data type.
clipper::HKL_data_base::HKL_data_base | ( | ) | [protected] |
initialiser: from parent hkl_info and cell
Initialise the object using a given reflection list and cell.
hkl_info | The reflection list object. |
cell | The unit cell for this datalist. |
Reimplemented in clipper::CHKL_data< T >, clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References clipper::HKL_info::cell(), cell(), clipper::Cell::equals(), and hkl_info().
Referenced by init().
void clipper::HKL_data_base::init | ( | const HKL_data_base & | hkl_data | ) | [virtual] |
initialiser: from another hkl_data
Initialise the object using a given reflection list and cell.
hkl_data | Object from which to inherit spacegrpoup, cell, sampling. |
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
void clipper::HKL_data_base::init | ( | const Spacegroup & | spacegroup, |
const Cell & | cell, | ||
const HKL_sampling & | hkl_sampling | ||
) | [virtual] |
[CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling
Initialise the object using a given spacegroup, cell, and sampling.
spacegroup | The spacegroup for this datalist. |
cell | The unit cell for this datalist. |
hkl_sampling | The reflection list description. |
Reimplemented in clipper::CHKL_data< T >, clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References clipper::ObjectCache< T >::cache(), cacheref, cell(), hkl_sampling(), init(), clipper::HKL_sampling::is_null(), clipper::Cell::is_null(), clipper::Spacegroup::is_null(), clipper::HKL_sampling::resolution(), and spacegroup().
bool clipper::HKL_data_base::is_null | ( | ) | const |
test if object has been initialised
References clipper::Cell::is_null(), and clipper::HKL_info::is_null().
Referenced by clipper::CHKL_data< T >::update().
ftype clipper::HKL_data_base::invresolsq | ( | const int & | index | ) | const |
get resolution by reflection index (based on true cell)
Return the resolution of a particular reflection. If the cell of this list closely matches (to within 0.5A) the cell of the parent list, this is a simple lookup, otherwise a metric calculation is required.
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References base_cell(), base_hkl_info(), clipper::HKL_info::hkl_of(), clipper::HKL::invresolsq(), and clipper::HKL_info::invresolsq().
Referenced by clipper::HKL_info::HKL_reference_base::invresolsq(), and invresolsq_range().
get resolution limits of the list (based on true cell and missing data)
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References first_data(), clipper::Range< T >::include(), clipper::HKL_info::HKL_reference_index::index(), invresolsq(), clipper::HKL_info::HKL_reference_index::last(), and next_data().
int clipper::HKL_data_base::num_obs | ( | ) | const |
get number of observations in this list (based on missing data)
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References first_data(), clipper::HKL_info::HKL_reference_index::last(), and next_data().
HKL_info::HKL_reference_index clipper::HKL_data_base::first | ( | ) | const |
return HKL_reference_index pointing to first reflection
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
HKL_info::HKL_reference_index clipper::HKL_data_base::first_data | ( | ) | const |
return HKL_reference_index pointing to first non-missing data
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References next_data().
Referenced by clipper::Resolution_ordinal::init(), invresolsq_range(), and num_obs().
HKL_info::HKL_reference_index & clipper::HKL_data_base::next_data | ( | HKL_info::HKL_reference_index & | ih | ) | const |
increment HKL_reference_index to next non-missing data
ih | The HKL reference to increment. |
Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.
References clipper::HKL_info::HKL_reference_index::index(), clipper::HKL_info::HKL_reference_index::last(), missing(), and clipper::HKL_info::HKL_reference_index::next().
Referenced by first_data(), clipper::Resolution_ordinal::init(), invresolsq_range(), and num_obs().