Integrate()

Integrate one or more spectra

INTEGRATE() wksp=Workspace [xmin=Real] [xmax=Real] Integrate a workspace (1d or 2d)
INTEGRATE() spectra=Interval or IntegerArray [xmin=Real] [xmax=Real] [file=String] Integrate spectra from a file

example:

	# print the integrals of two spectra
	>> printn integrate(1:2, "tfx00345.raw")
	INTEGRATE: Integrating between 38000 and 78000
	  Workspace []
	  (
	    error = [2341.4700 1027.1312 ] Array(2 )
	    sum = [5482585.0 1054968.0 ] Array(2 )
	  )

Note: The sum is always in total counts

Integrate

The Integrate() command is used to perform integration of one or more spectra. Even f the Y units are normalized the integrate command will give a result in absolute counts.

Parameters:

Wksp (Workspace)

A one or two dimensional workspace to integrate.

Spectra (Range)

This parameter specifies the spectra to be integrated from the input file as a Range.

Open GENIE supports unique data types called Interval and Range, a Range or Interval can be used to specify a range of indices respectively to access multi-spectra data. For more information on specifying intervals, please see a description of the Interval syntax.

For the most general ability to specify a group of arbitrary spectra an Integer array of spectrum identifiers can be given as the the "Spectra" parameter.

Xmin, Xmax (Real) [default = spectra minimum & maximum respectively]

Optional interval over which to integrate. If the interval is not on a bin boundary, the counts are automatically corrected proportionally to the amount of the bin included.

File (String)

Allows specification of a file from which to get the spectra when used with the second form of the command. Otherwise, the input file is taken to be the file set by the Set/File/Input command.

RESULT = (Workspace)

The result of the integrate command is returned as a workspace with two fields (see example above). The "SUM" field contains either a single value or an array of integrals. The "ERROR" field contains the propagated error on the result, similarly, either a single value or an array of values.