Skip to content

Process

Evgeny Vasilyev edited this page Jun 14, 2019 · 22 revisions

<< Back to Home

Scripts with a name starting with a 'process' are basic for understanding a typical program cycle.

Initially, a beam object is created, and the parameters for the beam class used are appropriate. If necessary, the object of complex noise is also transmitted as one of the parameters, also with its own characteristics. Then a propagator object is created that describes the model itself, as well as many other related features, such as the criteria for stopping calculations, logging, visualization, etc. The actual propagation of the beam occurs when the function <propagator_object>.propagate() is called.

For the specified scripts to work correctly, it is necessary that the following arguments be passed to the command line:

  • global_root_dir - full path to the directory where the program results are stored in all modes of its operation
  • global_results_dir_name - the name of the directory with the results of the program in all modes of its operation
  • prefix - line describing script operation

That is, after executing the following command:

<path_to_python_interpreter> <path_to_process_script> --global_root_dir=<global_root_dir> --global_results_dir_name=<global_results_dir_name> --prefix=<prefix>

the folder named global_results_dir_name is created in the directory global_root_dir (if it was not there before), then a folder is created with the results of calculations for the current run, the name of which has the form: <prefix>_<current_datetime>

Inside the specified directory are created:

  • directory beam where the beam images will be stored at different distances along the direction of beam propagation
  • directory track where dependencies of the beam parameters on the track will be built (example)
  • pdf-file parameters.pdf with initial parameters of the model (example)
  • xlsx-file propagation.xlsx with logs of dependence of beam parameters on distance along the direction of beam propagation (example)
  • if a non-zero noise is present in the initial condition, that is, when a class Beam3D with a parameter C>0 is used, then the picture noise.png with the generated noise characteristic is also saved (example).
  • after the end of calculations, log file times.log is generated, where the total execution time of each of the modules is calculated during the operation of the function <propagator_object>.propagate() (example)

The above folder and file structure can be visualized as follows:

folders

Clone this wiki locally