45 #ifndef CLIPPER_FFTMAP
46 #define CLIPPER_FFTMAP
57 typedef float ffttype;
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() )
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 Spacegroup &spacegroup, const Cell &cell, const Grid_sampling grid_sam, const FFTtype type=Default)
initialiser
Definition: fftmap.cpp:309
void reset()
Reset.
Definition: fftmap.cpp:322
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
FFTmap: P1 map with symmetry used for calculating FFTs.
Definition: fftmap.h:165
void fft_x_to_h()
Transform to reciprocal space.
Definition: fftmap.cpp:343
const int & u() const
get u
Definition: coords.h:248
const int & nv() const
get nv
Definition: coords.h:486
FFTmap()
Null constructor.
Definition: fftmap.cpp:277
void fft_h_to_x(const ftype &scale)
Transform to real space.
Definition: fftmap.cpp:149
const Cell & cell() const
get the cell
Definition: fftmap.h:178
void set_real_data(const Coord_grid &c, const T &datum)
set real space data
Definition: fftmap.cpp:397
static Mutex mutex
Thread safety.
Definition: fftmap.h:69
static FFTtype & default_type()
set/get default optimisation type
Definition: fftmap.h:126
Spacegroup spacegroup_
spacegroup
Definition: fftmap.h:213
Grid coordinate.
Definition: coords.h:236
const ffttype & real_data(const Coord_grid &c) const
get real space data
Definition: fftmap.h:119
void fft_x_to_h(const ftype &scale)
Transform to reciprocal space.
Definition: fftmap.cpp:181
FFTtype type_
optimisation options
Definition: fftmap.h:136
ffttype & real_data(const Coord_grid &c)
set real space data
Definition: fftmap.h:122
FFTmap_p1: low level P1 map used for calculating FFTs.
Definition: fftmap.h:80
ffttype * data_r
pointer to real data
Definition: fftmap.h:146
generic grid
Definition: coords.h:479
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
Grid_sampling grid_sam_
unit cell grid
Definition: fftmap.h:137
ftype64 ftype
ftype definition for floating point representation
Definition: clipper_precision.h:58
Cell object.
Definition: cell.h:121
Grid grid_real_
real space grid
Definition: fftmap.h:139
Spacegroup object.
Definition: spacegroup.h:172
void fft_rfl_to_map(const H &h, X &x)
calculate map-like object from reflection-like object
Definition: fftmap.h:232
Grid grid_reci_
reciprocal space grid
Definition: fftmap.h:138
Cell cell_
unit cell
Definition: fftmap.h:212
const Grid_sampling & grid_real() const
Return real space grid.
Definition: fftmap.h:97
const int & nu() const
get nu
Definition: coords.h:485
void fft_map_to_rfl(const X &x, H &h)
calculate reflection-like object from map-like object
Definition: fftmap.h:264
const Spacegroup & spacegroup() const
get the spacegroup
Definition: fftmap.h:180
int index(const Coord_grid &c) const
grid indexing operator
Definition: coords.h:494
const ffttype & get_real_data(const Coord_grid &c) const
get real space data (No error checking)
Definition: fftmap.h:201
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
FFTmap_p1(const FFTmap_p1 &other)
Copy constructor.
Definition: fftmap.h:86
void set_recip_data(const HKL &rfl, const datatypes::F_phi< T > &fphi)
set reciprocal space data
Definition: fftmap.cpp:365
const int & w() const
get w
Definition: coords.h:250
const int & nw() const
get nw
Definition: coords.h:487
void init(const Grid_sampling &grid_sam, const FFTtype type=Default)
initialiser: takes grid
Definition: fftmap.cpp:96
std::vector< ffttype > datavec
vector for the data
Definition: fftmap.h:145
void reset()
Reset.
Definition: fftmap.cpp:117
Mutex class: used for locking and unlocking shared resources.
Definition: clipper_thread.h:64
void fft_h_to_x()
Transform to real space.
Definition: fftmap.cpp:333
Grid sampling of a unit cell.
Definition: coords.h:515
Reflection data type: F + phi model or map coeff (e.g. Fcalc, Fbest)
Definition: fftmap.h:61
static FFTtype default_type_
default optimisation options
Definition: fftmap.h:149
std::vector< char > req_u
real section lookup
Definition: fftmap.h:143
std::complex< ffttype > * data_c
pointer to complex data
Definition: fftmap.h:147
const int & v() const
get v
Definition: coords.h:249
Matrix< char > req_uv
reci section lookup
Definition: fftmap.h:142
std::complex< ffttype > & cplx_data(const Coord_grid &c)
set reciprocal space data
Definition: fftmap.h:116
const std::complex< ffttype > & cplx_data(const Coord_grid &c) const
get reciprocal space data
Definition: fftmap.h:113
std::vector< Isymop > isymop
Integerised symops.
Definition: fftmap.h:214
const Grid_sampling & grid_sampling() const
get the cell grid
Definition: fftmap.h:182
const FFTmap_p1 & copy(const FFTmap_p1 &other)
copy function
Definition: fftmap.cpp:257
FFTmode mode
real or reciprocal space?
Definition: fftmap.h:135
const Grid & grid_reci() const
Return reciprocal space grid (i.e. half real grid + 1 section).
Definition: fftmap.h:99
void get_recip_data(const HKL &rfl, datatypes::F_phi< T > &fphi) const
get reciprocal space data
Definition: fftmap.cpp:354
reflection 'Miller' index
Definition: coords.h:145
void get_real_data(const Coord_grid &c, T &datum) const
get real space data
Definition: fftmap.cpp:387
FFTmap_p1()
Null constructor.
Definition: fftmap.cpp:72
Grid grid_half_
half grid (for marking unique)
Definition: fftmap.h:140