Get()

Read binary spectrum data into GENIE from any valid data source (eg ISIS Raw files, DAE, intermediate files etc.)

GET() item=String [file=String] Read binary data by name
GET() item=Integer [file=String] Read binary data by number
GET() item=Interval [file=String] Read binary data by interval
GET() item=IntegerArray [file=String] Read binary data by range

example:

	# print the user name
	# then read in all the spectra in the file,
	# finally read every third spectrum from a file
	>> printn get("USER", "Isisfile.raw")
	Professor G. Offar
	>> 2d = get( 1 : get("NSP1") )
	>> spin_up = get( 1:50@3 , "CSP4589.RAW" )

Note: Use the Dir() command to find out what data can be read from the file.

Get:()

This function is a fully generic way of accessing binary data from Open GENIE from any valid data format. Open GENIE is always able to detect automatically what format the data source is in so there is no need to do anything differently when accessing an intermediate file, an ISIS raw file or even the Data Acquisition Electronics (DAE).

It should be remembered however that even if Open GENIE is able to detect the type of the data source, it cannot guarantee what items are available in the file, for example, asking for user information will work fine from an ISIS raw file, but not from the DAE! It is wise to check any unknown file with the Dir() command to see what information is available.

Parameters:

/Array

This optional qualifier specifies that when getting multiple spectra, the routine should return a workspace array of single spectrum workspaces, rather than a single multi-dimensional workspace.

Item (String or Integer or Range)

This specifies the name (String) or index (Integer) of the primary data item being requested from the data file. The assumption here is that all data items in the file are either named explictly or numbered. For example, "NSP1" is the name used in ISIS RAW files to get the total number of spectra in the first time regime. In the same file, specifying the integer 5 would get the fifth spectrum within the file. To find the names of items which may be specified on a particular file, the Dir() command may be used.

Open GENIE also supports unique data types called Interval and Range, a Range or Interval can be used to specify multiple indices or a range of indices respectively to access multi-dimensional 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 "Item" parameter.

File (String) [ default = Current input file ]

This parameter gives the source from which Open GENIE is reading the data specified. Normally this will be a file on disk or the data acquisition electronics but in future could also be a network address of a data source at a remote site.

If this parameter is not given, a file specified previously using the Set/File/Input command is used.

RESULT = (Any Open GENIE type)

Because the Get() command can return any sort of data from a file, the result of this function will the the closest available Open GENIE data type to the item being read. For example, if a string is being read from a file, the return type will be a String, alternatively, if a spectrum is being read, the return type will normally be an Open GENIE workspace.