We have developed an Optical Propagation Code that propagates an arbitrary radiation wave, in the paraxial approximation, through a complex optical system from input plane to output plane. Three different propagation methods are available, namely the Spectral Method, the Fresnel Diffraction Integral and the Modified Fresnel Diffraction Integral that includes the ABCD matrix of the optical system between input and output plane. We have successfully combined our optical propagation code with Genesis 1.3 and Medusa to simulate FEL oscillators, where Genesis 1.3 or Medusa is responsible for the modeling of the interaction of the radiation wave with the electron beam within the undulator. Contact Henry Freund for running Medusa in combination with OPC. Note that other models for the FEL gain medium - and even models for different gain media, such as solid state laser crystals - can be used in combination with the optical propagation code. The Perl scripting language is used to control the program flow and create a flexible scripting interface to define both simple and complex resonators configurations.
| Version | Changes |
| 0.7.3 | June 25, 2009 |
| | - Due to an issue with MPICH2 on Windows system, added interfaces for the FFTW subroutines. |
| | - To get the integer type right for the plan variable for the FFTW routines on 32- and 64-bit operating systems, the ISO_C_BINDING module is used for the gfortran compiler. This requires version 4.3 or later. To be compatible with older ifort compilers, a different method is implemented for this compiler. |
| | - The use of fortran 90 in combination with the fortran 77 wrappers for FFTW results on some systems in segementation faults. By rewriting the code to avoid calling one of the FFTW routines this does not seem to happen any more. |
| | - Currently, no 64 bit FFTW library is available for WIN64 bit systems. The distribution will be updated with this library once it becomes available again. |
| | - A problem has been detected when using OpenMPI version 1.3.2 in combination with Genesis 1.3. Passing the input file to Genesis by the Perl script does not work any more. Bug fix: replace the input.f file in the genesis source directory by the one present in the optics directory and recompile genesis. Go to the directory lib/OPC in the OPC tree and rename the file Genesis.pm to Genesis.pm.single. Then copy Genesis.pm.mpi to Genesis.pm |
| 0.7.2 | June 10, 2009 |
| | - Changed whole array assignment (a=b, where a and b are two-dimensional arrays) due to a segmentation fault when using the ifort compiler in combination with large array sizes. This problem is not present when using the gfortran compiler. |
| | - A wrong IO unit number caused the propagation to be aborted after the opld command. This bug is corrected. |
| 0.7.1 | May 29, 2009 |
| | - Now use FFTW for calculating discrete Fourier transforms. Grid size can now be arbitrary, though a product of small prime factors is most efficient (2,3,5,7). |
| | - Small bug removed from "stat" command that in rare conditions may produce wrong results. |
| 0.7.0 | Februari 20, 2009 |
| | - Converted code to fortran 90 syntax. |
| | - Changed all static arrays to dynamically allocated arrays. |
| | - No hard coded limit to grid size any more. |
| | - Several codes now have separate version for MPI and non-MPI use. |
| | - Use MPI_IO routines when using MPI. Previous version was not thread safe. |
| | - Removed a bug in OPC when GENESIS is called consecutivey more than once. |
| | - Changed condition for warning if roundtrip magnificaton M is different
from 1. |
| | - Added a new command "tot_cross" that extracts the total power and
cross section of the intensity simultaneously from a "field" file and
thus reduces io-overhead when large grids are used (large "field" files). |
| 0.6.11 | May 22, 2008 |
| | - Removed bug for slit in y-direction. When this component was used, the optical field was also truncated in the x-direction. |
| | - Added a rectangular aperture (see manual). |
| 0.6.10 | May 13, 2008 |
| | - Separated Hermes from Medusa. Now each program has to be called independently. |
| | - Improved error messages. Now the module or fortran source is displayed with the routine causing the error. |
| | - Removed a bug from opc_optics.f related to 'opld' masks. When more than one masks is used, they are only applied properly for slice one, while the last mask is used for all the other slices. Currently, 5 different mask are supported. See manually for more details. |
| | - Made small changes to the manual. |
| 0.6.9 | March 13, 2008 |
| | - Removed bug for 'statistics' command. Now energy is returned when nslices > 1 (affects return value for item 'tot'). |
| | - Removed bug for 'opld' command when using MPI. Now the mask is broadcasted correctly to all the processes. |
| | - Removed bug for 'opld var=mask' command. The bug resulted in using the mesh associated with the field at the beginning of the propagation and thus did not allow for a possible magnification when propagating to the point where the mask is applied. This is now corrected, and the aberrations are now calculated using the grid at the position where the mask is applied. |
| 0.6.8 | Januari 31, 2008 |
| | - Changed parsing of input files for Genesis and Medusa. String values are now delimited by single quotes. Fortran 90 codes should use DELIM='apostrophe' in the open statement for files that contain namelists. See appendix D in manual for more detail. |
| | - Updated manual |
| 0.6.7 | October 25, 2007 |
| | - Added individual MPI support for fortran programs |
| | - Removed bug when OPC is called without gain medium |
| | - Corrected manual about initialisation of $field from file |
| 0.6.6 | August 8, 2007 |
| | - Removed bug for Plot.pm for plottype=total |
| | - Slightly modified output to screen of opc_optics.f |
| | - Added program convert_opld to create an ASCII file from a binary opd file |
| | - Changed units of intensity to MW/cm^2 in Plot.pm |
| 0.6.5a | July 30, 2007 |
| | - Removed bug from creating cross-sectional data |
| 0.6.5 | Third public release, July 23, 2007 |
| | - Modified syntax for adding mirror aberrations. Both new and old syntax is accepted. See manual for details. |
| | - Changed interfacing with Medusa |
| 0.6.4 | Second public release, May 1, 2007 |
| | - Added opld component to optics configuration |
| | - Added mask command to generate intensity or phase masks |
| | - Added statistics command to generate info on optical field |
| | - Changed print format statements to avoid overflow and underflow of exponents |
| | - Changed get_param to remove white spaces from strings |
| | - Removed a bug from Medusa.pm to retrieve the correct number of slices |
| 0.6.3 | Limited release for testing with Medusa, March 1, 2007 |
| | - Namelist module changed to make it case insensitive |
| | - Optimized support for Medusa |
| | - Added apodization functions to 'hole' and 'diaphragm' |
| | - Checks format of namelist file when it is copied to a temporary file. More than one variable per line is now accepted. |
| | - Allows "/" as end of namelist identifier |
| 0.6.1 | Limited release for testing with Medusa, January 3, 2007 |
| | - Improved plot.pl script |
| | - Added headers to ASCII data files for correctly plotting physical quantities and identifying file. |
| | - Solved bug for writing to binary files. Files are now deleted before they are opened. |
| | - Patched Medusa module to set $field to the filename of the associated optical field |
| 0.6.0 | Limited release for testing with Medusa, December 21, 2006 |
| | - Namelist module changed to output boolean values without quotes |
| | - The command 'cross' now returns actual intensity instead of a.u. |
| | - Decoupled ABCD matrices for X and Y directions |
| | - Added opc_fourier utility (not tested and still contains bugs) |
| | - Added functionality for running and interfacing with Medusa |
| | - Various patches for running under MS windows (tested for XP) |
| 0.5.2 | First public release, August 24, 2006 |
Bug reports can be mailed to the e-mail address given in the README file of the OPC-distribution.