@@ -6,7 +6,7 @@ Indexing of elements of convolution functions that are used for gridding by `HPG
The `hpg::CFSimpleIndexer` is a widely applicable index transformation class (and the only one implemented at this time.) It can be used to transform indexes between indexes in `CFStore2 x CFBuffer` that name a `CFCell`, and indexes in `hpg::CFArray`. Note that the `CFSimpleIndexer` class indexes two-dimensional planes and not points in a plane, just as the `CFCell` identifies a plane. Once a `CFSimpleIndexer` instance has been created, it can be used to convert between the two index schemes. Note that no bounds checking is performed by the class methods, and it is the user's responsibility to ensure that valid index arguments are provided to the conversion methods. Because the `hpg::GridderState` class maintains the convolution function values in dense arrays, it is necessary to partition the set of convolution functions provided by a `CFArray` instance according to the size of the convolution function support. While it is acceptable to over-partition the set of convolution functions, limitations in the current implementation of `HPG` set a hard upper limit on the number of partitions that can be used, and therefore it is recommended to reduce the number of partitions as far as is practicable.
All of the following source code quotations are from the file `hpg_indexing.hpp`.
The majority of the following source code quotations are from the file `hpg_indexing.hpp`, and the rest are from the file `hpg.hpp`.
The signature of the `CFSimpleIterator` constructor is the following
```c++
...
...
@@ -32,6 +32,28 @@ The index type that is related to `hpg::CFArray` is `CFSimpleIndexer::cf_index_t
cf_index(constCFCellIndex&index)const;
```
Comparing the `cf_index_t` value to the definition of the `CFArray` element access operator
```c++
std::complex<cf_fp>
CFArray:operator()(
unsignedx,
unsignedy,
unsignedmrow,
unsignedcube,
unsignedgrp);
```
we see that the names of the elements of `CFSimpleIndexer::cf_index_t` as documented correspond to the three right-most index values required by the `CFArray` element access operator.
Also of note is the definition of `hpg::vis_cf_index_t`
```c++
/** visibility CF index type
*
* in terms of full CFArray indexes, order is cube, grp
*/
usingvis_cf_index_t=std::pair<unsigned,unsigned>;
```
Values of type `vis_cf_index_t` are required by the `GridderState::grid_visibilities()` and `Gridder::grid_visibilities()` methods. Note that `vis_cf_index_t` values only provide the **two** rightmost index values of the `CFArray` element access operator.
The index type that is related to the CASA indexing of convolution functions is `hpg::CFCellIndex`.