57 typedef float ffttype;
61 template<
class T>
class F_phi;
67 enum FFTtype { Default, Measure, Estimate };
109 std::complex<ffttype>
get_hkl(
const HKL& hkl )
const;
111 void set_hkl(
const HKL& hkl,
const std::complex<ffttype>& f );
133 enum FFTmode { NONE, RECI, REAL, OTHER };
205 template<
class H,
class X>
void fft_rfl_to_map(
const H& h, X& x );
207 template<
class H,
class X>
void fft_map_to_rfl(
const X& x, H& h );
238 typename H::HKL_reference_index ih;
239 for ( ih = h.first_data(); !ih.last(); h.next_data( ih ) )
246 typename X::Map_reference_index ix;
247 for ( ix = x.first(); !ix.last(); ix.next() )
270 typename X::Map_reference_index ix;
271 for ( ix = x.first(); !ix.last(); ix.next() )
278 typename H::HKL_reference_index ih;
279 for ( ih = h.first(); !ih.last(); ih.next() )
Cell object.
Definition cell.h:122
Grid coordinate.
Definition coords.h:237
const int & v() const
get v
Definition coords.h:249
Coord_grid unit(const Grid_sampling &g) const
reduce to unit box: (0..nu-1, 0..nv-1, 0..nw-1)
Definition coords.h:744
const int & w() const
get w
Definition coords.h:250
const int & u() const
get u
Definition coords.h:248
static Mutex mutex
Thread safety.
Definition fftmap.h:69
FFTmap_p1: low level P1 map used for calculating FFTs.
Definition fftmap.h:81
static FFTtype & default_type()
set/get default optimisation type
Definition fftmap.h:126
Grid grid_reci_
reciprocal space grid
Definition fftmap.h:138
bool uniq_reci(const Coord_grid &c) const
Test whether a coordinate is in the valid part of the recip. grid.
Definition fftmap.h:101
static FFTtype default_type_
default optimisation options
Definition fftmap.h:149
void fft_h_to_x(const ftype &scale)
Transform to real space.
Definition fftmap.cpp:149
const ffttype & real_data(const Coord_grid &c) const
get real space data
Definition fftmap.h:119
FFTmap_p1()
Null constructor.
Definition fftmap.cpp:72
const FFTmap_p1 & operator=(const FFTmap_p1 &other)
Assignment operator.
Definition fftmap.h:90
void set_hkl(const HKL &hkl, const std::complex< ffttype > &f)
set reciprocal space data: slow form with hemisphere check
Definition fftmap.cpp:229
ffttype * data_r
pointer to real data
Definition fftmap.h:146
std::vector< char > req_u
real section lookup
Definition fftmap.h:143
FFTmap_p1(const FFTmap_p1 &other)
Copy constructor.
Definition fftmap.h:86
std::vector< ffttype > datavec
vector for the data
Definition fftmap.h:145
ffttype & real_data(const Coord_grid &c)
set real space data
Definition fftmap.h:122
const Grid & grid_reci() const
Return reciprocal space grid (i.e. half real grid + 1 section).
Definition fftmap.h:99
std::complex< ffttype > & cplx_data(const Coord_grid &c)
set reciprocal space data
Definition fftmap.h:116
FFTtype type_
optimisation options
Definition fftmap.h:136
Grid grid_real_
real space grid
Definition fftmap.h:139
std::complex< ffttype > get_hkl(const HKL &hkl) const
get reciprocal space data: slow form with hemisphere check
Definition fftmap.cpp:213
void init(const Grid_sampling &grid_sam, const FFTtype type=Default)
initialiser: takes grid
Definition fftmap.cpp:96
Matrix< char > req_uv
reci section lookup
Definition fftmap.h:142
FFTmode mode
real or reciprocal space?
Definition fftmap.h:135
Grid_sampling grid_sam_
unit cell grid
Definition fftmap.h:137
const Grid_sampling & grid_real() const
Return real space grid.
Definition fftmap.h:97
void fft_x_to_h(const ftype &scale)
Transform to reciprocal space.
Definition fftmap.cpp:181
const FFTmap_p1 & copy(const FFTmap_p1 &other)
copy function
Definition fftmap.cpp:257
const std::complex< ffttype > & cplx_data(const Coord_grid &c) const
get reciprocal space data
Definition fftmap.h:113
Grid grid_half_
half grid (for marking unique)
Definition fftmap.h:140
void reset()
Reset.
Definition fftmap.cpp:117
std::complex< ffttype > * data_c
pointer to complex data
Definition fftmap.h:147
FFTmap: P1 map with symmetry used for calculating FFTs.
Definition fftmap.h:166
void fft_h_to_x()
Transform to real space.
Definition fftmap.cpp:333
void fft_map_to_rfl(const X &x, H &h)
calculate reflection-like object from map-like object
Definition fftmap.h:264
void set_recip_data(const HKL &rfl, const datatypes::F_phi< T > &fphi)
set reciprocal space data
Definition fftmap.cpp:365
void fft_x_to_h()
Transform to reciprocal space.
Definition fftmap.cpp:343
const Spacegroup & spacegroup() const
get the spacegroup
Definition fftmap.h:180
void get_real_data(const Coord_grid &c, T &datum) const
get real space data
Definition fftmap.cpp:387
void init(const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling grid_sam, const FFTtype type=Default)
initialiser
Definition fftmap.cpp:309
const ffttype & get_real_data(const Coord_grid &c) const
get real space data (No error checking)
Definition fftmap.h:201
Spacegroup spacegroup_
spacegroup
Definition fftmap.h:213
FFTmap()
Null constructor.
Definition fftmap.cpp:277
void reset()
Reset.
Definition fftmap.cpp:322
void fft_rfl_to_map(const H &h, X &x)
calculate map-like object from reflection-like object
Definition fftmap.h:232
const Grid_sampling & grid_sampling() const
get the cell grid
Definition fftmap.h:182
std::vector< Isymop > isymop
Integerised symops.
Definition fftmap.h:214
void get_recip_data(const HKL &rfl, datatypes::F_phi< T > &fphi) const
get reciprocal space data
Definition fftmap.cpp:354
void set_real_data(const Coord_grid &c, const T &datum)
set real space data
Definition fftmap.cpp:397
Cell cell_
unit cell
Definition fftmap.h:212
const Cell & cell() const
get the cell
Definition fftmap.h:178
Grid sampling of a unit cell.
Definition coords.h:516
generic grid
Definition coords.h:480
int index(const Coord_grid &c) const
grid indexing operator
Definition coords.h:494
const int & nu() const
get nu
Definition coords.h:485
const int & nw() const
get nw
Definition coords.h:487
const int & nv() const
get nv
Definition coords.h:486
reflection 'Miller' index
Definition coords.h:146
General matrix class: like Array2d but with numerical methods.
Definition clipper_types.h:397
Mutex class: used for locking and unlocking shared resources.
Definition clipper_thread.h:64
Spacegroup object.
Definition spacegroup.h:173
Reflection data type: F + phi model or map coeff (e.g. Fcalc, Fbest)
Definition hkl_datatypes.h:292
clipper::datatypes::F_phi< ftype32 > F_phi
datatype
Definition hkl_datatypes.h:493
ftype64 ftype
ftype definition for floating point representation
Definition clipper_precision.h:58