Added pixel -> kvec function
This commit is contained in:
parent
bcf4ae2deb
commit
3ef6475121
@ -131,6 +131,20 @@ namespace CosmoTool
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Array2>
|
||||
void get_Kvec(long p, Array2& kvec)
|
||||
{
|
||||
const DimArray& dims = this->getDims();
|
||||
DimArray d(delta_k.size());
|
||||
for (int q = 0; q < d.size(); q++)
|
||||
{
|
||||
d[q] = p%dims[q];
|
||||
p = (p-d[q])/dims[q];
|
||||
}
|
||||
return get_Kvec(d, kvec);
|
||||
}
|
||||
|
||||
|
||||
template<typename Array>
|
||||
double get_K(const Array& ik)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user