The NeXus F90 Application Program Interface Routines


[Core API | Utility API | API Data Types | API Constants | Return to API | NeXus Site Map]

List of NeXus Core API F90 Routines

General Initialization and Shutdown
NXopenOpens NeXus file and returns file id
NXcloseCloses NeXus file
NXmakegroupCreates NeXus group
NXopengroupOpens existing NeXus group for input/output
NXclosegroupCloses NeXus group
NXmakedataCreates NeXus data set
NXopendataOpens existing NeXus data set for input/output
NXcompressMarks the NeXus data set for compression
NXclosedataCloses NeXus data set
Reading and Writing
NXgetdataReads data from currently open data set
NXgetslabReads a subset of the currently open data set
NXgetattrReads sdata attribute from open data set
NXputdataWrites data into the currently open data set
NXputslabWrites a subset of data into the currently open data set
NXputattrWrites an attribute of the currently open data set
NXflushFlushes output to a data file
Meta-Data Routines
NXgetinfoGets rank, dimensions and type of currently open data set
NXgetgroupinfoReturns the number of items, and the name and class of the current group
NXinitgroupdirInitializes directory searches of the current group
NXgroupdirReturns a list of items in the current group
NXgetnextentryImplements a directory search of the currently open group
NXgetattrinfoReturns the number of attributes of the current data set
NXinitattrdirInitializes attribute searches of the current data set
NXattrdirReturns a list of attributes of the current data set
NXgetnextattrImplements a search of all the attributes of the currently open data set
Linking and Group Hierarchy
NXgetgroupIDReturns the identifier of the currently open group as an NXlink structure
NXgetdataIDReturns the identifier of the currently open data set
NXmakelinkLinks a data item (group or set) to another group

[Return to API | Top | NeXus Site Map]


List of NeXus Utility API Routines

Reading and Writing
NXUwriteglobalsWrites all the valid global attributes of a file.
NXUwritegroupOpens a group (creating it if necessary).
NXUwritedataOpens a data item (creating it if necessary) and writes data and its units.
NXUreaddataOpens and reads a data item and its units.
NXUwritehistogramOpens one dimensional data item (creating it if necessary) and writes histogram centers and their units.
NXUreadhistogramOpens and reads a one dimensional data item and converts it to histogram bin boundaries.
NXUsetcompressDefines the compression algorithm and minimum dataset size for subsequent write operations.
Finding Groups, Data, and Attributes
NXUfindgroupChecks whether a group of the specified name is contained within the currently open group.
NXUfindclassReturns the name of a group of the specified class if it is contained within the currently open group.
NXUfinddataChecks whether a data item of the specified name is contained within the currently open group.
NXUfindattrChecks whether the currently open data item has the specified attribute.
NXUfindsignalSearches the currently open group for a data item with the specified SIGNAL attribute.
NXUfindaxisSearches the currently open group for a data item with the specified AXIS attribute.
Finding Linked Groups
NXUfindlinkFinds another link to the specified NeXus data item and opens the group it is in.
NXUresumelinkReopens the original group from which NXUfindlink was used.

[Return to API | Top | NeXus Site Map]


NeXus API Datatypes

NameDescriptionCurrent Default Value
NX_CHARData type for 8-byte signed integer4
NX_FLOAT32Data type for 8-byte signed integer5
NX_FLOAT64Data type for 8-byte signed integer6
NX_INT8Data type for 1-byte signed integer20
NX_UINT8Data type for 1-byte unsigned integer21
NX_INT16Data type for 2-byte signed integer22
NX_UINT16Data type for 2-byte unsigned integer23
NX_INT32Data type for 4-byte signed integer24
NX_UINT32Data type for 4-byte unsigned integer25

[Return to API | Top | NeXus Site Map]


NeXus API Constants

NameDescriptionCurrent Default Value
NX_OKSuccess return status1
NX_ERRORFailed return status0
NX_EODEnd of record return status-1
NX_COMP_NONEParameter defining no compression100
NX_COMP_LZWParameter defining LZW compression200
NX_COMP_RLEParameter defining run-length encoding compression300
NX_COMP_HUFParameter defining Skipping Huffman compression400
NX_MAXRANKMaximum number of dimensions32
NX_MAXNAMELENMaximum length of NeXus name64
NXi1Kind parameter for a 1-byte integerselected_int_kind(2)
NXi2Kind parameter for a 2-byte integerselected_int_kind(4)
NXi4Kind parameter for a 4-byte integerselected_int_kind(8)
NXr4Kind parameter for a 4-byte realkind(1.0)
NXr8Kind parameter for an 8-byte realkind(1.0D0)

[Return to API | Top | NeXus Site Map]


NeXus F90 Core API Routines


NXopen (file_name, access_method, file_id)

Opens the NeXus file, and creates and initializes the NeXus file structure. The returned handle is a pointer to this structure.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_namecharacter(len=*)Name of NeXus file to be opened
access_methodintegerNXACC_READ - read only access
NXACC_RDWR - read and write access
NXACC_CREATE - create (HDF4) access
NXACC_CREATE4 - create HDF4 access
NXACC_CREATE5 - create HDF5 access
Output Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXclose (file_id)

Closes NeXus file and deletes all associated data structures from memory.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXmakegroup (file_id, group_name, group_class)

Creates a NeXus group at the current level in the group hierarchy, defining its name and class. This does not open the new group automatically.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_namecharacter(len=*)Name of NeXus group
group_classcharacter(len=*)Class of NeXus group

[Return to API | Top | NeXus Site Map]


NXopengroup (file_id, group_name, group_class)

Opens an existing NeXus group for input and output of data.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_namecharacter(len=*)Name of NeXus group
group_classcharacter(len=*)Class of NeXus group

[Return to API | Top | NeXus Site Map]


NXclosegroup (file_id)

Closes the currently open group. If this group is a top-level group (i.e. with class NXentry), no groups are left open. Otherwise, the next group up in the hierarchy (i.e. the group containing the currently open group) is left open.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXmakedata (file_id, data_name, data_type, rank, dimensions, compress_type, chunk_size)

Creates a new NeXus data set with the specified name, type, rank and dimensions. The data compression parameter and chunk size are optional.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of NeXus data set
data_typeintegerType of data (see list of valid data types)
rankintegerRank of data
dimensionsinteger(:)Dimensions of data. The array is of size 'rank'
compress_typeintegerCompression algorithm to be used :
NX_COMP_LZW - GZIP
NX_COMP_HUF - Skipping Huffman
NX_COMP_RLE - Run Length Encoding
chunk_sizeinteger(:)Size of data chunks. The array is of size 'rank'

[Return to API | Top | NeXus Site Map]


NXopendata (file_id, data_name)

Opens an existing NeXus data set for further processing i.e. reading and writing data or attributes, defining compression algorithms, and obtaining data set information.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of NeXus data set

[Return to API | Top | NeXus Site Map]


NXcompress (file_id, compress_type)

Defines a compression algorithm for subsequent calls to NXputdata.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
compress_typeintegerCompression algorithm to be used :
NX_COMP_LZW - GZIP
NX_COMP_HUF - Skipping Huffman
NX_COMP_RLE - Run Length Encoding

[Return to API | Top | NeXus Site Map]


NXclosedata (file_id)

Ends access to the currently active data set

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXgetdata (file_id, data)

Reads data values from the currently open data set. Please note that memory overwrite occurs if the caller has not allocated enough memory to hold all the data available. Call NXgetinfo to determine the required dimension sizes. The data set must have been opened by NXopendata. NXgetdata assumes that "data" is a one-dimensional array (unless it's a character string). If the requested data has more than one dimension, read it into a one-dimensional buffer and then copy it to an array of the correct dimension using the Fortran 90 RESHAPE intrinsic function.e.g.

   status = NXgetinfo (file_id, rank, dims, datatype)
   allocate (buffer(PRODUCT(dims(1:rank))))
   status = NXgetdata (file_id, buffer)
   data = RESHAPE(buffer,dims(1:rank))

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsdatainteger(:)
real(:)
character(len=*)
Data values

[Return to API | Top | NeXus Site Map]


NXgetslab (file_id, data, start, size)

Reads a subset of the data in the current data set specifying the starting indices and size of slab for each dimension. The caller is responsible for allocating enough memory for the data. NXgetslab assumes that "data" is a one-dimensional array (unless it's a character string). If the requested data has more than one dimension, read it into a one-dimensional buffer and then copy it to an array of the correct dimension using the Fortran 90 RESHAPE intrinsic function (see NXgetdata)

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
startinteger(:)Indices of starting values in each dimension
sizeinteger(:)Length of slab in each dimension
Output Argumentsdatainteger(:)
real(:)
character(len=*)
Data values

[Return to API | Top | NeXus Site Map]


NXgetattr (file_id, attr_name, value, length, type)

Reads attribute values associated with the currently open data set. The attribute is defined by its name. Attributes are meta-data; data that provides information on the associated data set such as units, long names etc. If no data set is open, it looks for a global attribute i.e. attributes of the NeXus file. The length and type arguments are optional.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
attr_namecharacter(len=*)Name of attribute
lengthintegerLength of buffer for storing attribute data
typeintegerType of attribute data (see list of valid data types)
Output Argumentsvalueinteger(:)
real(:)
character(len=*)
Value of attribute
lengthintegerActual length of attribute data

[Return to API | Top | NeXus Site Map]


NXputdata (file_id, data)

Writes data into the specified data set. NXputdata assumes that "data" is a one-dimensional array (unless it's a character string). If the data has more than one dimension, copy it first into a one-dimensional buffer using the Fortran 90 RESHAPE intrinsic function e.g.

   status = NXputdata (file_id, RESHAPE(data,(/size(data)/))

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
datainteger(:)
real(:)
character(len=*)
Data values

[Return to API | Top | NeXus Site Map]


NXputslab (file_id, data, start, size)

Writes a subset of a multidimensional data array, specified by the starting indices and size of slab for each dimension, into the currently open dataset. If the data has more than one dimension, copy it first into a one-dimensional buffer using the Fortran 90 RESHAPE intrinsic function (see NXputdata).

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
datainteger(:)
real(:)
character(len=*)
Data values
startinteger(:)Indices of starting values in each dimension
sizeinteger(:)Length of slab in each dimension

[Return to API | Top | NeXus Site Map]


NXputattr (file_id, attr_name, value, length, type)

Writes an attribute of the currently open data set. If no data set is open, a global attribute is generated. The attribute has both a name and a value. The length and type arguments are optional.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
attr_namecharacter(len=*)Name of attribute
valueinteger(:)
real(:)
character(len=*)
Value of attribute
lengthintegerLength of data
typeintegerType of attribute data (see list of valid data types)

[Return to API | Top | NeXus Site Map]


NXflush (file_id)

Flushes all data to the NeXus file. Since this command closes and reopens the file, a new file handle is returned. The command leaves the program in the same state, i.e. with the same group and/or data set open.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXgetinfo (file_id, rank, dimensions, data_type)

Gets the rank, dimensions and data type of the currently open data set.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output ArgumentsrankintegerRank of data
dimensionsinteger(:)Dimensions of data
data_typeintegerType of data (see list of valid data types)

[Return to API | Top | NeXus Site Map]


NXgetgroupinfo (file_id, item_number, group_name, group_class)

Returns the number of items in the current group, and the name and class of the current group. "group_name" and "group_class" are optional arguments.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsitem_numberintegerNumber of NeXus data items in the current group
group_namecharacter(len=*)Name of currently open NeXus group
group_classcharacter(len=*)Class of currently open NeXus group

[Return to API | Top | NeXus Site Map]


NXinitgroupdir (file_id)

Initializes directory searches of the currently open group. This is required to reset searches using NXgetnextentry that may have been interrupted before completion.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXgroupdir (file_id, item_number, item_name, item_class)

Returns a directory of items in the current group as an array of character strings. Note that if the item is a data set, its class is "SDS". The user must ensure that the arrays are large enough to contain the results (call NXgetgroupinfo first).

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsitem_numberintegerNumber of NeXus data items
item_namecharacter(len=*)(:)List of NeXus item names
item_classcharacter(len=*)(:)List of NeXus item classes

[Return to API | Top | NeXus Site Map]


NXgetnextentry (file_id, name, class, data_type)

Implements a directory search facility on the current group level. The first call initializes the search and returns information on the first data item in the list. Subsequent calls yield information about the remaining items. If the item is a group, its name and class is returned. If it is a data set, its name and type is returned with a class of "SDS."

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsnamecharacter(len=*)Name of NeXus data item (group or set)
classcharacter(len=*)Class of NeXus group
data_typeintegerType of data set (see list of valid data types)

[Return to API | Top | NeXus Site Map]


NXgetattrinfo (file_id, attr_number)

Returns the number of attributes in the current data set.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsattr_numberintegerNumber of attributes in the current data set

[Return to API | Top | NeXus Site Map]


NXinitattrdir (file_id)

Initializes attribute searches of the currently open data set. This is required to reset searches using NXgetnextattr that may have been interrupted before completion.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file

[Return to API | Top | NeXus Site Map]


NXattrdir (file_id, attr_number, attr_name)

Returns a directory of attributes in the current data set as an array of character strings. The user must ensure that the array is large enough to contain the results (call NXgetattrinfo first).

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsattr_numberintegerNumber of attributes
item_namecharacter(len=*)(:)List of attribute names

[Return to API | Top | NeXus Site Map]


NXgetnextattr (file_id, attr_name, length, type)

Implements a search facility of the attributes of the currently open data set. The first call initializes the search and returns information on the first attribute in the list. Subsequent calls yield information about the remaining attributes. This routine returns global attributes if no data set is open.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsattr_namecharacter(len=*)Name of next attribute
lengthintegerLength of next attribute
typeintegerType of next attribute (see list of valid data types)

[Return to API | Top | NeXus Site Map]


NXgetgroupID (file_id, group_id)

Returns the identifier of the currently open group as an NXlink structure.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsgroup_idtype(NXlink)Identifier of NeXus group

[Return to API | Top | NeXus Site Map]


NXgetdataID (file_id, data_id)

Gets the identifier of the currently open data set as an NXlink structure (which contains the HDF tag/reference pair). Returns NX_ERROR if there is no open data set.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentsdata_idtype(NXlink)Identifier of NeXus data set

[Return to API | Top | NeXus Site Map]


NXmakelink (file_id, link)

Links a data item (group or set) to a NeXus group. Returns NX_ERROR if the current group level is the root level, since no data item can be linked here.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
Output Argumentslinktype(NXlink)Identifier of linked group

NeXus F90 Utility API Routines


NXUwriteglobals (file_id, user, affiliation, address, phone, fax, email)

Writes the global attributes defined in the NeXus standard. Note that NeXus_version, file_name and file_time are written automatically by the NeXus API. The attribute arguments are optional, so the F90 keyword syntax can be used for all of them, e.g.


   status = NXUwriteglobals (file_id, user="Joe Bloggs", email="JB@some.where")

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
usercharacter(len=*)Name of user
affiliationcharacter(len=*)User's affiliation
addresscharacter(len=*)User's address
phonecharacter(len=*)User's telephone number
faxcharacter(len=*)User's fax number
emailcharacter(len=*)User's email address

[Return to API | Top | NeXus Site Map]


NXUwritegroup (file_id, group_name, group_class)

Creates a NeXus group leaving it open for subsequent data output.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_namecharacter(len=*)Name of group
group_classcharacter(len=*)Class of group

[Return to API | Top | NeXus Site Map]


NXUwritedata (file_id, data_name, data, units, data_start, data_size)

Creates, opens and writes a NeXus data set in the current group. "data" can be a scalar value, or a one-, two-, or three-dimensional array. If higher dimensions are required, use the core API (see NXputdata). "units", "data_start" and "data_size" are optional parameters. If you want the data set to be compressed, set default compression parameters in NXUsetcompress.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of data set
datainteger
integer(:)
integer(:,:)
integer(:,:,:)
real
real(:)
real(:,:)
real(:,:,:)
character(len=*)
Data values
unitscharacter(len=*)Data units (optional)
startinteger(:)Starting indices of data slab (optional)
sizeinteger(:)Length of each dimension of data slab (optional)

[Return to API | Top | NeXus Site Map]


NXUreaddata (file_id, data_name, data, units, data_start, data_size)

Opens and reads a NeXus data set in the current group. "data" can be a scalar value, or a one-, two-, or three-dimensional array. If higher dimensions are required, use the core API (see NXgetdata). "units", "data_start" and "data_size" are optional parameters.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of data set
startinteger(:)Starting indices of data slab (optional)
sizeinteger(:)Length of each dimension of data slab (optional)
Output Argumentsdatainteger
integer(:), pointer
integer(:,:), pointer
integer(:,:,:), pointer
real
real(:), pointer
real(:,:), pointer
real(:,:,:), pointer
character(len=*)
Data values
unitscharacter(len=*)Data units (optional)

[Return to API | Top | NeXus Site Map]


NXUwritehistogram (file_id, data_name, data, units)

Creates, opens and writes a one dimensional NeXus data item with units. The input "data" are assumed to be histogram bin boundaries, and the stored data contains the histogram centers, i.e. the stored array has a dimension one less than the "data". The "histogram_offset" attribute is automatically set to half the width of the first bin, which allows the regeneration of the bin boundaries by NXUreadhistogram.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of histogram
datareal(:), pointerHistogram bin boundaries
unitscharacter(len=*)Data units (optional)

[Return to API | Top | NeXus Site Map]


NXUreadhistogram (file_id, data_name, data, units)

Opens and reads a one dimensional real data set in the current group. The data are assumed to be histogram bin boundaries, which are stored in NeXus files as bin centers with the first bin offset defined as the attribute "histogram_offset", i.e. the returned array has a dimension one greater than the stored array (see NXUwritehistogram). If the "histogram_offset" attribute is not present, it is assumed that the first bin width equals the separation of the first two bin centers.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Name of histogram
Output Argumentsdatareal(:), pointerHistogram bin boundaries
unitscharacter(len=*)Data units (optional)

[Return to API | Top | NeXus Site Map]


NXUsetcompress (file_id, compress_type, compress_size)

Sets the compression type to be used in subsequent calls to NXUwritedata. The second parameter, which is optional, sets the minimum number of elements in a data set before any compression is performed. This is to prevent inefficient compression of small data sets. The default value is 100.

NameTypeDescription
Return ValuestatusintegerError status
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
compress_typeintegerCompression algorithm to be used :
NX_COMP_LZW - GZIP
NX_COMP_HUF - Skipping Huffman
NX_COMP_RLE - Run Length Encoding
NX_COMP_NONE - No compression
compress_sizeintegerMinimum number of elements in data set before data compression is attempted.

[Return to API | Top | NeXus Site Map]


NXUfindgroup (file_id, group_name, group_class)

Finds if NeXus group exists in the current group and returns its class.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the group is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_namecharacter(len=*)Name of group
Output Argumentsgroup_classcharacter(len=*)Class of group

[Return to API | Top | NeXus Site Map]


NXUfindclass (file_id, group_class, group_name, find_index)

Finds if a NeXus group of the requested class exists in the current group and returns its name. "find_index" is used when there is more than one group of the required class; find_index = 3 returns the name of the third group found.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the group is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_classcharacter(len=*)Requested class
find_indexintegerSearch index
Output Argumentsgroup_namecharacter(len=*)Name of group with that class

[Return to API | Top | NeXus Site Map]


NXUfinddata (file_id, data_name)

Finds if a NeXus data set of the requested name exists in the current group.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the data set is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
data_namecharacter(len=*)Requested data set

[Return to API | Top | NeXus Site Map]


NXUfindattr (file_id, attr_name)

Finds if a NeXus attribute of the current data set exists.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the attribute is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
attr_namecharacter(len=*)Requested attribute name

[Return to API | Top | NeXus Site Map]


NXUfindsignal (file_id, signal, data_name, data_rank, data_type, data_dimensions)

Finds the NeXus data set in the current group with the required signal attribute, and returns its name, rank, type and dimensions.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the data set is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
signalintegerRequired value of signal attribute
Output Argumentsdata_namecharacter(len=*)Data set with required signal attribute
data_rankintegerRank of data set
data_typeintegerType of data set (see list of valid data types)
data_dimensionsinteger(:)Dimensions of data set

[Return to API | Top | NeXus Site Map]


NXUfindaxis (file_id, axis, primary, data_name, data_rank, data_type, data_dimensions)

Finds the NeXus data set in the current group with the required axis and primary attributes, and returns its name, rank, type and dimensions. Note that the axis data set should be one-dimensional.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the data set is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
axisintegerRequired value of axis attribute
primaryintegerRequired value of primary attribute
Output Argumentsdata_namecharacter(len=*)Data set with required signal attribute
data_rankintegerRank of data set
data_typeintegerType of data set (see list of valid data types)
data_dimensionsinteger(:)Dimensions of data set

[Return to API | Top | NeXus Site Map]


NXUfindlink (file_id, group_id, group_class)

Finds another group to which the currently open data set is linked and leaves it open for getting associated data. "group_id" stores the ID of the original group to enable a subsequent return (see NXUresumelink). "group_class" is an optional argument which restricts the search to the specified group class.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the data set is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_classcharacter(len=*)Group classes to be searched.
Output Argumentsgroup_idtype(NXlink)ID of current group.

[Return to API | Top | NeXus Site Map]


NXUresumelink (file_id, group_id)

Returns to the original group from which an NXfindlink call was issued.

NameTypeDescription
Return ValuestatusintegerError status = NX_OK if the data set is found
Input Argumentsfile_idtype(NXhandle)Identifier of NeXus file
group_idtype(NXlink)ID of original group

[Return to API | Top | NeXus Site Map]


Comments to: Ray Osborn <ROsborn@anl.gov>
Revised: Saturday, September 14, 2002

Copyright © 1999-2002 NeXus Design Team. All rights reserved.