Skip to content
Snippets Groups Projects
Commit cff07108 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Update test data README information

parent f2ab472e
No related branches found
No related tags found
No related merge requests found
# Folder instructions # Folder instructions
This directory collects the input files to test the code. This directory collects the input and output data files to test the code.
## Instructions ## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section. The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. In order to allow for consistency tests between the results of the legacy _FORTRAN_ implementation and the new _C++_ version, a set or pre-computed test cases is provided. The test cases are arranged in folders named after the code branch they are intended to test. Namely:
### cluster - the `cluster` folder contains input and output data for test cases using clusters of spheres;
- the `sphere` folder contains input and output data for test cases based on a single sphere;
- the `trapping` folder contains input and output data for test cases applying to the `trapping` code.
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for. The legacy _FORTRAN_ code is distributed together with the `np_tmcode` software package, so that the user can verrify the correspondence between results obtained by different code builds. However, some of the _FORTRAN_ based calculations are time consuming. For this reason, the set of pre-computed output files should serve as a first choice for reference.
*TODO:* add the description of the cluster configuration files In general, input data files are identified by names that start with the `D` character, while output files have names that start with the `O` character. The _C++_ implementation of the code prepends a `c_` prefix to all of its output files (while still using the same input ones).
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
- DEDFB
```
SPHERE_NUMBER EXTERNAL_SPHERE_FLAG
EXT_DIEL_CONST PEAK_WAVE PEAK_SCALE DIEL_TYPE SCALE_NUMBER SCALE_STEP_FLAG CONTROL_VARIABLE
SCALE_VECTOR [SCALE_VECTOR_STEP]
|
v
SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR
| |
v v
FRACTIONAL_BREAK_RADII ->
|
v
DIEL_CONST_VECTOR ->
|
v
EOF_CODE
```
were the different lines have the following roles:
1. declare the number of spheres and whether to add an external layer
2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer)
8. an end-of-file code (generally 0)
- DSPH
```
SPHERE_NUMBER MAXIMUM_L_ORDER POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 GEOMETRY
STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA
STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI
WRITE_INTERMEDIATE_FILE
EOF_CODE
```
were the different lines have the following roles:
1. general configuration of the scattering problem, with some specification of the transition between materials
2. definition of the elevation angle arrays for the incident and scattered radiation fields
3. definition of the azimuth angle arrays for the incident and scattered radiation fields
4. a flag to set whether the intermediate data should be written to output files
5. an end-of-file code (generally 0)
# License # License
......
# Folder instructions # Folder instructions
This directory collects the input files to test the code. This directory contains test data for models made up by more than one sphere.
## Instructions ## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section. `clu` and its _C++_ implementation, `np_clu`, are designed to perform more advanced calculations, namely the scattering of incident radiation on a complex particle made of several spherical components. To perform the calculation, the two following formatted files need to be provided:
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
- DEDFB - DEDFB
``` ```
...@@ -24,13 +14,22 @@ The execution of the original code can be controlled through a set of configurat ...@@ -24,13 +14,22 @@ The execution of the original code can be controlled through a set of configurat
| |
v v
SPHERE_ID_VECTOR -> SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR LAYER_NUMBER_SPHERE_1 SPHERE_1_RADIUS
| | FRACTIONAL_BREAK_RADII
v v |
FRACTIONAL_BREAK_RADII -> v
LAYER_NUMBER_SPHERE_2 SPHERE_2_RADIUS
FRACTIONAL_BREAK_RADII
|
v
...
|
v
LAYER_NUMBER_SPHERE_N SPHERE_N_RADIUS
FRACTIONAL_BREAK_RADII
| |
v v
DIEL_CONST_VECTOR -> DIEL_CONST_VECTOR
| |
v v
EOF_CODE EOF_CODE
...@@ -40,24 +39,28 @@ were the different lines have the following roles: ...@@ -40,24 +39,28 @@ were the different lines have the following roles:
2. define the external dielectric constant and the scaling configuration 2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared) 3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres 4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line) 5. define the vectors specifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer) 6. define the fractional break radii (one line per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer) 7. define the vector of dielectric constants or starting functions (one line per layer in sphere)
8. an end-of-file code (generally 0) 8. an end-of-file code (generally 0)
- DSPH - DCLU
``` ```
SPHERE_NUMBER MAXIMUM_L_ORDER POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 GEOMETRY SPHERE_NUMBER MAX_INTERNAL_L MAX_EXTERNAL_L MAX_MATRIX_SIZE POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 INTENSITY_FLAG GEOMETRY
VEC_POS_X VEC_POS_Y VEC_POS_Z
| | |
v v v
STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA
STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI
WRITE_INTERMEDIATE_FILE OUTPUT_T-MATRIX_SCALE_NUMBER
EOF_CODE EOF_CODE
``` ```
were the different lines have the following roles: were the different lines have the following roles:
1. general configuration of the scattering problem, with some specification of the transition between materials 1. general configuration of the scattering problem, with some specification of the transition between materials
2. definition of the elevation angle arrays for the incident and scattered radiation fields 2. The vectors of spherical component Cartesian coordinates `xyz`
3. definition of the azimuth angle arrays for the incident and scattered radiation fields 3. definition of the elevation angle arrays for the incident and scattered radiation fields
4. a flag to set whether the intermediate data should be written to output files 4. definition of the azimuth angle arrays for the incident and scattered radiation fields
5. the number of the calculation scale for which the T-matrix will be saved to file
5. an end-of-file code (generally 0) 5. an end-of-file code (generally 0)
# License # License
......
# Folder instructions # Folder instructions
This directory collects the input files to test the code. This directory contains test data for the single sphere case.
## Instructions ## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section. `sph` and its _C++_ implementation, `np_sphere`, are designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
- DEDFB - DEDFB
``` ```
...@@ -24,13 +14,11 @@ The execution of the original code can be controlled through a set of configurat ...@@ -24,13 +14,11 @@ The execution of the original code can be controlled through a set of configurat
| |
v v
SPHERE_ID_VECTOR -> SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR LAYER_NUMBER_SPHERE_1 SPHERE_1_RADIUS
| | FRACTIONAL_BREAK_RADII
v v
FRACTIONAL_BREAK_RADII ->
| |
v v
DIEL_CONST_VECTOR -> DIEL_CONST_VECTOR
| |
v v
EOF_CODE EOF_CODE
...@@ -40,9 +28,9 @@ were the different lines have the following roles: ...@@ -40,9 +28,9 @@ were the different lines have the following roles:
2. define the external dielectric constant and the scaling configuration 2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared) 3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres 4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line) 5. define the vectors specifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer) 6. define the fractional break radii (one line per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer) 7. define the vector of dielectric constants or starting functions (one line per layer in sphere)
8. an end-of-file code (generally 0) 8. an end-of-file code (generally 0)
- DSPH - DSPH
...@@ -50,14 +38,14 @@ were the different lines have the following roles: ...@@ -50,14 +38,14 @@ were the different lines have the following roles:
SPHERE_NUMBER MAXIMUM_L_ORDER POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 GEOMETRY SPHERE_NUMBER MAXIMUM_L_ORDER POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 GEOMETRY
STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA
STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI
WRITE_INTERMEDIATE_FILE OUTPUT_T-MATRIX_SCALE_NUMBER
EOF_CODE EOF_CODE
``` ```
were the different lines have the following roles: were the different lines have the following roles:
1. general configuration of the scattering problem, with some specification of the transition between materials 1. general configuration of the scattering problem, with some specification of the transition between materials
2. definition of the elevation angle arrays for the incident and scattered radiation fields 2. definition of the elevation angle arrays for the incident and scattered radiation fields
3. definition of the azimuth angle arrays for the incident and scattered radiation fields 3. definition of the azimuth angle arrays for the incident and scattered radiation fields
4. a flag to set whether the intermediate data should be written to output files 4. the number of the calculation scale for which the T-matrix will be saved to file
5. an end-of-file code (generally 0) 5. an end-of-file code (generally 0)
# License # License
......
# Folder instructions
This directory collects the input files to test the code.
## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section.
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
- DEDFB
```
SPHERE_NUMBER EXTERNAL_SPHERE_FLAG
EXT_DIEL_CONST PEAK_WAVE PEAK_SCALE DIEL_TYPE SCALE_NUMBER SCALE_STEP_FLAG CONTROL_VARIABLE
SCALE_VECTOR [SCALE_VECTOR_STEP]
|
v
SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR
| |
v v
FRACTIONAL_BREAK_RADII ->
|
v
DIEL_CONST_VECTOR ->
|
v
EOF_CODE
```
were the different lines have the following roles:
1. declare the number of spheres and whether to add an external layer
2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer)
8. an end-of-file code (generally 0)
- DSPH
```
SPHERE_NUMBER MAXIMUM_L_ORDER POLARIZATION_STATUS TRANSITION_SHARPNESS_1 TRANSITION_SHARPNESS_2 GEOMETRY
STARTING_INC_THETA INC_THETA_STEP FINAL_INC_THETA STARTING_SCA_THETA SCA_THETA_STEP FINAL_SCA_THETA
STARTING_INC_PHI INC_PHI_STEP FINAL_INC_PHI STARTING_SCA_PHI SCA_PHI_STEP FINAL_SCA_PHI
WRITE_INTERMEDIATE_FILE
EOF_CODE
```
were the different lines have the following roles:
1. general configuration of the scattering problem, with some specification of the transition between materials
2. definition of the elevation angle arrays for the incident and scattered radiation fields
3. definition of the azimuth angle arrays for the incident and scattered radiation fields
4. a flag to set whether the intermediate data should be written to output files
5. an end-of-file code (generally 0)
# License
Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is distributed along with
this program in the COPYING file. If not, see: <https://www.gnu.org/licenses/>.
# Folder instructions
This directory contains test data for the `trapping` code.
## Instructions
As of M9, `trapping` has only been ported to _C++_ and not yet parallelized. Instructions to test this part of the code are very similar to those concerning `sphere` and `cluster`, i.e. the code needs to be run using the available input files and checking for the consistency of the resulting output files.
# License
Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is distributed along with
this program in the COPYING file. If not, see: <https://www.gnu.org/licenses/>.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment