Giter Site home page Giter Site logo

jbrage / iontracks Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 7.55 MB

IonTracks is an open source code for the calculation of recombination in ion beams

License: GNU General Public License v3.0

Python 24.16% Cython 19.55% Jupyter Notebook 56.29%
particle-therapy ion-recombination monte-carlo-simulation jaffe-theory pulsed-beam continuous-beam scanned-beam

iontracks's People

Contributors

dependabot[bot] avatar grzanka avatar jbrage avatar nbassler avatar retkiewi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iontracks's Issues

Add printout for debugging purposes to see the progress of solver

  • Check which loop in initial_recombination.pyx out of the major for loops consumes most of the CPU time (probably not the init loop)
  • Add some printouts to the top level for statement in Cython (like "Done X out of Y passes (which is Z %)") to get the data needed to estimate total running time
  • Based on the experience from the above, adjust the use cases for the unit tests

for k in range(no_z_electrode, no_z + no_z_electrode):

Fix example script

This time I get a different error:

gitpod /workspace/IonTracks (master) $ pip install Cython numpy scipy matplotlib mpmath pandas seaborn
Collecting Cython
  Downloading Cython-0.29.30-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 59.8 MB/s eta 0:00:00
Collecting numpy
  Downloading numpy-1.23.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 114.6 MB/s eta 0:00:00
Collecting scipy
  Downloading scipy-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 MB 42.9 MB/s eta 0:00:00
Collecting matplotlib
  Downloading matplotlib-3.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.3/11.3 MB 134.0 MB/s eta 0:00:00
Collecting mpmath
  Downloading mpmath-1.2.1-py3-none-any.whl (532 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 532.6/532.6 kB 122.5 MB/s eta 0:00:00
Collecting pandas
  Downloading pandas-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 152.2 MB/s eta 0:00:00
Collecting seaborn
  Downloading seaborn-0.11.2-py3-none-any.whl (292 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.8/292.8 kB 92.4 MB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.34.4-py3-none-any.whl (944 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 944.1/944.1 kB 102.6 MB/s eta 0:00:00
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: pyparsing>=2.2.1 in /home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/site-packages (from matplotlib) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/site-packages (from matplotlib) (2.8.2)
Collecting pillow>=6.2.0
  Downloading Pillow-9.2.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 154.9 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.0 in /home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/site-packages (from matplotlib) (21.3)
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 95.7 MB/s eta 0:00:00
Collecting pytz>=2020.1
  Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 kB 116.5 MB/s eta 0:00:00
Requirement already satisfied: six>=1.5 in /home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
Installing collected packages: pytz, mpmath, pillow, numpy, kiwisolver, fonttools, Cython, cycler, scipy, pandas, matplotlib, seaborn
Successfully installed Cython-0.29.30 cycler-0.11.0 fonttools-4.34.4 kiwisolver-1.4.4 matplotlib-3.5.2 mpmath-1.2.1 numpy-1.23.1 pandas-1.4.3 pillow-9.2.0 pytz-2022.1 scipy-1.8.1 seaborn-0.11.2
gitpod /workspace/IonTracks (master) $ cd hadrons/
gitpod /workspace/IonTracks/hadrons (master) $ cd cython_files/
gitpod /workspace/IonTracks/hadrons/cython_files (master) $ make -j4
python3 setup.py build_ext --inplace
Compiling initial_recombination.pyx because it changed.
Compiling continuous_beam.pyx because it changed.
[1/2] Cythonizing continuous_beam.pyx
/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /workspace/IonTracks/hadrons/cython_files/continuous_beam.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
[2/2] Cythonizing initial_recombination.pyx
/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /workspace/IonTracks/hadrons/cython_files/initial_recombination.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'initial_recombination' extension
creating build
creating build/temp.linux-x86_64-cpython-38
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include -I/home/gitpod/.pyenv/versions/3.8.13/include/python3.8 -c initial_recombination.c -o build/temp.linux-x86_64-cpython-38/initial_recombination.o
In file included from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948,
                 from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from initial_recombination.c:711:
/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
creating build/lib.linux-x86_64-cpython-38
gcc -pthread -shared -L/home/gitpod/.pyenv/versions/3.8.13/lib -L/home/gitpod/.pyenv/versions/3.8.13/lib build/temp.linux-x86_64-cpython-38/initial_recombination.o -o build/lib.linux-x86_64-cpython-38/initial_recombination.cpython-38-x86_64-linux-gnu.so
building 'continuous_beam' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include -I/home/gitpod/.pyenv/versions/3.8.13/include/python3.8 -c continuous_beam.c -o build/temp.linux-x86_64-cpython-38/continuous_beam.o
In file included from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948,
                 from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from continuous_beam.c:711:
/workspace/.pyenv_mirror/user/3.8.13/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
gcc -pthread -shared -L/home/gitpod/.pyenv/versions/3.8.13/lib -L/home/gitpod/.pyenv/versions/3.8.13/lib build/temp.linux-x86_64-cpython-38/continuous_beam.o -o build/lib.linux-x86_64-cpython-38/continuous_beam.cpython-38-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-cpython-38/initial_recombination.cpython-38-x86_64-linux-gnu.so -> 
copying build/lib.linux-x86_64-cpython-38/continuous_beam.cpython-38-x86_64-linux-gnu.so -> 
rm -r build
rm *.c
# ignore the html files
# cython -a initial_recombination.pyx
# cython -a general_and_initial_recombination.pyx
# rm *.html
gitpod /workspace/IonTracks/hadrons/cython_files (master) $ cd ..
gitpod /workspace/IonTracks/hadrons (master) $ python example_single_track.py 
Traceback (most recent call last):
  File "example_single_track.py", line 5, in <module>
    from functions import Jaffe_theory, ks_initial_IonTracks
  File "/workspace/IonTracks/hadrons/functions.py", line 7, in <module>
    from continuous_beam import continuous_beam_PDEsolver
ModuleNotFoundError: No module named 'continuous_beam'

Prepare an example validation script

This should go into test directory. Would be nice to employ pytest and add it to github actions.
We also need to commit a file with reference results as they are a bit more than simple number or short vector. Consider numpy serialisation as dataformat.

Rewrite `initial_recombination.pyx` to pure Python

  • add an abstraction layer over single_track_PDEsolver to allow multiple implementations of the same code (like Python, Cython, maybe some others). This could like like solver(input, method='cython') where other values can go into method parameters, like python
  • add tests for the new abstraction layer
  • rewrite single_track_PDEsolver to pure Python and add it as another implementation
    This would allow us to tests parallelisation on multiple threads and GPU using numba library (https://numba.pydata.org/).

Add general check

For protons recombination coefficient should be in the range (1.0, 1.01) ( >= 1 !).

  • check values for other ions
  • implement as a general check (assert) in the pytest

Reasonable input parameters for validation testing

We would like to write down values of crucial input parameters for this method:

def ks_initial_IonTracks(E_MeV_u,
                         voltage_V,
                         electrode_gap_cm=0.2,
                         particle="proton",
                         RDD_model="Geiss",
                         grid_size_um=3.0,
                         a0_nm=8.0,
                         use_beta=False,
                         PRINT_parameters=False,
                         SHOW_PLOT=False,
                         theta_rad=0):

These should be used for validation of new, faster parallel implementation

Reorganize `hadrons` package

Keep well defined structure for different accelerators:

  • cython folder
  • numba folder
  • python folder

Ensure that there is no clash with numba package (lets hope that hadrons.numba wont crash with pip numba imports).

Add necessary entries in all readmes

Fix example_single_track.py script

It is crashing now:

  Jaffe_df = Jaffe_df.append(result, ignore_index=True)
  particle             LET_keV_um  voltage_V  electrode_gap_cm  IC_angle_rad                                           ks_Jaffe    E_MeV_u
0   proton   0.026711210613162315        100               0.2           0.0  1.00862441882385557908036885367704547666130275...   1.000000
1   proton   0.010825611319992927        100               0.2           0.0  1.00530513706018394659454176227899059605293253...   3.515152
2   proton   0.007152886006663893        100               0.2           0.0  1.00392352007454042774188151041078393226824975...   6.030303
3   proton   0.005435792137328953        100               0.2           0.0  1.00298215768406589885121181902154381869703134...   8.545455
4   proton  0.0044249580815806325        100               0.2           0.0  1.00242783993247326125236519724496247664641690...  11.060606
0      1.00862441882385557908036885367704547666130275...
1      1.00530513706018394659454176227899059605293253...
2      1.00392352007454042774188151041078393226824975...
3      1.00298215768406589885121181902154381869703134...
4      1.00242783993247326125236519724496247664641690...
                             ...                        
595    1.00283554974069790149734844110114354843059493...
596    1.00282837242151212849619872127018413072597245...
597    1.00282128326939690837853787241365928624858137...
598    1.00281435880058771792381213072969253145509744...
599    1.00280759137038731346281261301503044063773501...
Name: ks_Jaffe, Length: 600, dtype: object
Traceback (most recent call last):
  File "example_single_track.py", line 32, in <module>
    ax.set_title("{} ion, electrode gap = {} cm".format(particle, electrode_gap_cm))
NameError: name 'particle' is not defined

Cant compile

NothingWorks.com

kenneth@kenneth-ESPRIMO-P920:/media/kenneth/Data/Jeppe/IonTracks/pulsed_beam$ make

Building the distribute_and_evolve_pulsed module
python3 pyxpp.py distribute_and_evolve_pulsed.py
python3 pyxpp.py distribute_and_evolve_pulsed.pyx
python3 -m cython -3 -a distribute_and_evolve_pulsed.pyx

Error compiling Cython file:

...

Mathematical constants and functions

from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',

^

distribute_and_evolve_pulsed.pyx:23:28: Not a type

Error compiling Cython file:

...
from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',

^

distribute_and_evolve_pulsed.pyx:24:27: Not a type

Error compiling Cython file:

...

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',

^

distribute_and_evolve_pulsed.pyx:25:31: Not a type

Error compiling Cython file:

...
@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',

^

distribute_and_evolve_pulsed.pyx:26:26: Not a type

Error compiling Cython file:

...

Mathematical constants and functions

from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',

^

distribute_and_evolve_pulsed.pyx:23:28: Not a type

Error compiling Cython file:

...
from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',

^

distribute_and_evolve_pulsed.pyx:24:27: Not a type

Error compiling Cython file:

...

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',

^

distribute_and_evolve_pulsed.pyx:25:31: Not a type

Error compiling Cython file:

...
@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',

^

distribute_and_evolve_pulsed.pyx:26:26: Not a type

Error compiling Cython file:

...

Mathematical constants and functions

from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',

^

distribute_and_evolve_pulsed.pyx:23:28: Not a type

Error compiling Cython file:

...
from libc.math cimport (M_PI as pi, sin, cos, tan, asin as arcsin, acos as arccos, atan as arctan, sinh, cosh, tanh, asinh as arcsinh, acosh as arccosh, atanh as arctanh, exp, log, log2, log10, sqrt, erfc )

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',

^

distribute_and_evolve_pulsed.pyx:24:27: Not a type

Error compiling Cython file:

...

@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',

^

distribute_and_evolve_pulsed.pyx:25:31: Not a type

Error compiling Cython file:

...
@cython.ccall
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',

^

distribute_and_evolve_pulsed.pyx:26:26: Not a type

Error compiling Cython file:

...
@cython.boundscheck(False)
@cython.cdivision(True)
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',

^

distribute_and_evolve_pulsed.pyx:39:28: Not a type

Error compiling Cython file:

...
@cython.cdivision(True)
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',

^

distribute_and_evolve_pulsed.pyx:40:27: Not a type

Error compiling Cython file:

...
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',

^

distribute_and_evolve_pulsed.pyx:41:31: Not a type

Error compiling Cython file:

...
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',

^

distribute_and_evolve_pulsed.pyx:42:26: Not a type

Error compiling Cython file:

...
@cython.boundscheck(False)
@cython.cdivision(True)
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',

^

distribute_and_evolve_pulsed.pyx:39:28: Not a type

Error compiling Cython file:

...
@cython.cdivision(True)
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',

^

distribute_and_evolve_pulsed.pyx:40:27: Not a type

Error compiling Cython file:

...
@cython.initializedcheck(False)
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',

^

distribute_and_evolve_pulsed.pyx:41:31: Not a type

Error compiling Cython file:

...
@cython.wraparound(False)
@cython.locals( # variables
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',

^

distribute_and_evolve_pulsed.pyx:42:26: Not a type

Error compiling Cython file:

...

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
            )

def f(track_radii,track_LETs,parameter_list,SHOW_PLOT):

^

distribute_and_evolve_pulsed.pyx:67:0: Function signature does not match previous declaration

Error compiling Cython file:

...
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',

^

distribute_and_evolve_pulsed.pyx:44:31: Not a type

Error compiling Cython file:

...
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',

^

distribute_and_evolve_pulsed.pyx:45:36: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:28: Not a type

Error compiling Cython file:

...
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',

^

distribute_and_evolve_pulsed.pyx:49:21: Not a type

Error compiling Cython file:

...
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',

^

distribute_and_evolve_pulsed.pyx:48:31: Not a type

Error compiling Cython file:

...
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',

^

distribute_and_evolve_pulsed.pyx:49:75: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:99: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:70: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:25: Not a type

Error compiling Cython file:

...
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',

^

distribute_and_evolve_pulsed.pyx:44:65: Not a type

Error compiling Cython file:

...
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
                                                                                                               ^

distribute_and_evolve_pulsed.pyx:64:116: Not a type

Error compiling Cython file:

...
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',

^

distribute_and_evolve_pulsed.pyx:54:34: Not a type

Error compiling Cython file:

...
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
                                                               ^

distribute_and_evolve_pulsed.pyx:64:68: Not a type

Error compiling Cython file:

...
sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
                              ^

distribute_and_evolve_pulsed.pyx:63:35: Not a type

Error compiling Cython file:

...
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

^

distribute_and_evolve_pulsed.pyx:55:18: Not a type

Error compiling Cython file:

...
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',

^

distribute_and_evolve_pulsed.pyx:49:49: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
              ^

distribute_and_evolve_pulsed.pyx:58:19: Not a type

Error compiling Cython file:

...
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',

^

distribute_and_evolve_pulsed.pyx:49:35: Not a type

Error compiling Cython file:

...
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

^

distribute_and_evolve_pulsed.pyx:55:29: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:76: Not a type

Error compiling Cython file:

...
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',

^

distribute_and_evolve_pulsed.pyx:48:70: Not a type

Error compiling Cython file:

...
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',

^

distribute_and_evolve_pulsed.pyx:54:66: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:93: Not a type

Error compiling Cython file:

...
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
            # Lax-Wendroff scheme
            positive_temp_entry='double',negative_temp_entry='double',
                               ^

distribute_and_evolve_pulsed.pyx:60:36: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:87: Not a type

Error compiling Cython file:

...
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',

^

distribute_and_evolve_pulsed.pyx:54:97: Not a type

Error compiling Cython file:

...
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
                                          ^

distribute_and_evolve_pulsed.pyx:64:47: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:47: Not a type

Error compiling Cython file:

...
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',

^

distribute_and_evolve_pulsed.pyx:48:55: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:49: Not a type

Error compiling Cython file:

...
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

^

distribute_and_evolve_pulsed.pyx:55:81: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:115: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:65: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                                                                                                               ^

distribute_and_evolve_pulsed.pyx:58:116: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                           ^

distribute_and_evolve_pulsed.pyx:58:32: Not a type

Error compiling Cython file:

...
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',

^

distribute_and_evolve_pulsed.pyx:48:40: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:54: Not a type

Error compiling Cython file:

...

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
            # Lax-Wendroff scheme
            positive_temp_entry='double',negative_temp_entry='double',
            recomb_temp='double',no_recombined_charge_carriers='double',
                       ^

distribute_and_evolve_pulsed.pyx:61:28: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:43: Not a type

Error compiling Cython file:

...
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
                                                                                                                                       ^

distribute_and_evolve_pulsed.pyx:64:140: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:63: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                                                                  ^

distribute_and_evolve_pulsed.pyx:58:71: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:19: Not a type

Error compiling Cython file:

...
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

^

distribute_and_evolve_pulsed.pyx:55:65: Not a type

Error compiling Cython file:

...
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',

^

distribute_and_evolve_pulsed.pyx:51:31: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:75: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:145: Not a type

Error compiling Cython file:

...
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',

^

distribute_and_evolve_pulsed.pyx:54:119: Not a type

Error compiling Cython file:

...
track_radii='double[::1]',
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',

^

distribute_and_evolve_pulsed.pyx:44:103: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                                                     ^

distribute_and_evolve_pulsed.pyx:58:58: Not a type

Error compiling Cython file:

...
# Lax-Wendroff scheme
positive_temp_entry='double',negative_temp_entry='double',
recomb_temp='double',no_recombined_charge_carriers='double',

            update_figure_step='size_t',
            no_initialised_charge_carriers='double',ion_density='double',computation_time_steps='int',time_step='int',no_figure_updates='size_t',
                                                                                               ^

distribute_and_evolve_pulsed.pyx:64:100: Not a type

Error compiling Cython file:

...
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
            # Lax-Wendroff scheme
            positive_temp_entry='double',negative_temp_entry='double',
                                                            ^

distribute_and_evolve_pulsed.pyx:60:65: Not a type

Error compiling Cython file:

...
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',

^

distribute_and_evolve_pulsed.pyx:47:110: Not a type

Error compiling Cython file:

...

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
            # Lax-Wendroff scheme
            positive_temp_entry='double',negative_temp_entry='double',
            recomb_temp='double',no_recombined_charge_carriers='double',
                                                              ^

distribute_and_evolve_pulsed.pyx:61:67: Not a type

Error compiling Cython file:

...
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',
# load variables
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',

^

distribute_and_evolve_pulsed.pyx:48:82: Not a type

Error compiling Cython file:

...
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',

^

distribute_and_evolve_pulsed.pyx:54:141: Not a type

Error compiling Cython file:

...
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

^

distribute_and_evolve_pulsed.pyx:55:49: Not a type

Error compiling Cython file:

...
track_LETs='double[::1]',
parameter_list='list',
SHOW_PLOT='bint',
# arrays
positive_array='double[:,:,::1]', negative_array='double[:,:,::1]',positive_array_temp='double[:,:,::1]',
negative_array_temp='double[:,:,::1]',positive_array_slice='double[:,::1]',

^

distribute_and_evolve_pulsed.pyx:45:75: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                                        ^

distribute_and_evolve_pulsed.pyx:58:45: Not a type

Error compiling Cython file:

...
# initialise charge carriers
x_coordinates_ALL='double[::1]',y_coordinates_ALL='double[::1]',number_of_tracks='size_t',inner_radius='size_t',outer_radius='size_t',
x='double',y='double',my_counter='size_t',MAXVAL='double',MINVAL='double',

            # von Neumann analysis
            sx='double', sy='double', sz='double', cx='double', cy='double', cz='double',von_neumann_expression='bint',
                                                                               ^

distribute_and_evolve_pulsed.pyx:58:84: Not a type

Error compiling Cython file:

...
ion_diff='double',ion_mobility='double',Efield='double',dx='double',dy='double',dz='double',W='double',
no_z_electrode='int', d='double',theta='double',alpha='double',dt='double',
no_x='size_t',no_y='size_t',no_z='size_t',no_z_with_buffer='size_t',
# indices and lengths
nx='size_t',ny='size_t',nz='size_t',i='size_t',j='size_t',k='size_t',
mid_x_array='size_t',mid_y_array='size_t',mid_z_array='size_t',N0='double',b='double',front_factor='double',distance_from_center='double',

^

distribute_and_evolve_pulsed.pyx:52:82: Not a type

Check numba speedup

  • add another implementation of solver, just for testing numba code. This would probably violate DRY as I expect to have a plain copy of the current python implementation. In other words as the first step make a 1:1 copy of the python implementation from #38 and call it numba_something
  • add another entry for numba in solver abstraction layer
  • add a short test suite for numba (or include numba in tests mentioned here #28 (comment)
  • check numba speedup after refactoring of python code (i.e. extracting inner loop code into separate method)
  • check numba speedup for plain python method adding various types of decorators

For numba testing, I suggest moving to Ares PLGRID computing node with 48 cores.

charge collecting / induced current

Currently iontracks counts the carge reaching the electrodes. However, a current is already induced when charges move through the ionization chamber.

Possibly a more exact solution can be obtained if this is considered.

image

where I(t) is the current in the ionization chamber due moving the charge carriers N as a function of time t.

Let n(t) be the number of charge carriers per unit volume, so in principle that would N(t) / V, where V is the volume of the ionization chamber.

A is the area of the ionization chamber pi*r² electrodes.

v is the drift velocity of the charge carriers N. (Possibly constant as a function of time t, neglegting space charge effects?)

q is the charge per charge carrier in Coulomb.

So, the total accumulated charge Q(t) in the electrometer is rather:

image

This value will probably be slightly higher than what is collected at the electrodes, since charge carriers lost due to recombination may still contribute to a signal to the electrometer before they recombined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.