Next: , Previous: Units, Up: Top


6 Source specification

Currently, sources are specified as combinations of position and spectrum generators. There may be multiple spectrum generators associated with each position generator. There is only one position generator per source.

You must write a lua function entitled source which creates the sources you wish to model. Each source is begun with the begin_source function, and ended with the end_source function. Both take a single parameter, namely a string specifying the name of the source, which is used to identify it in any output:

     function source()
     
       begin_source( 'M87 - knot1' )
         mono( 'knot1 spectrum', 2.5, 1 )      -- the spectrum generator
         point( 'knot1 point' )                -- the position generator
       end_source( 'M87 - knot1' )
     
     end

Note that the identifying string given to end_source must be identical to that passed to begin_source.

The file containing your source script is what is given to the raygen source parameter. The source override code provided by the source_override parameter is placed in a function called override. You should place a call to override early in your script (it can be done outside of the source function).

The provided position generators are described in the following sections.