Cython is necessary here for memory / speed performance.
We will intergate toroidally over a potentially large plasma sub-domain (or the whole domain).
It implies:
- Determining the plasma volume to be sampled (from user input)
- Sampling the volume (copy the already existing algorithm in _GG02.pyx)
- As the volume is being sampled, include a few extra steps:
* sampling has to be done by looping on R (outer main loop), because R determines the number of toroidal points
* then loop on Z
* and integrate toroidally by updating a cumulative toroidal sum of solid angles
Important : for each point, only compute solid angle if there is no vignetting due to structral elements!
i.e.: use algorithms for LOS_intersection where appropriate ! (to be discussed)
The output should be a 2D (R,Z) map of toroidally integrated solid angles (one map for each M point on the trajectory, so in fact the output should be a (M,R,Z) array).
The question of where to put the loop on the M points remains to be determined.
Maybe inside (innermost loop) so the parallelization is done on R ?
Cython is necessary here for memory / speed performance.
We will intergate toroidally over a potentially large plasma sub-domain (or the whole domain).
It implies:
* sampling has to be done by looping on R (outer main loop), because R determines the number of toroidal points
* then loop on Z
* and integrate toroidally by updating a cumulative toroidal sum of solid angles
Important : for each point, only compute solid angle if there is no vignetting due to structral elements!
i.e.: use algorithms for LOS_intersection where appropriate ! (to be discussed)
The output should be a 2D (R,Z) map of toroidally integrated solid angles (one map for each M point on the trajectory, so in fact the output should be a (M,R,Z) array).
The question of where to put the loop on the M points remains to be determined.
Maybe inside (innermost loop) so the parallelization is done on R ?