Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples/hsph_Csca/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The hsph_Csca_ADDA_V2 python code allows the user to perform controlled simulations using ADDA 1.4.0, read and save the results, while integrating the scattering cross section in two angular hemispheres.
The code is featuring also a user-friendly GUI for Windows environments (10 and 11 have been tested).
Please, read carefully the guide and the comments in the code as it is still an experimental version.

To start, put hsph_Csca_ADDA_V2.py, lambda_nk_test.txt and all_dir_params.dat in the same folder where the adda executable is (usually win64), then run the python script.
An user-friendly and self-explanatory GUI should appear, with some preset parameters.
The preset values simulate a sphere of 50nm radius, 32x32x32 scattering grid, in free space, with a theta grid going from 0° to 180° with steps of 0.5°,
a phi grid going from 0° to 360° with steps of 2°, and with internal ADDA integration to check the consistency.
To run the simulation click on the "Run" box. To perform the integrations and save the results, clik on the "Upload" box.
To plot the result, click the "Plot" box.

A more detailed explanation of the code functioning and parameters meaning is included in the pdf hsph_Csca_V2_guide.
43 changes: 43 additions & 0 deletions examples/hsph_Csca/alldir_params.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Description of the coverage of the whole solid angle for integration
#
# This file should be manually modified by user.
# Program does not assume any symmetries of the particle. Therefore, possible symmetries should be considered by user
# and this can lead to decrease of integration limits

theta:
# default: min=0;max=180;Jmin=2;Jmax=6;eps=0;equiv=false;periodic=false
min=0
max=180
Jmin=2
Jmax=6
eps=0
equiv=false
periodic=false

phi:
# default: min=0;max=360;Jmin=2;Jmax=5;eps=0;equiv=true;periodic=true
# axysymmmetrical: max=90;equiv=false;Jmax=3 -> discard values of g.x and g.y (consider them zero)
min=0
max=360
Jmin=2
Jmax=5
eps=0
equiv=true
periodic=true

# all angles are specified in degrees
# all values are precalculated; so high 'eps' does not decrease computational time, but may decrease accuracy.
# If eps=0, Jmin is not used.

# Jmin,Jmax are minimum and maximum numbers of refinement stages
# Nmax = 2^Jmax + 1
# for those with equiv=true Nmax is effectively less by 1
# total calls of function <= Nmax_theta * Nmax_phi

# equiv means whether it is assumed that max and min values are completely equivalent. If true only one of them is
# calculated.

# periodic means whether function is periodic in the integrated interval. If true trapezoid rule is used; it is possible
# that interval is half of the function period.

# axysymmetrical <=> particle with z - axis of symmetry
1,047 changes: 1,047 additions & 0 deletions examples/hsph_Csca/hsph_Csca_ADDA_V2.py

Large diffs are not rendered by default.

Binary file added examples/hsph_Csca/hsph_Csca_guide_V2.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions examples/hsph_Csca/lambda_nk_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
200 1.722 0.166 1.91
204 1.734 0.139 1.90
208 1.746 0.12 1.89
212 1.758 0.11 1.88
Loading