Initial revision
This commit is contained in:
47
doc/user/nxpeek.htm
Normal file
47
doc/user/nxpeek.htm
Normal file
@ -0,0 +1,47 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>NXPEEK</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>NXPEEK: An Tcl-API to NeXus</H1>
|
||||
<P>
|
||||
NXPEEK is an interface for reading NeXus files from Tcl. NXPEEK was written by
|
||||
by Nick Maliszewski at NIST. It works in the usual way of a widget command in
|
||||
Tcl. One special command, <em>nxopen</em> is added to Tcl which opens a NeXus
|
||||
file. The command returns a handle which in itself is again a Tcl command. The
|
||||
Usage looks like this:
|
||||
<DL>
|
||||
<DT>set handle [nxopen filename]
|
||||
<DD> opens the NeXus file, craetes a new handle and returns it.
|
||||
<DT> $handle ls
|
||||
<DD> lists the contents of the current vGroup.
|
||||
<DT> $handle cd {name class}
|
||||
<DD> changes into the vGroup name of class class. Works much like a change
|
||||
directory on a file system.
|
||||
<DT>$handle cat name
|
||||
<DD> Returns the contents of the SDS name as a Tcl-list or a list of Tcl-lists.
|
||||
<DT>$handle info name
|
||||
<DD>Returns information about the SDS name. This includes rand, dimensions and
|
||||
data type.
|
||||
<DT>$handle attributes name
|
||||
<DD> Returns the attributes of the SDS name. If no SDS name is specified a
|
||||
list of global attributes is returned.
|
||||
<DT>$handle create VG {name class}
|
||||
<DD> creates a new vGroup with name name and class class at the current
|
||||
level in the NeXus vGroup hierarchy.
|
||||
<DT>$handle create SDS name datatype rank dims
|
||||
<DD>This call creates an SDS. A name argument is required. The data type
|
||||
must be one of the NexUs datatypes: DFNT_INT8, DFNT_UNIT8, DFNT_INT16,
|
||||
DFNT_UINT16, DFNT_INT32, DFNT_UINT32, DFNT_FLOAT32 and DFNT_FLOAT64.
|
||||
Rank is currently to 2 and below. The dimensions are given as a Tcl-list.
|
||||
<DT>$handle attrib SDSname attribname attribvalue
|
||||
<DD> Adds the attribute attribname with a value of attribvalue to the SDS
|
||||
SDSname.
|
||||
<DT>$handle write SDSname data offset
|
||||
<DD> Writes data to the SDS SDSname. The data must be give as a Tcl list (
|
||||
one dimensional case) or as a list of Tcl-lists (the two dimensional case).
|
||||
Offset is a Tcl list which describes at which position the data shall be
|
||||
written. Usually this is {0} or {0 0}.
|
||||
</DL>
|
||||
</BODY>
|
||||
</HTML>
|
Reference in New Issue
Block a user