doublepass - Raytrace from an x-ray source through P/H and H/P optics, off a flat and back through to the source location
doublepass [<par>=<val> ...]
doublepass constructs and runs a raytrace pipeline to simulate the rays from creation at an x-ray source, through an system consisting of 5 surfaces: paraboloid, hyperboloid, and flat optic, and then reversed through the hyperboloid and paraboloid optics again. The order of the optics, P then H then flat or H then P then flat, is specified by the order of the surfaces in the user specified gi file.
The parameters for doublepass act as wrappers for the underlying raytrace programs. The various source parameters are passed on to raygen and the surface parameters are passed on to surface_intercept.
- SOURCE POSITION
-
The source position is specified via the zsource parameter. This is, in turn, passed into the raygen source_override parameter.
- SURFACE POSITIONS
-
Surface positions are taken from the gi_filename parameter. To change the position of a surface, the user must currently edit the gi file.
- SURFACE ORDER
-
doublepass attempts to determine the order of the surfaces to reflect off of by parsing the gi file. In theory, the user may switch the order of surfaces by specifying the P as surfaces 1 and 5 and the H as 2 and 4 or the P as 2 and 4 and the H as 1 and 5.
doublepass uses IRAF parameter interface. Options which take values are separated from their values by either white space or the = character.
- tag string
-
A prefix to be used on all intermediate files created. See the FILES section for more info.
- output string
-
The output stream to which to write the rays. It may be a filename, the string ``stdout'' for the UNIX standard output stream, or if set to ``default'', the filename will be created using tag.bp.
- seed1 integer
-
First seed for the random number generator.
- seed2 integer
-
Second seed for the random number generator.
- block integer
-
The random block at which to start.
- version
-
Print version information and exit.
- help
-
Print this usage information and exit.
- debug
-
Comma separated list of debug flags which may effect the behavior of doublepass. These flags include:
- flat
-
Run the `flat' program rather than the (default) surface_intercept program to simulate the flat optic.
- noexec
-
Do not run the doublepass pipeline. Useful in conjunction with pcomm.
- noptics [1,5]
-
Number of optics from the gi file to raytrace. If set to 1, doublepass raytraces only the first optic(P or H based on the gi file). If set to 2, the P and H are traced. A value of 3 traces the P, H, and flat. A value of 4 takes the rays through the P, H, flat, and which ever optic was located just before the flat. A value of 5 traces the full setup.
- pcomm
-
Print the doublepass pipeline to STDERR.
- tee
-
Place an instance of the `tee' program following every raytrace program, thereby copying the state of the rays to a file after each program. See the FILES section for info on filenames.
- zsource double precision
-
The axial position of the source.
- source filename
-
The lua script which specifies the sources.
- source_override string
-
The lua statements to be passed to the source script.
- ea filename
-
The lua script which specifies the entrance aperture to illuminate.
- ea_override string
-
The lua statements to be passed to the ea script.
- limit double precision
-
The quantity of whatever limit_type specified to be generated.
- limit_type string
-
The limiting factor for creating rays. See the RAYGEN section for more info.
- ray_dist string
-
How the rays are distributed at the ea, entrance aperture.
- gi_filename filename
-
The OSAC style gi file containing the optic prescription. Currently, doublepass requires that all the surfaces(P, H, flat, H again, and P again) be specified in one gi file.
- [fhp]_dfm_filename filename
-
This parameter specifies the name of a file containing the deformation coefficients. The filename may contain a single `%s' string which will be interpolated into the optic name by doublepass, e.g. `foo_%s.DFR' == `foo_h.DFR'. The file contains either Fourier-Legendre 'cogen' coefficients, or spline coefficients. By convention, the following file suffixes are used:
- .DFR
-
ascii file containing `cogen'-generated Fourier-Legendre 'cogen' coefficients.
- .SPL
-
ascii file containing `transfit'-generated spline coefficients.
- .BSPL
-
binary file containing `transfit'-generated spline coefficients.
- .spl
-
binary file containing `transfit'-generated spline coefficients. New format incorporating precomputed rms amplitude value.
- [fhp]_dfm_scale double precision
-
This parameter scales the deformation (and the theta and z derivatives) by a constant. Normally it should be set to 1.0 (no scaling).
- [fhp]_theta0 double precision
-
This parameter specifies the reference clocking angle for the optic. theta0 is in degrees; a positive clocking rotates the optic deformation such that a fiducial mark on the +X axis (SAO raytrace coordinates) moves towards the +Y axis. The SAO raytrace coordinates are:
- Z axis
-
Parallel to the nominal optical axis. Z increases from the mirror towards the focal plane.
- Y axis
-
``Up''
- X axis
-
Completes a right-handed coordinate system.
- onlygoodrays
-
Boolean flag indicating how to handle ghost rays: yes - only pass along rays which reflect off each optic(P & H); no - pass ghost rays along.
- [fhp]_dfm2_filename filename
-
Second deformation filename, if dfm_type equals `2'. If the first contains spline coefficients, the second must be cogen coefficients and vice versa.
- [fhp]_dfm2_scale double precision
-
Second deformation scale, if dfm_type equlas `2'.
- [fhp]_theta02 double precision
-
Second clocking angle, if dfm_type equlas `2'.
- [fhp]_dfm_type integer
-
The type of deformation to apply, and hence the type of deformation
file(s) provided.
0 - Cogen only, i.e. `.DFR' files.
1 - Spline only, i.e. `.SPL', `.BSPL', or `.spl' files.
2 - Combination of 0 and 1.
The following files are required for input to doublepass:
gi_filename a SAOsac *.gi file with 5 surfaces.
[fhp]_dfm_filename an accepted input format for surface_intercept: *.SPL, *.BSPL, *.spl, *.DFR (as chosen by the [fhp]_dfm_type parameter).
The following files are conditionally required for input to doublepass:
[fhp]_dfm2_filename if [fhp]_dfm_type equals '2'.
Various programs in the doublepass raytrace pipeline generate log files. They are named using the tag parameter, the program name, and optionally the optic and direction of travel. The following files are generated when doublepass is run:
tag.raygen.log
tag.surface_intercept.[ph].z[\+\-].log
tag.flat.log
The rays are written to disk immediately after each raytrace program in the doublepass pipeline is executed. The are named using the tag parameter, the program name, and optionally the optic and direction of travel. The following, additional files are generated when tee is passed as a debug flag:
tag.raygen.bp
tag.surface_intercept.[ph].z[\+\-].bp
tag.projray.bp
tag.flat.bp
tag.flip.bp
M.Tibbetts ( mtibbetts@head-cfa.harvard.edu )