| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 2 | <head> |
|---|
| 3 | <title> |
|---|
| 4 | Nexus-API IDL - README |
|---|
| 5 | </title> |
|---|
| 6 | </head> |
|---|
| 7 | |
|---|
| 8 | <body> |
|---|
| 9 | <!-- start content --> |
|---|
| 10 | |
|---|
| 11 | <h1>Nexus-API IDL - README </h1> |
|---|
| 12 | <hr> |
|---|
| 13 | <table id="toc" class="toc" summary="Contents"><tbody><tr><td><h2>Contents</h2> </a> |
|---|
| 14 | |
|---|
| 15 | <ul> |
|---|
| 16 | |
|---|
| 17 | <li ><a href="#Overview">1. Overview</a> |
|---|
| 18 | <ul> </ul> |
|---|
| 19 | |
|---|
| 20 | <li ><a href="#Installation">2. Installation</a> |
|---|
| 21 | <ul> |
|---|
| 22 | |
|---|
| 23 | <li ><a href="#Requirements">2.1 Requirements</a></li> |
|---|
| 24 | <li><a href="#Building and Installing">2.2 Building and Installing </a></li> |
|---|
| 25 | <li><a href="#Linux">2.3 Linux </a></li> |
|---|
| 26 | <li><a href="#Windows">2.4 Windows </a></li> |
|---|
| 27 | |
|---|
| 28 | </ul> |
|---|
| 29 | |
|---|
| 30 | <li ><a href="#Using API from IDL">3. Using API from IDL</a> |
|---|
| 31 | <ul> |
|---|
| 32 | |
|---|
| 33 | <li ><a href="#Installing a New DLM File To IDL">3.1 Installing a New DLM File To IDL </a></li> |
|---|
| 34 | <li><a href="#Test Files">3.2 Test Files </a></li> |
|---|
| 35 | <li><a href="#Using The API And An Example">3.3 Using The API And An Example</a></li> |
|---|
| 36 | <li><a href="#NeXus IDL API Routines">3.4 NeXus IDL API Routines</a></li> |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | </ul> |
|---|
| 40 | </ul> |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | <a name="#Overview"></a><h2> Overview</h2> |
|---|
| 44 | |
|---|
| 45 | <p>NeXus IDL Api binds the NeXus libraries to IDL (Interactive Data Language). It brings functionality of the NeXus API to IDL for reading, writing and modifying NeXus Files. IDL NeXus API imitates the functionality NeXus API with few exeptions discussed later. |
|---|
| 46 | |
|---|
| 47 | <p>Information on NeXus Dataformat: <A HREF="http://www.nexusformat.org/Introduction">http://www.nexusformat.org/Introduction</A>. |
|---|
| 48 | </p> |
|---|
| 49 | <p> |
|---|
| 50 | Information on IDL: <A HREF="http://www.ittvis.com/">http://www.nexusformat.org/Introduction</A>. |
|---|
| 51 | </p> |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | <p><br> </p> |
|---|
| 55 | |
|---|
| 56 | <a name="Installation"></a><h2> Installation</h2> |
|---|
| 57 | |
|---|
| 58 | <a name="Requirements"></a><h3> Requirements</h3> |
|---|
| 59 | <p> |
|---|
| 60 | |
|---|
| 61 | Precompiled versions of the DLM (Dynamic Link Module) for Windows (NeXusIDL-API.dll) and Linux (NeXusIDL-API.so) are |
|---|
| 62 | included in the package. If you want to build the DLM a C compiler is required. GCC for Linux and Microsoft Visual C++ |
|---|
| 63 | version 6 have been tested. IDL (ver 6) and the latest NeXus API are required. |
|---|
| 64 | |
|---|
| 65 | <p> The NeXus packages and installation instructions are available at |
|---|
| 66 | <A HREF="http://www.nexusformat.org/Download">http://www.nexusformat.org/Download</A>. </p> |
|---|
| 67 | |
|---|
| 68 | <p> Microsoft offers a free Microsoft C Compiler Toolkit to Compile DLMs for IDL on Windows |
|---|
| 69 | <A HREF="http://msdn.microsoft.com/visualc/vctoolkit2003/"> http://msdn.microsoft.com/visualc/vctoolkit2003/</A> |
|---|
| 70 | </p> |
|---|
| 71 | <P>For Windows the NeXus Data Format |
|---|
| 72 | Windows Installer Kit, which includes the necessary hdf5, hdf4 and |
|---|
| 73 | xml libraries, is recommended. |
|---|
| 74 | <A HREF="http://download.nexusformat.org/kits/windows/">http://download.nexusformat.org/kits/windows/ </A></P> |
|---|
| 75 | |
|---|
| 76 | </p> |
|---|
| 77 | |
|---|
| 78 | <p> |
|---|
| 79 | If the NeXus API header file napi.h is not installed in path you have to edit the correct path to #include list in NeXusIDL-API.c |
|---|
| 80 | |
|---|
| 81 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);"> |
|---|
| 82 | <COL WIDTH=373> |
|---|
| 83 | <THEAD> |
|---|
| 84 | <TR> |
|---|
| 85 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 86 | |
|---|
| 87 | For linux: <br> |
|---|
| 88 | #include "Nexus path/include/napi.h" <br> |
|---|
| 89 | |
|---|
| 90 | For windows: <br> |
|---|
| 91 | #include "C:\Program Files\NeXus Data Format\include\napi.h" <br> |
|---|
| 92 | </TD> |
|---|
| 93 | </TR> |
|---|
| 94 | </THEAD> |
|---|
| 95 | </TABLE> |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | </p> |
|---|
| 99 | <a name="Linux"></a><h3> Linux</h3> |
|---|
| 100 | <p>Edit correct IDL, HDF libraries and NeXus Library paths to Makefile. |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);"> |
|---|
| 104 | <COL WIDTH=373> |
|---|
| 105 | <THEAD> |
|---|
| 106 | <TR> |
|---|
| 107 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 108 | #Configure these directories: |
|---|
| 109 | <P >IDL_DIR = /usr/pack/idl-6.3-vm/idl/</P> |
|---|
| 110 | <P > |
|---|
| 111 | </P> |
|---|
| 112 | <P >HDFROOT=/afs/psi.ch/project/sinq/sl-linux</P> |
|---|
| 113 | <P > |
|---|
| 114 | </P> |
|---|
| 115 | LIBNEXUS = ../../src/trunk/src/.libs/libNeXus.a |
|---|
| 116 | </TD> |
|---|
| 117 | </TR> |
|---|
| 118 | </THEAD> |
|---|
| 119 | </TABLE> |
|---|
| 120 | </p> |
|---|
| 121 | <p> |
|---|
| 122 | Compile with 'make'. |
|---|
| 123 | </p> |
|---|
| 124 | |
|---|
| 125 | <a name="Windows"></a><h3> Windows</h3> |
|---|
| 126 | <p> |
|---|
| 127 | Edit buildwin.bat and change the correct IDL and NeXus directories. |
|---|
| 128 | |
|---|
| 129 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 130 | <COL WIDTH=376> |
|---|
| 131 | <THEAD> |
|---|
| 132 | <TR> |
|---|
| 133 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 134 | REM Configure these directories: |
|---|
| 135 | <P>SET IDL_DIR=c:\rsi\idl63</P> |
|---|
| 136 | SET NXS_DIR= "C:\Program Files\NeXus Data Format" |
|---|
| 137 | </TD> |
|---|
| 138 | </TR> |
|---|
| 139 | </THEAD> |
|---|
| 140 | </TABLE> |
|---|
| 141 | <p> |
|---|
| 142 | |
|---|
| 143 | |
|---|
| 144 | The compiler and linker have to be set to a path. In Visual C++ they can be set with running the batch file in "Microsoft Visual C Directory\VC98\bin\vcvars32.bat". Run buildwin.bat to run build the API. |
|---|
| 145 | |
|---|
| 146 | </p> |
|---|
| 147 | </p> |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | <p><br> </p> |
|---|
| 151 | |
|---|
| 152 | |
|---|
| 153 | |
|---|
| 154 | <a name="Using API from IDL"></a><h2> Using API from IDL</h2> |
|---|
| 155 | |
|---|
| 156 | <a name="Installing a New DLM File To IDL"></a><h3> Installing a New DLM File To IDL</h3> |
|---|
| 157 | <p>Recommeneded way to install the DLM file (NeXusIDL-API.dlm) and the library (NeXusIDL-API.so or NeXusIDL-API.dll) is to copy them to one of the directories IDL searches at startup (and contained in the !IDL_PATH system variable). NOTE: The DLM file and the library must excist in the same directory. |
|---|
| 158 | |
|---|
| 159 | </p> |
|---|
| 160 | <p> |
|---|
| 161 | DLM's can be also loaded with the DLM_REGISTER command in IDL. Also IDL registeres all the DLM files that are located in the directory where it was started in. These options are only preferred for testing. |
|---|
| 162 | |
|---|
| 163 | </p> |
|---|
| 164 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 165 | <COL WIDTH=376> |
|---|
| 166 | <THEAD> |
|---|
| 167 | <TR> |
|---|
| 168 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 169 | new_dlm_file = '/home/scratch/lns/kauppila/temp/IDLNeXus-API/IDLNeXus-API.dlm' |
|---|
| 170 | <p></p> |
|---|
| 171 | DLM_REGISTER, new_dlm_file |
|---|
| 172 | </TD> |
|---|
| 173 | </TR> |
|---|
| 174 | </THEAD> |
|---|
| 175 | </TABLE> |
|---|
| 176 | |
|---|
| 177 | <a name="Test Files"></a><h3> Test Files</h3> |
|---|
| 178 | <p> |
|---|
| 179 | |
|---|
| 180 | <P>The IDLNeXus-API includes IDL files for testing write and read |
|---|
| 181 | functions of the API. write_test.pro and read_test.pro provide |
|---|
| 182 | identical functionality as in the orginal C api napi_test.h</P> |
|---|
| 183 | <P>Testfiles write_test.pro and |
|---|
| 184 | read_test.pro are included. After registering the DLM run in IDL:</P> |
|---|
| 185 | |
|---|
| 186 | <p><b>write_test.pro:</b> Writes a test NeXus file. Accessmethod can be assigned with parameters hdf5, hdf4 and xml. The error codes returned by the routines are printed to IDL console. 1 = NX_OK, 0 = NX_ERROR </p> |
|---|
| 187 | |
|---|
| 188 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 189 | <COL WIDTH=376> |
|---|
| 190 | <THEAD> |
|---|
| 191 | <TR> |
|---|
| 192 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 193 | write_test (Uses NeXus accessmode HDF5 |
|---|
| 194 | for default. Writes NXtest.h5) |
|---|
| 195 | <P>write_test, hdf5 ;(Writes HDF5 file |
|---|
| 196 | NXtest.h5)</P> |
|---|
| 197 | <P>write_test, hdf4 ;(Writes HDF4 file |
|---|
| 198 | NXtest.hdf)</P> |
|---|
| 199 | write_test, xml ;(Writes XML file |
|---|
| 200 | NXtest.xml) |
|---|
| 201 | </TD> |
|---|
| 202 | </TR> |
|---|
| 203 | </THEAD> |
|---|
| 204 | </TABLE> |
|---|
| 205 | |
|---|
| 206 | <P><BR> |
|---|
| 207 | </P> |
|---|
| 208 | <P ><b>read_test: </b>reads the NXtest file produced by write_test and tests the reading functions. Results are printed to IDL console. </P> |
|---|
| 209 | |
|---|
| 210 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 211 | <COL WIDTH=376> |
|---|
| 212 | <THEAD> |
|---|
| 213 | <TR> |
|---|
| 214 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 215 | read_test ;(Uses NeXus accessmode HDF5 |
|---|
| 216 | for default. Reads NXtest.h5) |
|---|
| 217 | <P>read_test, hdf5 ;(Reads HDF5 file |
|---|
| 218 | NXtest.h5)</P> |
|---|
| 219 | <P>read_test, hdf4 ;(Reads HDF4 file |
|---|
| 220 | NXtest.hdf)</P> |
|---|
| 221 | read_test, xml ;(Reads XML file |
|---|
| 222 | NXtest.xml) |
|---|
| 223 | </TD> |
|---|
| 224 | </TR> |
|---|
| 225 | </THEAD> |
|---|
| 226 | </TABLE> |
|---|
| 227 | |
|---|
| 228 | |
|---|
| 229 | <P><b>recursiveread.pro: </b>Takes a NeXus |
|---|
| 230 | supported file as a parameter and prints all the data and attributes |
|---|
| 231 | of the file to IDL console.</P> |
|---|
| 232 | |
|---|
| 233 | </p> |
|---|
| 234 | |
|---|
| 235 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 236 | <COL WIDTH=376> |
|---|
| 237 | <THEAD> |
|---|
| 238 | <TR> |
|---|
| 239 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 240 | recursiveread ;(Prints default file |
|---|
| 241 | Nxtest.h5) |
|---|
| 242 | <P></P>recursiveread, nexusfile.nxs ;(Prints |
|---|
| 243 | nexusfile.nxs) |
|---|
| 244 | </TD> |
|---|
| 245 | </TR> |
|---|
| 246 | </THEAD> |
|---|
| 247 | </TABLE> |
|---|
| 248 | |
|---|
| 249 | |
|---|
| 250 | <a name="Using The API And An Example"></a><h3> Using The API And An Example</h3> <p> The API's functions aim to reproduce |
|---|
| 251 | the funtionality of the C API closely. Some low level functionality has been hidden from the user. Memory allocation |
|---|
| 252 | functions NXmalloc and NXfree are done automatically in the API when needed. In the spirit of IDL, variables or arrays |
|---|
| 253 | retrieved with nxgetdata, nxgetslab or nxgetattr don't have to be datatyped beforehand. However when inputting data or |
|---|
| 254 | attributes with nxputdata, nxputslab or nxputattr the datatypes in IDL have to match with the datatype of the dataset which |
|---|
| 255 | is declared with nxmakedata or in the nxputattr parameters. The matching datatypes are: |
|---|
| 256 | |
|---|
| 257 | |
|---|
| 258 | <TABLE BORDER=1 WIDTH=50% CELLPADDING=2 CELLSPACING=1 ALIGN=CENTER style="background-color: rgb(238, 238, 238);"> |
|---|
| 259 | <COL WIDTH=373> |
|---|
| 260 | <THEAD> |
|---|
| 261 | <TR style="background-color: rgb(204, 204, 204);"> |
|---|
| 262 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 263 | NeXus Datatype |
|---|
| 264 | </TD> |
|---|
| 265 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 266 | Idl Datatype |
|---|
| 267 | </TD> |
|---|
| 268 | |
|---|
| 269 | </TR> |
|---|
| 270 | <TR> |
|---|
| 271 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 272 | NX_CHAR |
|---|
| 273 | </TD> |
|---|
| 274 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 275 | IDL_STRING |
|---|
| 276 | </TD> |
|---|
| 277 | </TR> |
|---|
| 278 | |
|---|
| 279 | <TR> |
|---|
| 280 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 281 | NX_FLOAT32 |
|---|
| 282 | </TD> |
|---|
| 283 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 284 | float |
|---|
| 285 | </TD> |
|---|
| 286 | </TR> |
|---|
| 287 | |
|---|
| 288 | |
|---|
| 289 | <TR> |
|---|
| 290 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 291 | NX_FLOAT64 |
|---|
| 292 | </TD> |
|---|
| 293 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 294 | double |
|---|
| 295 | </TD> |
|---|
| 296 | </TR> |
|---|
| 297 | |
|---|
| 298 | <TR> |
|---|
| 299 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 300 | NX_UINT8 |
|---|
| 301 | </TD> |
|---|
| 302 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 303 | IDL_CHAR |
|---|
| 304 | </TD> |
|---|
| 305 | </TR> |
|---|
| 306 | |
|---|
| 307 | <TR> |
|---|
| 308 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 309 | NX_INT16 |
|---|
| 310 | </TD> |
|---|
| 311 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 312 | IDL_INT |
|---|
| 313 | </TD> |
|---|
| 314 | </TR> |
|---|
| 315 | |
|---|
| 316 | |
|---|
| 317 | <TR> |
|---|
| 318 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 319 | NX_UINT16 |
|---|
| 320 | </TD> |
|---|
| 321 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 322 | IDL_UINT |
|---|
| 323 | </TD> |
|---|
| 324 | </TR> |
|---|
| 325 | |
|---|
| 326 | <TR> |
|---|
| 327 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 328 | NX_INT32 |
|---|
| 329 | </TD> |
|---|
| 330 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 331 | IDL_LONG |
|---|
| 332 | </TD> |
|---|
| 333 | </TR> |
|---|
| 334 | |
|---|
| 335 | |
|---|
| 336 | <TR> |
|---|
| 337 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 338 | NX_UINT32 |
|---|
| 339 | </TD> |
|---|
| 340 | <TD WIDTH=373 VALIGN=TOP> |
|---|
| 341 | IDL_ULONG |
|---|
| 342 | </TD> |
|---|
| 343 | </TR> |
|---|
| 344 | |
|---|
| 345 | </THEAD> |
|---|
| 346 | </TABLE> |
|---|
| 347 | |
|---|
| 348 | <p> <br> </p> |
|---|
| 349 | Here is simple example program that demonstrates the basic functions and most important differences between the C Nexus Api and the IDL Nexus API. <br> 1. Creates a NeXus file with access method HDF5 <br>2. adds datagroups <br>3. makes a data array of data type NX_INT32 <br>4. puts data to the array <br>5. reads the data and attributes <br>6. prints data and attribute value <br>7.closes the groups and the file. |
|---|
| 350 | |
|---|
| 351 | |
|---|
| 352 | |
|---|
| 353 | |
|---|
| 354 | <TABLE WIDTH=85% BORDER=1 CELLPADDING=4 CELLSPACING=3 ALIGN=CENTER style="background-color: rgb(238, 238, 238);" > |
|---|
| 355 | <COL WIDTH=376> |
|---|
| 356 | <THEAD> |
|---|
| 357 | <TR> |
|---|
| 358 | <TD WIDTH=376 VALIGN=TOP> |
|---|
| 359 | pro simpletest <br> |
|---|
| 360 | <b>; Accessmethod accepts strings or integer </b><br> |
|---|
| 361 | S = nxopen("test.h5","NXACC_CREATE5",fileid) <br> |
|---|
| 362 | S = nxmakegroup(fileid, "testgroup", "NXentry") <br> |
|---|
| 363 | S = nxopengroup(fileid, "testgroup", "NXentry") <br> |
|---|
| 364 | S = nxmakegroup(fileid, "anothergroup", "NXentry") <br> |
|---|
| 365 | |
|---|
| 366 | <p> |
|---|
| 367 | <b>;Only type Long arrays are accepted for declaring dimensions with nxmakedata or nxputslab </b><br> |
|---|
| 368 | array =[4L,4L] ; Array Dimensions <br> |
|---|
| 369 | rank = 2 ; Array rank<br> |
|---|
| 370 | <b>;Datatype long data array </b><br> |
|---|
| 371 | data =[[0L,1L,2L,3L],[4L,5L,6L,7L],[8L,9L,10L,11L],[12L,13L,14L,15L] ] <br> |
|---|
| 372 | |
|---|
| 373 | </p> |
|---|
| 374 | <b>; Make a data set for the array with 4x4 elements, rank 2 and data type NX_INT32, which matches the IDL data type Long<br> |
|---|
| 375 | ; Data type accepts strings or integer values. </b><br> |
|---|
| 376 | S = nxmakedata(fileid, 'data1', 'NX_INT32', rank, array) <br> |
|---|
| 377 | S = nxopendata(fileid, "data1") <br> |
|---|
| 378 | S = nxputdata(fileid, data) <br> |
|---|
| 379 | <p></p> |
|---|
| 380 | <b>; IDL data type of the attribute has to match the NeXus data type assigned with parameter datatype<br> |
|---|
| 381 | ; Here IDL UINT and NX_UINT16 </b> <br> |
|---|
| 382 | attributevalue = 42UINT <br> |
|---|
| 383 | S = nxputattr(fileid,'test-attribute', attributevalue, 1, 'NX_UINT16') <br> |
|---|
| 384 | S = nxclosedata(fileid) <br> |
|---|
| 385 | S = nxopendata(fileid, "data1") <br> |
|---|
| 386 | |
|---|
| 387 | S = nxgetdata(fileid, getdata) <br> |
|---|
| 388 | print, 'data : ',getdata <br> |
|---|
| 389 | |
|---|
| 390 | S = nxgetnextattr (fileid, attrname, lenght, attr_type) <br> |
|---|
| 391 | S = nxgetattr(fileid, attrname, value, lenght,attr_type) <br> |
|---|
| 392 | print, 'attribute value: ', value <br> |
|---|
| 393 | S = nxclosedata(fileid) <br> |
|---|
| 394 | S = nxclosegroup(fileid) <br> |
|---|
| 395 | S = nxclose(fileid) <br> |
|---|
| 396 | end |
|---|
| 397 | |
|---|
| 398 | |
|---|
| 399 | |
|---|
| 400 | </TD> |
|---|
| 401 | </TR> |
|---|
| 402 | </THEAD> |
|---|
| 403 | </TABLE> |
|---|
| 404 | |
|---|
| 405 | </p> |
|---|
| 406 | |
|---|
| 407 | <a name="NeXus IDL API Routines"></a><h3> NeXus IDL API Routines</h3> |
|---|
| 408 | <p>Here's the list of functions in the NeXus IDL API. <br> |
|---|
| 409 | |
|---|
| 410 | (Limitatins 8 dimensions data |
|---|
| 411 | max 8192 handles and 200 links per handle, NXINT8 not supported in data) |
|---|
| 412 | |
|---|
| 413 | </p> |
|---|
| 414 | |
|---|
| 415 | |
|---|
| 416 | |
|---|
| 417 | |
|---|
| 418 | |
|---|
| 419 | <ul> |
|---|
| 420 | <li ><a href="#General_Initialization_and_Shutdown">1. General Initialization and Shutdown</a> |
|---|
| 421 | <ul> |
|---|
| 422 | <li ><a href="#NXopen">1.1 NXopen</a></li> |
|---|
| 423 | <li><a href="#NXclose">1.2 NXclose </a></li> |
|---|
| 424 | <li><a href="#NXmakegroup">1.3 NXmakegroup</a></li> |
|---|
| 425 | <li><a href="#NXopengroup">1.4 NXopengroup</a></li> |
|---|
| 426 | <li><a href="#NXopenpath">1.5 NXopenpath</a></li> |
|---|
| 427 | <li><a href="#NXopengrouppath">1.6 NXopengrouppath</a></li> |
|---|
| 428 | <li><a href="#NXclosegroup">1.7 NXclosegroup</a></li> |
|---|
| 429 | <li><a href="#NXmakedata">1.8 NXmakedata</a></li> |
|---|
| 430 | <li><a href="#NXcompmakedata">1.9 NXcompmakedata</a></li> |
|---|
| 431 | <li><a href="#NXopendata">1.10 NXopendata</a></li> |
|---|
| 432 | <li><a href="#NXcompress">1.11 NXcompress</a></li> |
|---|
| 433 | <li><a href="#NXclosedata">1.12 NXclosedata</a></li> |
|---|
| 434 | <li><a href="#NXsetnumberformat">1.13 NXsetnumberformat</a></li> |
|---|
| 435 | </ul> |
|---|
| 436 | </li> |
|---|
| 437 | <li class="toclevel-1"><a href="#Reading_and_Writing">2. Reading and Writing</a> |
|---|
| 438 | <ul> |
|---|
| 439 | <li><a href="#NXgetdata">2.1 NXgetdata</a></li> |
|---|
| 440 | <li><a href="#NXgetslab">2.2 NXgetslab</a></li> |
|---|
| 441 | <li><a href="#NXgetattr">2.3 NXgetattr</a></li> |
|---|
| 442 | <li><a href="#NXputdata">2.4 NXputdata</a></li> |
|---|
| 443 | <li><a href="#NXputslab">2.5 NXputslab</a></li> |
|---|
| 444 | <li><a href="#NXputattr">2.6 NXputattr</a></li> |
|---|
| 445 | <li><a href="#NXflush">2.7 NXflush</a></li> |
|---|
| 446 | </ul> |
|---|
| 447 | </li> |
|---|
| 448 | <li class="toclevel-1"><a href="#Meta-Data_Routines">3. Meta-Data Routines</a> |
|---|
| 449 | <ul> |
|---|
| 450 | <li><a href="#NXgetinfo">3.1 NXgetinfo</a></li> |
|---|
| 451 | <li><a href="#NXgetgroupinfo">3.2 NXgetgroupinfo</a></li> |
|---|
| 452 | <li><a href="#NXinitgroupdir">3.3 NXinitgroupdir</a></li> |
|---|
| 453 | <li><a href="#NXgetnextentry">3.4 NXgetnextentry</a></li> |
|---|
| 454 | <li><a href="#NXgetattrinfo">3.5 NXgetattrinfo</a></li> |
|---|
| 455 | <li><a href="#NXinitattrdir">3.6 NXinitattrdir</a></li> |
|---|
| 456 | <li><a href="#NXgetnextattr">3.7 NXgetnextattr</a></li> |
|---|
| 457 | <li><a href="#NXgetgroupID">3.8 NXgetgroupID</a></li> |
|---|
| 458 | <li><a href="#NXgetdataID">3.9 NXgetdataID</a></li> |
|---|
| 459 | <li><a href="#NXmakelink">3.10 NXmakelink</a></li> |
|---|
| 460 | <li><a href="#NXsameID">3.11 NXsameID</a></li> |
|---|
| 461 | <li><a href="#NXopensourcegroup">3.12 NXopensourcegroup</a></li> |
|---|
| 462 | </ul> |
|---|
| 463 | </li> |
|---|
| 464 | |
|---|
| 465 | <li class="toclevel-1"><a href="#External_Linking">4. External Linking</a> |
|---|
| 466 | <ul> |
|---|
| 467 | <li><a href="#Nxinquirefile">4.1 Nxinquirefile</a></li> |
|---|
| 468 | <li><a href="#NXlinkexternal">4.2 NXlinkexternal</a></li> |
|---|
| 469 | <li><a href="#NXisexternalgroup">4.3 NXisexternalgroup</a></li> |
|---|
| 470 | </ul> |
|---|
| 471 | </li> |
|---|
| 472 | </ul> |
|---|
| 473 | </td></tr></tbody></table> |
|---|
| 474 | |
|---|
| 475 | |
|---|
| 476 | |
|---|
| 477 | |
|---|
| 478 | |
|---|
| 479 | |
|---|
| 480 | <a name="General_Initialization_and_Shutdown"></a><h2> General Initialization and Shutdown</h2> |
|---|
| 481 | <a name="NXopen"></a><h3> NXopen</h3> |
|---|
| 482 | <p>Opens the NeXus file, and creates and initializes the NeXus file structure. The returned handle is integer assosiated with a pointer structure, do not modify it. |
|---|
| 483 | </p> |
|---|
| 484 | <dl><dt>Usage</dt><dd><pre>status = NXopen (file_name, access_method, file_id)</pre> |
|---|
| 485 | </dd></dl> |
|---|
| 486 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 487 | |
|---|
| 488 | <tbody><tr> |
|---|
| 489 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 490 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 491 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 492 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 493 | </th></tr> |
|---|
| 494 | <tr> |
|---|
| 495 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 496 | </th><td> status |
|---|
| 497 | </td><td> int |
|---|
| 498 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 499 | </td></tr> |
|---|
| 500 | <tr> |
|---|
| 501 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 502 | </th><td> file_name |
|---|
| 503 | </td><td> string |
|---|
| 504 | </td><td> Name of NeXus file to be opened |
|---|
| 505 | </td></tr> |
|---|
| 506 | <tr> |
|---|
| 507 | <td> access_method |
|---|
| 508 | </td><td> int or string |
|---|
| 509 | </td><td> |
|---|
| 510 | <dl><dt>File Access</dt><dd>NXACC_READ - read only |
|---|
| 511 | </dd><dd>NXACC_RDWR - read and write access |
|---|
| 512 | </dd><dd>NXACC_CREATE - create (HDF4) file |
|---|
| 513 | </dd><dd>NXACC_CREATE4 - create HDF4 file |
|---|
| 514 | </dd><dd>NXACC_CREATE5 - create HDF5 file |
|---|
| 515 | </dd><dd>NXACC_CREATEXML - create XML file |
|---|
| 516 | </dd></dl> |
|---|
| 517 | </td></tr> |
|---|
| 518 | <tr> |
|---|
| 519 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 520 | </th><td> file_id |
|---|
| 521 | </td><td> int |
|---|
| 522 | </td><td> Identifier of NeXus file |
|---|
| 523 | </td></tr></tbody></table> |
|---|
| 524 | |
|---|
| 525 | <a name="NXclose"></a><h3> NXclose</h3> |
|---|
| 526 | <p>Closes NeXus file and deletes all associated data structures from memory. |
|---|
| 527 | </p> |
|---|
| 528 | <dl><dt>Usage</dt><dd><pre>status = NXclose (file_id)</pre> |
|---|
| 529 | </dd></dl> |
|---|
| 530 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 531 | |
|---|
| 532 | <tbody><tr> |
|---|
| 533 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 534 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 535 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 536 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 537 | </th></tr> |
|---|
| 538 | <tr> |
|---|
| 539 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 540 | </th><td> status |
|---|
| 541 | </td><td> int |
|---|
| 542 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 543 | </td></tr> |
|---|
| 544 | <tr> |
|---|
| 545 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 546 | </th><td> file_id |
|---|
| 547 | </td><td> int |
|---|
| 548 | </td><td> Identifier of NeXus file |
|---|
| 549 | </td></tr></tbody></table> |
|---|
| 550 | <a name="NXmakegroup"></a><h3> NXmakegroup</h3> |
|---|
| 551 | <p>Creates a NeXus group at the current level in the group hierarchy, |
|---|
| 552 | defining its name and class. This does not open the new group |
|---|
| 553 | automatically. |
|---|
| 554 | </p> |
|---|
| 555 | <dl><dt>Usage</dt><dd><pre>status = NXmakegroup (file_id, group_name, group_class)</pre> |
|---|
| 556 | </dd></dl> |
|---|
| 557 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 558 | |
|---|
| 559 | <tbody><tr> |
|---|
| 560 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 561 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 562 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 563 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 564 | </th></tr> |
|---|
| 565 | <tr> |
|---|
| 566 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 567 | </th><td> status |
|---|
| 568 | </td><td> int |
|---|
| 569 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 570 | </td></tr> |
|---|
| 571 | <tr> |
|---|
| 572 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 573 | </th><td> file_id |
|---|
| 574 | </td><td> int |
|---|
| 575 | </td><td> Identifier of NeXus file |
|---|
| 576 | </td></tr> |
|---|
| 577 | <tr> |
|---|
| 578 | <td> group_name |
|---|
| 579 | </td><td> string |
|---|
| 580 | </td><td> Name of NeXus group |
|---|
| 581 | </td></tr> |
|---|
| 582 | <tr> |
|---|
| 583 | <td> group_class |
|---|
| 584 | </td><td> string |
|---|
| 585 | </td><td> Class of NeXus group |
|---|
| 586 | </td></tr></tbody></table> |
|---|
| 587 | |
|---|
| 588 | <a name="NXopengroup"></a><h3> NXopengroup</h3> |
|---|
| 589 | <p>Opens an existing NeXus group for input and output of data. |
|---|
| 590 | </p> |
|---|
| 591 | <dl><dt>Usage</dt><dd><pre>status = NXopengroup (file_id, group_name, group_class)</pre> |
|---|
| 592 | </dd></dl> |
|---|
| 593 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 594 | |
|---|
| 595 | <tbody><tr> |
|---|
| 596 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 597 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 598 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 599 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 600 | </th></tr> |
|---|
| 601 | <tr> |
|---|
| 602 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 603 | </th><td> status |
|---|
| 604 | </td><td> int |
|---|
| 605 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 606 | </td></tr> |
|---|
| 607 | <tr> |
|---|
| 608 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 609 | </th><td> file_id |
|---|
| 610 | </td><td> int |
|---|
| 611 | </td><td> Identifier of NeXus file |
|---|
| 612 | </td></tr> |
|---|
| 613 | <tr> |
|---|
| 614 | <td> group_name |
|---|
| 615 | </td><td> string |
|---|
| 616 | </td><td> Name of NeXus group |
|---|
| 617 | </td></tr> |
|---|
| 618 | <tr> |
|---|
| 619 | <td> group_class |
|---|
| 620 | </td><td> string |
|---|
| 621 | </td><td> Class of NeXus group |
|---|
| 622 | </td></tr></tbody></table> |
|---|
| 623 | <a name="NXopenpath"></a><h3> NXopenpath</h3> |
|---|
| 624 | <p>Opens a NeXus group or dataset from a path string. The NeXus item must exist for NXopenpath to work correctly. |
|---|
| 625 | The path string for NXopenpath has the same form as a unix path string: /group1/group/group2/dataset. Both absolute |
|---|
| 626 | and relative path are supported. |
|---|
| 627 | </p> |
|---|
| 628 | <dl><dt>Usage</dt><dd><pre>status = NXopenpath(file_id, path_string)</pre> |
|---|
| 629 | </dd></dl> |
|---|
| 630 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 631 | |
|---|
| 632 | <tbody><tr> |
|---|
| 633 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 634 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 635 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 636 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 637 | </th></tr> |
|---|
| 638 | <tr> |
|---|
| 639 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 640 | </th><td> status |
|---|
| 641 | </td><td> int |
|---|
| 642 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 643 | </td></tr> |
|---|
| 644 | <tr> |
|---|
| 645 | <td style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 646 | </td><td> file_id |
|---|
| 647 | </td><td> int |
|---|
| 648 | </td><td>Identifier of NeXus file |
|---|
| 649 | </td></tr> |
|---|
| 650 | <tr> |
|---|
| 651 | <td> path_string |
|---|
| 652 | </td><td> string |
|---|
| 653 | </td><td> path to dataset or group in NeXus file |
|---|
| 654 | </td></tr></tbody></table> |
|---|
| 655 | <a name="NXopengrouppath"></a><h3> NXopengrouppath</h3> |
|---|
| 656 | <p>Opens a NeXus group from a path string. This function is subtly different from NXopenpath in that it only |
|---|
| 657 | opens the path to the last group; it does not open datasets. The NeXus item must exist for NXopengrouppath to work correctly. |
|---|
| 658 | The path string for NXopengrouppath has the same form as a unix path string: /group1/group/group2/dataset. Both absolute |
|---|
| 659 | and relative path are supported. |
|---|
| 660 | </p> |
|---|
| 661 | <dl><dt>Usage</dt><dd><pre>status = NXopengrouppath(file_id, path_string)</pre> |
|---|
| 662 | </dd></dl> |
|---|
| 663 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 664 | |
|---|
| 665 | <tbody><tr> |
|---|
| 666 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 667 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 668 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 669 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 670 | </th></tr> |
|---|
| 671 | <tr> |
|---|
| 672 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 673 | </th><td> status |
|---|
| 674 | </td><td> int |
|---|
| 675 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 676 | </td></tr> |
|---|
| 677 | <tr> |
|---|
| 678 | <td style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 679 | </td><td> file_id |
|---|
| 680 | </td><td> int |
|---|
| 681 | </td><td>Identifier of NeXus file |
|---|
| 682 | </td></tr> |
|---|
| 683 | <tr> |
|---|
| 684 | <td> path_string |
|---|
| 685 | </td><td> string |
|---|
| 686 | </td><td> path to dataset or group in NeXus file |
|---|
| 687 | </td></tr></tbody></table> |
|---|
| 688 | <p><br> |
|---|
| 689 | </p> |
|---|
| 690 | <a name="NXclosegroup"></a><h3> NXclosegroup</h3> |
|---|
| 691 | <p>Closes the currently open group. If this group is a top-level group |
|---|
| 692 | (i.e. with class NXentry), no groups are left open. Otherwise, the next |
|---|
| 693 | group up in the hierarchy (i.e. the group containing the currently open |
|---|
| 694 | group) is left open. |
|---|
| 695 | </p> |
|---|
| 696 | <dl><dt>Usage</dt><dd><pre>status = NXclosegroup (file_id)</pre> |
|---|
| 697 | </dd></dl> |
|---|
| 698 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 699 | |
|---|
| 700 | <tbody><tr> |
|---|
| 701 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 702 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 703 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 704 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 705 | </th></tr> |
|---|
| 706 | <tr> |
|---|
| 707 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 708 | </th><td> status |
|---|
| 709 | </td><td> int |
|---|
| 710 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 711 | </td></tr> |
|---|
| 712 | <tr> |
|---|
| 713 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 714 | </th><td> file_id |
|---|
| 715 | </td><td> int |
|---|
| 716 | </td><td> Identifier of NeXus file |
|---|
| 717 | </td></tr></tbody></table> |
|---|
| 718 | <a name="NXmakedata"></a><h3> NXmakedata</h3> |
|---|
| 719 | <p>Creates a new NeXus data set with the specified name, type, rank and dimensions. <p><b>NeXus IDL API NOTE: The data type for the dimensions array must be type long. </b> </p> |
|---|
| 720 | </p> |
|---|
| 721 | <dl><dt>Usage</dt><dd><pre>status = NXmakedata (file_id, data_name, data_type, rank, dimensions[])</pre> |
|---|
| 722 | </dd></dl> |
|---|
| 723 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 724 | |
|---|
| 725 | <tbody><tr> |
|---|
| 726 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 727 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 728 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 729 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 730 | </th></tr> |
|---|
| 731 | <tr> |
|---|
| 732 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 733 | </th><td> status |
|---|
| 734 | </td><td> int |
|---|
| 735 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 736 | </td></tr> |
|---|
| 737 | <tr> |
|---|
| 738 | <th style="background-color: rgb(204, 204, 204);" rowspan="5"> Input Arguments |
|---|
| 739 | </th><td> file_id |
|---|
| 740 | </td><td> int |
|---|
| 741 | </td><td> Identifier of NeXus file |
|---|
| 742 | </td></tr> |
|---|
| 743 | <tr> |
|---|
| 744 | <td> data_name |
|---|
| 745 | </td><td> string |
|---|
| 746 | </td><td> Name of NeXus data set |
|---|
| 747 | </td></tr> |
|---|
| 748 | <tr> |
|---|
| 749 | <td> data_type |
|---|
| 750 | </td><td> int or string |
|---|
| 751 | </td><td> |
|---|
| 752 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 753 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 754 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 755 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 756 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 757 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 758 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 759 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 760 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 761 | </dd></dl> |
|---|
| 762 | </td></tr> |
|---|
| 763 | <tr> |
|---|
| 764 | <td> rank |
|---|
| 765 | </td><td> int |
|---|
| 766 | </td><td> Rank of data |
|---|
| 767 | </td></tr> |
|---|
| 768 | <tr> |
|---|
| 769 | <td> dimensions |
|---|
| 770 | </td><td> Array of IDL type Long |
|---|
| 771 | </td><td> Dimensions of data. The array is of size 'rank' |
|---|
| 772 | </td></tr></tbody></table> |
|---|
| 773 | <a name="NXcompmakedata"></a><h3>NXcompmakedata</h3> |
|---|
| 774 | <p>Creates a new NeXus data set with the specified name, type, rank and dimensions, compressed using the specified protocol. |
|---|
| 775 | |
|---|
| 776 | <p><b>NeXus IDL API NOTE: The data type for the dimensions array and bufsize array must be type long in IDL. </b> </p> |
|---|
| 777 | |
|---|
| 778 | </p> |
|---|
| 779 | <dl><dt>Usage</dt><dd><pre>status = NXcompmakedata (file_id, data_name, data_type, rank, dimensions[], compress_type, bufsize[])</pre> |
|---|
| 780 | </dd></dl> |
|---|
| 781 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 782 | |
|---|
| 783 | <tbody><tr> |
|---|
| 784 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 785 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 786 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 787 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 788 | </th></tr> |
|---|
| 789 | <tr> |
|---|
| 790 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 791 | </th><td> status |
|---|
| 792 | </td><td> int |
|---|
| 793 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 794 | </td></tr> |
|---|
| 795 | <tr> |
|---|
| 796 | <th style="background-color: rgb(204, 204, 204);" rowspan="7"> Input Arguments |
|---|
| 797 | </th><td> file_id |
|---|
| 798 | </td><td> int |
|---|
| 799 | </td><td> Identifier of NeXus file |
|---|
| 800 | </td></tr> |
|---|
| 801 | <tr> |
|---|
| 802 | <td> data_name |
|---|
| 803 | </td><td> string |
|---|
| 804 | </td><td> Name of NeXus data set |
|---|
| 805 | </td></tr> |
|---|
| 806 | <tr> |
|---|
| 807 | <td> data_type |
|---|
| 808 | </td><td> int or string |
|---|
| 809 | </td><td> |
|---|
| 810 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 811 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 812 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 813 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 814 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 815 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 816 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 817 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 818 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 819 | </dd></dl> |
|---|
| 820 | </td></tr> |
|---|
| 821 | <tr> |
|---|
| 822 | <td> rank |
|---|
| 823 | </td><td> int |
|---|
| 824 | </td><td> Rank of data |
|---|
| 825 | </td></tr> |
|---|
| 826 | <tr> |
|---|
| 827 | <td> dimensions |
|---|
| 828 | </td><td> Array of IDL type Long |
|---|
| 829 | </td><td> Dimensions of data. The array is of size 'rank' |
|---|
| 830 | </td></tr> |
|---|
| 831 | <tr> |
|---|
| 832 | <td> compress_type |
|---|
| 833 | </td><td> int or string |
|---|
| 834 | </td><td> |
|---|
| 835 | <dl><dt>Compression algorithm</dt><dd>NX_COMP_LZW - GZIP |
|---|
| 836 | </dd><dd>NX_COMP_HUF - Skipping Huffman |
|---|
| 837 | </dd><dd>NX_COMP_RLE - Run Length Encoding |
|---|
| 838 | </dd></dl> |
|---|
| 839 | </td></tr> |
|---|
| 840 | <tr> |
|---|
| 841 | <td> bufsize |
|---|
| 842 | </td><td> Array of IDL type Long |
|---|
| 843 | </td><td> The typical buffersize for writing. |
|---|
| 844 | </td></tr></tbody></table> |
|---|
| 845 | <p>The buffersize requires further explanation. HDF-5 compresses data in chunks. And the buffersize |
|---|
| 846 | is this chunksize. If data is written in one go with a NXputdata, this is the dimensions of the |
|---|
| 847 | data. If data is written in slabs, this is the preferred size of the slabs. Please note, that this has |
|---|
| 848 | only a performance impact when writing, it is no show stopper. Please note that HDF-4 does not support |
|---|
| 849 | compression on data sets written in slabs: If you want compression with HDF-4, data must be written with |
|---|
| 850 | one call to NXputdata. Compression is ignored for XML-NeXus files. |
|---|
| 851 | </p> |
|---|
| 852 | <a name="NXopendata"></a><h3> NXopendata</h3> |
|---|
| 853 | <p>Opens an existing NeXus data set for further processing i.e. reading |
|---|
| 854 | and writing data or attributes, defining compression algorithms, and |
|---|
| 855 | obtaining data set information. |
|---|
| 856 | </p> |
|---|
| 857 | <dl><dt>Usage</dt><dd><pre>status = NXopendata (file_id, data_name)</pre> |
|---|
| 858 | </dd></dl> |
|---|
| 859 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 860 | |
|---|
| 861 | <tbody><tr> |
|---|
| 862 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 863 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 864 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 865 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 866 | </th></tr> |
|---|
| 867 | <tr> |
|---|
| 868 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 869 | </th><td> status |
|---|
| 870 | </td><td> int |
|---|
| 871 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 872 | </td></tr> |
|---|
| 873 | <tr> |
|---|
| 874 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 875 | </th><td> file_id |
|---|
| 876 | </td><td> int |
|---|
| 877 | </td><td> Identifier of NeXus file |
|---|
| 878 | </td></tr> |
|---|
| 879 | <tr> |
|---|
| 880 | <td> data_name |
|---|
| 881 | </td><td> string |
|---|
| 882 | </td><td> Name of NeXus data set |
|---|
| 883 | </td></tr></tbody></table> |
|---|
| 884 | <a name="NXcompress"></a><h3> NXcompress</h3> |
|---|
| 885 | <p>Defines a compression algorithm for subsequent calls to NXputdata. |
|---|
| 886 | This routine is now deprecated; please use NXcompmakedata instead. |
|---|
| 887 | </p> |
|---|
| 888 | <dl><dt>Usage</dt><dd><pre>status = NXcompress (file_id, compress_type)</pre> |
|---|
| 889 | </dd></dl> |
|---|
| 890 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 891 | |
|---|
| 892 | <tbody><tr> |
|---|
| 893 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 894 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 895 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 896 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 897 | </th></tr> |
|---|
| 898 | <tr> |
|---|
| 899 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 900 | </th><td> status |
|---|
| 901 | </td><td> int |
|---|
| 902 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 903 | </td></tr> |
|---|
| 904 | <tr> |
|---|
| 905 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 906 | </th><td> file_id |
|---|
| 907 | </td><td> int |
|---|
| 908 | </td><td> Identifier of NeXus file |
|---|
| 909 | </td></tr> |
|---|
| 910 | <tr> |
|---|
| 911 | <td> compress_type |
|---|
| 912 | </td><td> int or string |
|---|
| 913 | </td><td> |
|---|
| 914 | <dl><dt>Compression algorithm</dt><dd>NX_COMP_LZW - GZIP |
|---|
| 915 | </dd><dd>NX_COMP_HUF - Skipping Huffman |
|---|
| 916 | </dd><dd>NX_COMP_RLE - Run Length Encoding |
|---|
| 917 | </dd></dl> |
|---|
| 918 | </td></tr></tbody></table> |
|---|
| 919 | <a name="NXclosedata"></a><h3>NXclosedata</h3> |
|---|
| 920 | <p>Ends access to the currently active data set |
|---|
| 921 | </p> |
|---|
| 922 | <dl><dt>Usage</dt><dd><pre>status = NXclosedata (file_id)</pre> |
|---|
| 923 | </dd></dl> |
|---|
| 924 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 925 | |
|---|
| 926 | <tbody><tr> |
|---|
| 927 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 928 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 929 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 930 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 931 | </th></tr> |
|---|
| 932 | <tr> |
|---|
| 933 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 934 | </th><td> status |
|---|
| 935 | </td><td> int |
|---|
| 936 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 937 | </td></tr> |
|---|
| 938 | <tr> |
|---|
| 939 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 940 | </th><td> file_id |
|---|
| 941 | </td><td> int |
|---|
| 942 | </td><td> Identifier of NeXus file |
|---|
| 943 | </td></tr> |
|---|
| 944 | </tbody></table> |
|---|
| 945 | <p><br> |
|---|
| 946 | </p> |
|---|
| 947 | <a name="NXsetnumberformat"></a><h3> NXsetnumberformat</h3> |
|---|
| 948 | <p>Sets the number format when writing to ASCII files. When serializing |
|---|
| 949 | NeXus file to ASCII-XML files a format for printing numbers is |
|---|
| 950 | required. The NeXus-API has reasonable defaults for this. However, with |
|---|
| 951 | this |
|---|
| 952 | function a desired format can be choosen for special cases. Please note |
|---|
| 953 | that calls to this function will be silently ignored for the binary |
|---|
| 954 | NeXus formats HDF-4 and HDF-5. |
|---|
| 955 | </p> |
|---|
| 956 | <dl><dt>Usage</dt><dd><pre>status = NXsetnumberformat(file_id,data_type,format_string</pre> |
|---|
| 957 | </dd></dl> |
|---|
| 958 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 959 | |
|---|
| 960 | <tbody><tr> |
|---|
| 961 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 962 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 963 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 964 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 965 | </th></tr> |
|---|
| 966 | <tr> |
|---|
| 967 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 968 | </th><td> status |
|---|
| 969 | </td><td> int |
|---|
| 970 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 971 | </td></tr> |
|---|
| 972 | <tr> |
|---|
| 973 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 974 | </th><td> file_id |
|---|
| 975 | </td><td> int |
|---|
| 976 | </td><td> Identifier of NeXus file |
|---|
| 977 | </td></tr> |
|---|
| 978 | <tr> |
|---|
| 979 | <td>data_type |
|---|
| 980 | </td><td> int or string |
|---|
| 981 | </td><td> The NeXus data type for which to change the print format. |
|---|
| 982 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 983 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 984 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 985 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 986 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 987 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 988 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 989 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 990 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 991 | </dd></dl> |
|---|
| 992 | </td></tr> |
|---|
| 993 | <tr> |
|---|
| 994 | <td> format_string |
|---|
| 995 | </td><td> string |
|---|
| 996 | </td><td> A ANSI-C language style format string |
|---|
| 997 | </td></tr> |
|---|
| 998 | </tbody></table> |
|---|
| 999 | <p><br> |
|---|
| 1000 | </p> |
|---|
| 1001 | <a name="Reading_and_Writing"></a><h2> Reading and Writing</h2> |
|---|
| 1002 | <a name="NXgetdata"></a><h3> NXgetdata</h3> |
|---|
| 1003 | <p>Reads data values from the currently open data set. Please note that |
|---|
| 1004 | memory overwrite occurs if the caller has not allocated enough memory |
|---|
| 1005 | to hold all the data available. Call NXgetinfo to determine the |
|---|
| 1006 | required dimension sizes. The data set must have been opened by |
|---|
| 1007 | NXopendata. |
|---|
| 1008 | </p> |
|---|
| 1009 | <dl><dt>Usage</dt><dd><pre>status = NXgetdata (file_id, data)</pre> |
|---|
| 1010 | </dd></dl> |
|---|
| 1011 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1012 | |
|---|
| 1013 | <tbody><tr> |
|---|
| 1014 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1015 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1016 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1017 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1018 | </th></tr> |
|---|
| 1019 | <tr> |
|---|
| 1020 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1021 | </th><td> status |
|---|
| 1022 | </td><td> int |
|---|
| 1023 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1024 | </td></tr> |
|---|
| 1025 | <tr> |
|---|
| 1026 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1027 | </th><td> file_id |
|---|
| 1028 | </td><td> int |
|---|
| 1029 | </td><td> Identifier of NeXus file |
|---|
| 1030 | </td></tr> |
|---|
| 1031 | <tr> |
|---|
| 1032 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 1033 | </th><td> data |
|---|
| 1034 | </td><td> equivalent IDL data type of the NeXus data |
|---|
| 1035 | </td><td> Data values |
|---|
| 1036 | </td></tr></tbody></table> |
|---|
| 1037 | <a name="NXgetslab"></a><h3>NXgetslab</h3> |
|---|
| 1038 | <p>Reads a subset of the data in the current data set specifying the |
|---|
| 1039 | starting indices and size of each dimension. The caller is responsible |
|---|
| 1040 | for allocating enough memory for the data. |
|---|
| 1041 | |
|---|
| 1042 | <p><b>NeXus IDL API NOTE: The data type for the slab start and slab size arrays must be type long in IDL. </b> </p> |
|---|
| 1043 | |
|---|
| 1044 | </p> |
|---|
| 1045 | <dl><dt>Usage</dt><dd><pre>status = NXgetslab (file_id, data, start[], size[])</pre> |
|---|
| 1046 | </dd></dl> |
|---|
| 1047 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1048 | |
|---|
| 1049 | <tbody><tr> |
|---|
| 1050 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1051 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1052 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1053 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1054 | </th></tr> |
|---|
| 1055 | <tr> |
|---|
| 1056 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1057 | </th><td> status |
|---|
| 1058 | </td><td> int |
|---|
| 1059 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1060 | </td></tr> |
|---|
| 1061 | <tr> |
|---|
| 1062 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 1063 | </th><td> file_id |
|---|
| 1064 | </td><td> int |
|---|
| 1065 | </td><td> Identifier of NeXus file |
|---|
| 1066 | </td></tr> |
|---|
| 1067 | <tr> |
|---|
| 1068 | <td> start[] |
|---|
| 1069 | </td><td> Array of IDL type Long |
|---|
| 1070 | </td><td> Indices of starting values in each dimension |
|---|
| 1071 | </td></tr> |
|---|
| 1072 | <tr> |
|---|
| 1073 | <td> size[] |
|---|
| 1074 | </td><td> Array of IDL type Long |
|---|
| 1075 | </td><td> Length of slab in each dimension |
|---|
| 1076 | </td></tr> |
|---|
| 1077 | <tr> |
|---|
| 1078 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 1079 | </th><td> data |
|---|
| 1080 | </td><td> equivalent IDL data type of the NeXus data |
|---|
| 1081 | </td><td> Data values |
|---|
| 1082 | </td></tr></tbody></table> |
|---|
| 1083 | <a name="NXgetattr"></a><h3> NXgetattr</h3> |
|---|
| 1084 | <p>Reads attribute values associated with the currently open data set. |
|---|
| 1085 | The attribute is defined by its name. Attributes are meta-data; data |
|---|
| 1086 | that provides information on the associated data set such as units, |
|---|
| 1087 | long names etc. If no data set is open, it looks for a global attribute |
|---|
| 1088 | i.e. attributes of the NeXus file. The caller is responsible for |
|---|
| 1089 | allocating enough memory for the attribute values. Note, however, that |
|---|
| 1090 | only the first 'length' bytes of the attribute are read to prevent |
|---|
| 1091 | memory overwrite. |
|---|
| 1092 | </p> |
|---|
| 1093 | <dl><dt>Usage</dt><dd><pre>status = NXgetattr (file_id, attr_name, value, length, type)</pre> |
|---|
| 1094 | </dd></dl> |
|---|
| 1095 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1096 | |
|---|
| 1097 | <tbody><tr> |
|---|
| 1098 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1099 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1100 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1101 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1102 | </th></tr> |
|---|
| 1103 | <tr> |
|---|
| 1104 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1105 | </th><td> status |
|---|
| 1106 | </td><td> int |
|---|
| 1107 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1108 | </td></tr> |
|---|
| 1109 | <tr> |
|---|
| 1110 | <th style="background-color: rgb(204, 204, 204);" rowspan="4"> Input Arguments |
|---|
| 1111 | </th><td> file_id |
|---|
| 1112 | </td><td> int |
|---|
| 1113 | </td><td> Identifier of NeXus file |
|---|
| 1114 | </td></tr> |
|---|
| 1115 | <tr> |
|---|
| 1116 | <td> attr_name |
|---|
| 1117 | </td><td> string |
|---|
| 1118 | </td><td> Name of attribute |
|---|
| 1119 | </td></tr> |
|---|
| 1120 | <tr> |
|---|
| 1121 | <td> length |
|---|
| 1122 | </td><td> int |
|---|
| 1123 | </td><td> Length of buffer for storing attribute data |
|---|
| 1124 | </td></tr> |
|---|
| 1125 | <tr> |
|---|
| 1126 | <td> type |
|---|
| 1127 | </td><td> int or string |
|---|
| 1128 | </td><td> |
|---|
| 1129 | <dl><dt>Attribute Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 1130 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 1131 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 1132 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 1133 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 1134 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 1135 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 1136 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 1137 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 1138 | </dd></dl> |
|---|
| 1139 | </td></tr> |
|---|
| 1140 | <tr> |
|---|
| 1141 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Output Arguments |
|---|
| 1142 | </th><td> value |
|---|
| 1143 | </td><td> equivalent IDL data type of the NeXus data |
|---|
| 1144 | </td><td> Value of attribute |
|---|
| 1145 | </td></tr> |
|---|
| 1146 | <tr> |
|---|
| 1147 | <td> length |
|---|
| 1148 | </td><td> int |
|---|
| 1149 | </td><td> Actual length of attribute data |
|---|
| 1150 | </td></tr></tbody></table> |
|---|
| 1151 | <a name="NXputdata"></a><h3> NXputdata</h3> |
|---|
| 1152 | <p>Writes data into the specified data set. |
|---|
| 1153 | Datatype of the dataset and the IDL data type of the input data must be of equivalent data type. Refer to the chart: |
|---|
| 1154 | <a href="#Using The API And An Example">3.3 Using The API And An Example</a> |
|---|
| 1155 | |
|---|
| 1156 | </p> |
|---|
| 1157 | <dl><dt>Usage</dt><dd><pre>status = NXputdata (file_id, data[])</pre> |
|---|
| 1158 | </dd></dl> |
|---|
| 1159 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1160 | |
|---|
| 1161 | <tbody><tr> |
|---|
| 1162 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1163 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1164 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1165 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1166 | </th></tr> |
|---|
| 1167 | <tr> |
|---|
| 1168 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1169 | </th><td> status |
|---|
| 1170 | </td><td> int |
|---|
| 1171 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1172 | </td></tr> |
|---|
| 1173 | <tr> |
|---|
| 1174 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 1175 | </th><td> file_id |
|---|
| 1176 | </td><td> int |
|---|
| 1177 | </td><td> Identifier of NeXus file |
|---|
| 1178 | </td></tr> |
|---|
| 1179 | <tr> |
|---|
| 1180 | <td> data |
|---|
| 1181 | </td><td> equivalent IDL data type of the prepared NeXus data |
|---|
| 1182 | </td><td> Data values |
|---|
| 1183 | </td></tr></tbody></table> |
|---|
| 1184 | <a name="NXputslab"></a><h3> NXputslab</h3> |
|---|
| 1185 | <p>Writes a subset of a multidimensional data array, specified by the |
|---|
| 1186 | starting indices and size of each dimension, into the currently open |
|---|
| 1187 | dataset. |
|---|
| 1188 | <p> |
|---|
| 1189 | Datatype of the dataset and the IDL data type of the input data must be of equivalent data type. Refer to the chart: |
|---|
| 1190 | <a href="#Using The API And An Example">3.3 Using The API And An Example</a> |
|---|
| 1191 | </p> |
|---|
| 1192 | <p><b>NeXus IDL API NOTE: The data type for the slab start and slab size arrays must be type long in IDL. </b> </p> |
|---|
| 1193 | |
|---|
| 1194 | |
|---|
| 1195 | </p> |
|---|
| 1196 | <dl><dt>Usage</dt><dd><pre>status = NXputslab (file_id, data, start[], size[])</pre> |
|---|
| 1197 | </dd></dl> |
|---|
| 1198 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1199 | |
|---|
| 1200 | <tbody><tr> |
|---|
| 1201 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1202 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1203 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1204 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1205 | </th></tr> |
|---|
| 1206 | <tr> |
|---|
| 1207 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1208 | </th><td> status |
|---|
| 1209 | </td><td> int |
|---|
| 1210 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1211 | </td></tr> |
|---|
| 1212 | <tr> |
|---|
| 1213 | <th style="background-color: rgb(204, 204, 204);" rowspan="4"> Input Arguments |
|---|
| 1214 | </th><td> file_id |
|---|
| 1215 | </td><td> int |
|---|
| 1216 | </td><td> Identifier of NeXus file |
|---|
| 1217 | </td></tr> |
|---|
| 1218 | <tr> |
|---|
| 1219 | <td> data |
|---|
| 1220 | </td><td> equivalent IDL data type of the NeXus data |
|---|
| 1221 | </td><td> Data values |
|---|
| 1222 | </td></tr> |
|---|
| 1223 | <tr> |
|---|
| 1224 | <td> start[] |
|---|
| 1225 | </td><td> Array of IDL type Long |
|---|
| 1226 | </td><td> Indices of starting values in each dimension |
|---|
| 1227 | </td></tr> |
|---|
| 1228 | <tr> |
|---|
| 1229 | <td> size[] |
|---|
| 1230 | </td><td> Array of IDL type Long |
|---|
| 1231 | </td><td> Length of slab in each dimension |
|---|
| 1232 | </td></tr></tbody></table> |
|---|
| 1233 | <a name="NXputattr"></a><h3>NXputattr</h3> |
|---|
| 1234 | <p>Writes an attribute of the currently open data set. If no data set |
|---|
| 1235 | is open, a global attribute is generated. The attribute has both a name |
|---|
| 1236 | and a value. |
|---|
| 1237 | </p> |
|---|
| 1238 | <dl><dt>Usage</dt><dd><pre>status = NXputattr (file_id, attr_name, value, length, type)</pre> |
|---|
| 1239 | </dd></dl> |
|---|
| 1240 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1241 | |
|---|
| 1242 | <tbody><tr> |
|---|
| 1243 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1244 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1245 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1246 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1247 | </th></tr> |
|---|
| 1248 | <tr> |
|---|
| 1249 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1250 | </th><td> status |
|---|
| 1251 | </td><td> int |
|---|
| 1252 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1253 | </td></tr> |
|---|
| 1254 | <tr> |
|---|
| 1255 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1256 | </th><td> status |
|---|
| 1257 | </td><td> int |
|---|
| 1258 | </td><td> Error status |
|---|
| 1259 | </td></tr> |
|---|
| 1260 | <tr> |
|---|
| 1261 | <th style="background-color: rgb(204, 204, 204);" rowspan="5"> Input Arguments |
|---|
| 1262 | </th><td> file_id |
|---|
| 1263 | </td><td> int |
|---|
| 1264 | </td><td> Identifier of NeXus file |
|---|
| 1265 | </td></tr> |
|---|
| 1266 | <tr> |
|---|
| 1267 | <td> attr_name |
|---|
| 1268 | </td><td> string |
|---|
| 1269 | </td><td> Name of attribute |
|---|
| 1270 | </td></tr> |
|---|
| 1271 | <tr> |
|---|
| 1272 | <td> value |
|---|
| 1273 | </td><td> equivalent IDL data type of the prepared NeXus data |
|---|
| 1274 | </td><td> Value of attribute |
|---|
| 1275 | </td></tr> |
|---|
| 1276 | <tr> |
|---|
| 1277 | <td> length |
|---|
| 1278 | </td><td> int |
|---|
| 1279 | </td><td> Length of data |
|---|
| 1280 | </td></tr> |
|---|
| 1281 | <tr> |
|---|
| 1282 | <td> type |
|---|
| 1283 | </td><td> int or string |
|---|
| 1284 | </td><td> |
|---|
| 1285 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 1286 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 1287 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 1288 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 1289 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 1290 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 1291 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 1292 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 1293 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 1294 | </dd></dl> |
|---|
| 1295 | </td></tr></tbody></table> |
|---|
| 1296 | <a name="NXflush"></a><h3>NXflush</h3> |
|---|
| 1297 | <p>Flushes all data to the NeXus file. Since this command closes and |
|---|
| 1298 | reopens the file, a new file handle is returned. The command leaves the |
|---|
| 1299 | program in the same state, i.e. with the same group and/or data set |
|---|
| 1300 | open. |
|---|
| 1301 | </p> |
|---|
| 1302 | <dl><dt>Usage</dt><dd><pre>status = NXflush (file_id)</pre> |
|---|
| 1303 | </dd></dl> |
|---|
| 1304 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1305 | |
|---|
| 1306 | <tbody><tr> |
|---|
| 1307 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1308 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1309 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1310 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1311 | </th></tr> |
|---|
| 1312 | <tr> |
|---|
| 1313 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1314 | </th><td> status |
|---|
| 1315 | </td><td> int |
|---|
| 1316 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1317 | </td></tr> |
|---|
| 1318 | <tr> |
|---|
| 1319 | <th style="background-color: rgb(204, 204, 204);"> Input & Output Argument |
|---|
| 1320 | </th><td> file_id |
|---|
| 1321 | </td><td> int |
|---|
| 1322 | </td><td> Identifier of NeXus file |
|---|
| 1323 | </td></tr></tbody></table> |
|---|
| 1324 | <a name="Meta-Data_Routines"></a><h2> Meta-Data Routines</h2> |
|---|
| 1325 | <a name="NXgetinfo"></a><h3> NXgetinfo</h3> |
|---|
| 1326 | <p>Gets the rank, dimensions and data type of the currently open data set. |
|---|
| 1327 | </p> |
|---|
| 1328 | <dl><dt>Usage</dt><dd><pre>status = NXgetinfo (file_id, rank, dimensions[], data_type)</pre> |
|---|
| 1329 | </dd></dl> |
|---|
| 1330 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1331 | |
|---|
| 1332 | <tbody><tr> |
|---|
| 1333 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1334 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1335 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1336 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1337 | </th></tr> |
|---|
| 1338 | <tr> |
|---|
| 1339 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1340 | </th><td> status |
|---|
| 1341 | </td><td> int |
|---|
| 1342 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1343 | </td></tr> |
|---|
| 1344 | <tr> |
|---|
| 1345 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1346 | </th><td> file_id |
|---|
| 1347 | </td><td> int |
|---|
| 1348 | </td><td> Identifier of NeXus file |
|---|
| 1349 | </td></tr> |
|---|
| 1350 | <tr> |
|---|
| 1351 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Output Arguments |
|---|
| 1352 | </th><td> rank |
|---|
| 1353 | </td><td> int |
|---|
| 1354 | </td><td> Rank of data |
|---|
| 1355 | </td></tr> |
|---|
| 1356 | <tr> |
|---|
| 1357 | <td> dimensions |
|---|
| 1358 | </td><td> int[] |
|---|
| 1359 | </td><td> Dimensions of data |
|---|
| 1360 | </td></tr> |
|---|
| 1361 | <tr> |
|---|
| 1362 | <td> data_type |
|---|
| 1363 | </td><td> int |
|---|
| 1364 | </td><td> |
|---|
| 1365 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 1366 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 1367 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 1368 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 1369 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 1370 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 1371 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 1372 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 1373 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 1374 | </dd></dl> |
|---|
| 1375 | </td></tr></tbody></table> |
|---|
| 1376 | <a name="NXgetgroupinfo"></a><h3>NXgetgroupinfo</h3> |
|---|
| 1377 | <p>Returns the number of items in the current group, and the name and class of the current group. |
|---|
| 1378 | </p> |
|---|
| 1379 | <dl><dt>Usage</dt><dd><pre>status = NXgetgroupinfo (file_id, item_number, group_name, group_class)</pre> |
|---|
| 1380 | </dd></dl> |
|---|
| 1381 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1382 | |
|---|
| 1383 | <tbody><tr> |
|---|
| 1384 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1385 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1386 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1387 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1388 | </th></tr> |
|---|
| 1389 | <tr> |
|---|
| 1390 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1391 | </th><td> status |
|---|
| 1392 | </td><td> int |
|---|
| 1393 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1394 | </td></tr> |
|---|
| 1395 | <tr> |
|---|
| 1396 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1397 | </th><td> file_id |
|---|
| 1398 | </td><td> int |
|---|
| 1399 | </td><td> Identifier of NeXus file |
|---|
| 1400 | </td></tr> |
|---|
| 1401 | <tr> |
|---|
| 1402 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Output Arguments |
|---|
| 1403 | </th><td> item_number |
|---|
| 1404 | </td><td> int |
|---|
| 1405 | </td><td> Number of NeXus data items in the current group |
|---|
| 1406 | </td></tr> |
|---|
| 1407 | <tr> |
|---|
| 1408 | <td> group_name |
|---|
| 1409 | </td><td> string |
|---|
| 1410 | </td><td> Name of currently open NeXus group |
|---|
| 1411 | </td></tr> |
|---|
| 1412 | <tr> |
|---|
| 1413 | <td> group_class |
|---|
| 1414 | </td><td> string |
|---|
| 1415 | </td><td> Class of currently open NeXus group |
|---|
| 1416 | </td></tr></tbody></table> |
|---|
| 1417 | <a name="NXinitgroupdir"></a><h3> NXinitgroupdir</h3> |
|---|
| 1418 | <p>Initializes directory searches of the currently open group. This is |
|---|
| 1419 | required to reset searches using NXgetnextentry that may have been |
|---|
| 1420 | interrupted before completion. |
|---|
| 1421 | </p> |
|---|
| 1422 | <dl><dt>Usage</dt><dd><pre>status = NXinitgroupdir (file_id)</pre> |
|---|
| 1423 | </dd></dl> |
|---|
| 1424 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1425 | |
|---|
| 1426 | <tbody><tr> |
|---|
| 1427 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1428 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1429 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1430 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1431 | </th></tr> |
|---|
| 1432 | <tr> |
|---|
| 1433 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1434 | </th><td> status |
|---|
| 1435 | </td><td> int |
|---|
| 1436 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1437 | </td></tr> |
|---|
| 1438 | <tr> |
|---|
| 1439 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1440 | </th><td> file_id |
|---|
| 1441 | </td><td> int |
|---|
| 1442 | </td><td> Identifier of NeXus file |
|---|
| 1443 | </td></tr></tbody></table> |
|---|
| 1444 | <a name="NXgetnextentry"></a><h3> NXgetnextentry</h3> |
|---|
| 1445 | <p>Implements a directory search facility on the current group level. |
|---|
| 1446 | The first call initializes the search and returns information on the |
|---|
| 1447 | first data item in the list. Subsequent calls yield information about |
|---|
| 1448 | the remaining items. If the item is a group, its name and class is |
|---|
| 1449 | returned. If it is a data set, its name and type is returned with a |
|---|
| 1450 | class of "SDS." |
|---|
| 1451 | </p> |
|---|
| 1452 | <dl><dt>Usage</dt><dd><pre>status = NXgetnextentry (file_id, name, class, data_type)</pre> |
|---|
| 1453 | </dd></dl> |
|---|
| 1454 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1455 | |
|---|
| 1456 | <tbody><tr> |
|---|
| 1457 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1458 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1459 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1460 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1461 | </th></tr> |
|---|
| 1462 | <tr> |
|---|
| 1463 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1464 | </th><td> status |
|---|
| 1465 | </td><td> int |
|---|
| 1466 | </td><td> Error status (NX_OK, NX_ERROR, NX_EOD) |
|---|
| 1467 | </td></tr> |
|---|
| 1468 | <tr> |
|---|
| 1469 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1470 | </th><td> file_id |
|---|
| 1471 | </td><td> int |
|---|
| 1472 | </td><td> Identifier of NeXus file |
|---|
| 1473 | </td></tr> |
|---|
| 1474 | <tr> |
|---|
| 1475 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Output Arguments |
|---|
| 1476 | </th><td> name |
|---|
| 1477 | </td><td> string |
|---|
| 1478 | </td><td> Name of NeXus data item (group or set) |
|---|
| 1479 | </td></tr> |
|---|
| 1480 | <tr> |
|---|
| 1481 | <td> class |
|---|
| 1482 | </td><td> string |
|---|
| 1483 | </td><td> Class of NeXus group |
|---|
| 1484 | </td></tr> |
|---|
| 1485 | <tr> |
|---|
| 1486 | <td> data_type |
|---|
| 1487 | </td><td> int |
|---|
| 1488 | </td><td> |
|---|
| 1489 | <dl><dt>Data Type</dt><dd>NX_CHAR - Character string |
|---|
| 1490 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 1491 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 1492 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 1493 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 1494 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 1495 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 1496 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 1497 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 1498 | </dd></dl> |
|---|
| 1499 | </td></tr></tbody></table> |
|---|
| 1500 | <a name="NXgetattrinfo"></a><h3>NXgetattrinfo</h3> |
|---|
| 1501 | <p>Returns the number of attributes in the current data set. |
|---|
| 1502 | </p> |
|---|
| 1503 | <dl><dt>Usage</dt><dd><pre>status = NXgetattrinfo (file_id, attr_number)</pre> |
|---|
| 1504 | </dd></dl> |
|---|
| 1505 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1506 | |
|---|
| 1507 | <tbody><tr> |
|---|
| 1508 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1509 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1510 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1511 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1512 | </th></tr> |
|---|
| 1513 | <tr> |
|---|
| 1514 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1515 | </th><td> status |
|---|
| 1516 | </td><td> int |
|---|
| 1517 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1518 | </td></tr> |
|---|
| 1519 | <tr> |
|---|
| 1520 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1521 | </th><td> file_id |
|---|
| 1522 | </td><td> int |
|---|
| 1523 | </td><td> Identifier of NeXus file |
|---|
| 1524 | </td></tr> |
|---|
| 1525 | <tr> |
|---|
| 1526 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 1527 | </th><td> attr_number |
|---|
| 1528 | </td><td> int |
|---|
| 1529 | </td><td> Number of attributes in the current data set |
|---|
| 1530 | </td></tr></tbody></table> |
|---|
| 1531 | <a name="NXinitattrdir"></a><h3>NXinitattrdir</h3> |
|---|
| 1532 | <p>Initializes attribute searches of the currently open data set. This |
|---|
| 1533 | is required to reset searches using NXgetnextattr that may have been |
|---|
| 1534 | interrupted before completion. |
|---|
| 1535 | </p> |
|---|
| 1536 | <dl><dt>Usage</dt><dd><pre>status = NXinitattrdir (file_id)</pre> |
|---|
| 1537 | </dd></dl> |
|---|
| 1538 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1539 | |
|---|
| 1540 | <tbody><tr> |
|---|
| 1541 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1542 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1543 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1544 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1545 | </th></tr> |
|---|
| 1546 | <tr> |
|---|
| 1547 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1548 | </th><td> status |
|---|
| 1549 | </td><td> int |
|---|
| 1550 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1551 | </td></tr> |
|---|
| 1552 | <tr> |
|---|
| 1553 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1554 | </th><td> file_id |
|---|
| 1555 | </td><td> int |
|---|
| 1556 | </td><td> Identifier of NeXus file |
|---|
| 1557 | </td></tr></tbody></table> |
|---|
| 1558 | <a name="NXgetnextattr"></a><h3>NXgetnextattr</h3> |
|---|
| 1559 | <p>Implements a search facility of the attributes of the currently open |
|---|
| 1560 | data set. The first call initializes the search and returns information |
|---|
| 1561 | on the first attribute in the list. Subsequent calls yield information |
|---|
| 1562 | about the remaining attributes. This routine returns global attributes |
|---|
| 1563 | if no data set is open. |
|---|
| 1564 | </p> |
|---|
| 1565 | <dl><dt>Usage</dt><dd><pre>status = NXgetnextattr (file_id, attr_name, length, attr_type)</pre> |
|---|
| 1566 | </dd></dl> |
|---|
| 1567 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1568 | |
|---|
| 1569 | <tbody><tr> |
|---|
| 1570 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1571 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1572 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1573 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1574 | </th></tr> |
|---|
| 1575 | <tr> |
|---|
| 1576 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1577 | </th><td> status |
|---|
| 1578 | </td><td> int |
|---|
| 1579 | </td><td> Error status (NX_OK, NX_ERROR, NX_EOD) |
|---|
| 1580 | </td></tr> |
|---|
| 1581 | <tr> |
|---|
| 1582 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1583 | </th><td> file_id |
|---|
| 1584 | </td><td> int |
|---|
| 1585 | </td><td> Identifier of NeXus file |
|---|
| 1586 | </td></tr> |
|---|
| 1587 | <tr> |
|---|
| 1588 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Output Arguments |
|---|
| 1589 | </th><td> attr_name |
|---|
| 1590 | </td><td> string |
|---|
| 1591 | </td><td> Name of next attribute |
|---|
| 1592 | </td></tr> |
|---|
| 1593 | <tr> |
|---|
| 1594 | <td> length |
|---|
| 1595 | </td><td> int |
|---|
| 1596 | </td><td> Length of next attribute |
|---|
| 1597 | </td></tr> |
|---|
| 1598 | <tr> |
|---|
| 1599 | <td> attr_type |
|---|
| 1600 | </td><td> int |
|---|
| 1601 | </td><td> |
|---|
| 1602 | <dl><dt>Data type of next attribute</dt><dd>NX_CHAR - Character string |
|---|
| 1603 | </dd><dd>NX_FLOAT32 - 4-byte real |
|---|
| 1604 | </dd><dd>NX_FLOAT64 - 8-byte real |
|---|
| 1605 | </dd><dd>NX_INT8 - 1-byte integer |
|---|
| 1606 | </dd><dd>NX_UINT8 - unsigned 1-byte integer |
|---|
| 1607 | </dd><dd>NX_INT16 - 2-byte integer |
|---|
| 1608 | </dd><dd>NX_UINT16 - unsigned 2-byte integer |
|---|
| 1609 | </dd><dd>NX_INT32 - 4-byte integer |
|---|
| 1610 | </dd><dd>NX_UINT32 - unsigned 4-byte integer |
|---|
| 1611 | </dd></dl> |
|---|
| 1612 | </td></tr></tbody></table> |
|---|
| 1613 | <a name="NXgetgroupID"></a><h3>NXgetgroupID</h3> |
|---|
| 1614 | <p>Returns the identifier of the currently open group as an NXlink structure. |
|---|
| 1615 | </p> |
|---|
| 1616 | <dl><dt>Usage</dt><dd><pre>status = NXgetgroupID (file_id, group_id)</pre> |
|---|
| 1617 | </dd></dl> |
|---|
| 1618 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1619 | |
|---|
| 1620 | <tbody><tr> |
|---|
| 1621 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1622 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1623 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1624 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1625 | </th></tr> |
|---|
| 1626 | <tr> |
|---|
| 1627 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1628 | </th><td> status |
|---|
| 1629 | </td><td> int |
|---|
| 1630 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1631 | </td></tr> |
|---|
| 1632 | <tr> |
|---|
| 1633 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1634 | </th><td> file_id |
|---|
| 1635 | </td><td> int |
|---|
| 1636 | </td><td> Identifier of NeXus file |
|---|
| 1637 | </td></tr> |
|---|
| 1638 | <tr> |
|---|
| 1639 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 1640 | </th><td> group_id |
|---|
| 1641 | </td><td> int |
|---|
| 1642 | </td><td> Identifier of NeXus group |
|---|
| 1643 | </td></tr></tbody></table> |
|---|
| 1644 | <a name="NXgetdataID"></a><h3> NXgetdataID</h3> |
|---|
| 1645 | <p>Gets the identifier of the currently open data set as an NXlink structure. Returns NX_ERROR if there is no open data set. |
|---|
| 1646 | </p> |
|---|
| 1647 | <dl><dt>Usage</dt><dd><pre>status = NXgetdataID (file_id, data_id)</pre> |
|---|
| 1648 | </dd></dl> |
|---|
| 1649 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1650 | |
|---|
| 1651 | <tbody><tr> |
|---|
| 1652 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1653 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1654 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1655 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1656 | </th></tr> |
|---|
| 1657 | <tr> |
|---|
| 1658 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1659 | </th><td> status |
|---|
| 1660 | </td><td> int |
|---|
| 1661 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1662 | </td></tr> |
|---|
| 1663 | <tr> |
|---|
| 1664 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1665 | </th><td> file_id |
|---|
| 1666 | </td><td> int |
|---|
| 1667 | </td><td> Identifier of NeXus file |
|---|
| 1668 | </td></tr> |
|---|
| 1669 | <tr> |
|---|
| 1670 | <th style="background-color: rgb(204, 204, 204);"> Output Arguments |
|---|
| 1671 | </th><td> data_id |
|---|
| 1672 | </td><td> int |
|---|
| 1673 | </td><td> Identifier of NeXus data set |
|---|
| 1674 | </td></tr></tbody></table> |
|---|
| 1675 | <a name="NXmakelink"></a><h3> NXmakelink</h3> |
|---|
| 1676 | <p>Links a data item (group or set) to a NeXus group. Returns NX_ERROR |
|---|
| 1677 | if the current group level is the root level, since no data item can be |
|---|
| 1678 | linked here. |
|---|
| 1679 | </p> |
|---|
| 1680 | <dl><dt>Usage</dt><dd><pre>status = NXmakelink (file_id, link)</pre> |
|---|
| 1681 | </dd></dl> |
|---|
| 1682 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1683 | |
|---|
| 1684 | <tbody><tr> |
|---|
| 1685 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1686 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1687 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1688 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1689 | </th></tr> |
|---|
| 1690 | <tr> |
|---|
| 1691 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1692 | </th><td> status |
|---|
| 1693 | </td><td> int |
|---|
| 1694 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1695 | </td></tr> |
|---|
| 1696 | <tr> |
|---|
| 1697 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 1698 | </th><td> file_id |
|---|
| 1699 | </td><td> int |
|---|
| 1700 | </td><td> Identifier of NeXus file |
|---|
| 1701 | </td> </tr> |
|---|
| 1702 | <tr> |
|---|
| 1703 | |
|---|
| 1704 | <td>link |
|---|
| 1705 | </td><td> int |
|---|
| 1706 | </td><td> Identifier of linked group |
|---|
| 1707 | </td></tr> |
|---|
| 1708 | </tbody></table> |
|---|
| 1709 | |
|---|
| 1710 | |
|---|
| 1711 | <a name="NXmakelink"></a><h3> NXmakenamedlink</h3> |
|---|
| 1712 | <p>Links a data item (group or set) to a named NeXus group. Returns NX_ERROR |
|---|
| 1713 | if the current group level is the root level, since no data item can be |
|---|
| 1714 | linked here. |
|---|
| 1715 | </p> |
|---|
| 1716 | <dl><dt>Usage</dt><dd><pre>status = NXmakenamedlink (file_id, linkname, link)</pre> |
|---|
| 1717 | </dd></dl> |
|---|
| 1718 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1719 | |
|---|
| 1720 | <tbody><tr> |
|---|
| 1721 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1722 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1723 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1724 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1725 | </th></tr> |
|---|
| 1726 | <tr> |
|---|
| 1727 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1728 | </th><td> status |
|---|
| 1729 | </td><td> int |
|---|
| 1730 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1731 | </td></tr> |
|---|
| 1732 | <tr> |
|---|
| 1733 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 1734 | </th><td> file_id |
|---|
| 1735 | </td><td> int |
|---|
| 1736 | </td><td> Identifier of NeXus file |
|---|
| 1737 | </td> </tr> |
|---|
| 1738 | <tr> |
|---|
| 1739 | |
|---|
| 1740 | <td> linkname |
|---|
| 1741 | </td><td> string |
|---|
| 1742 | </td><td> Name of the link to be created |
|---|
| 1743 | </td> </tr> |
|---|
| 1744 | <tr> |
|---|
| 1745 | |
|---|
| 1746 | <td>link |
|---|
| 1747 | </td><td> int |
|---|
| 1748 | </td><td> Identifier of linked group |
|---|
| 1749 | </td></tr> |
|---|
| 1750 | </tbody></table> |
|---|
| 1751 | |
|---|
| 1752 | |
|---|
| 1753 | <a name="NXsameID"></a><h3> |
|---|
| 1754 | |
|---|
| 1755 | NXsameID</h3> |
|---|
| 1756 | <p>Tests if two data items are the same, i.e. one is linked to the other. |
|---|
| 1757 | </p> |
|---|
| 1758 | <dl><dt>Usage</dt><dd><pre>status = NXsameID (file_id, link1, link2)</pre> |
|---|
| 1759 | </dd></dl> |
|---|
| 1760 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1761 | |
|---|
| 1762 | <tbody><tr> |
|---|
| 1763 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1764 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1765 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1766 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1767 | </th></tr> |
|---|
| 1768 | <tr> |
|---|
| 1769 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1770 | </th><td> status |
|---|
| 1771 | </td><td> int |
|---|
| 1772 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1773 | </td></tr> |
|---|
| 1774 | <tr> |
|---|
| 1775 | <th style="background-color: rgb(204, 204, 204);" rowspan="3"> Input Arguments |
|---|
| 1776 | </th><td> file_id |
|---|
| 1777 | </td><td> int |
|---|
| 1778 | </td><td> Identifier of NeXus file |
|---|
| 1779 | </td></tr> |
|---|
| 1780 | <tr> |
|---|
| 1781 | <td> link1 |
|---|
| 1782 | </td><td> int |
|---|
| 1783 | </td><td> Identifier of first item |
|---|
| 1784 | </td></tr> |
|---|
| 1785 | <tr> |
|---|
| 1786 | <td> link2 |
|---|
| 1787 | </td><td> int |
|---|
| 1788 | </td><td> Indentifier of second item |
|---|
| 1789 | </td></tr> |
|---|
| 1790 | </tbody></table> |
|---|
| 1791 | <a name="NXopensourcegroup"></a><h3>NXopensourcegroup</h3> |
|---|
| 1792 | <p>Opens the group from which a linked dataset was linked. This is |
|---|
| 1793 | useful for accessing auxiliary information related to the dataset. This |
|---|
| 1794 | works only if the linked dataset is currently open. |
|---|
| 1795 | </p> |
|---|
| 1796 | <dl><dt>Usage</dt><dd><pre>status = NXopensourcegroup (file_id)</pre> |
|---|
| 1797 | </dd></dl> |
|---|
| 1798 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1799 | |
|---|
| 1800 | <tbody><tr> |
|---|
| 1801 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1802 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1803 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1804 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1805 | </th></tr> |
|---|
| 1806 | <tr> |
|---|
| 1807 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1808 | </th><td> status |
|---|
| 1809 | </td><td> int |
|---|
| 1810 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1811 | </td></tr> |
|---|
| 1812 | <tr> |
|---|
| 1813 | <th style="background-color: rgb(204, 204, 204);"> Input Arguments |
|---|
| 1814 | </th><td> file_id |
|---|
| 1815 | </td><td> int |
|---|
| 1816 | </td><td> Identifier of NeXus file |
|---|
| 1817 | </td></tr> |
|---|
| 1818 | </tbody></table> |
|---|
| 1819 | |
|---|
| 1820 | <a name="External_Linking"></a><h2> External Linking</h2> |
|---|
| 1821 | <a name="Nxinquirefile"></a><h3> Nxinquirefile</h3> |
|---|
| 1822 | <p>Queries which file is really active. |
|---|
| 1823 | </p> |
|---|
| 1824 | <dl><dt>Usage</dt><dd><pre>status = NXinquirefile(handle,filename, filenameLength);</pre> |
|---|
| 1825 | </dd></dl> |
|---|
| 1826 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1827 | |
|---|
| 1828 | <tbody><tr> |
|---|
| 1829 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1830 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1831 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1832 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1833 | </th></tr> |
|---|
| 1834 | <tr> |
|---|
| 1835 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1836 | </th><td> status |
|---|
| 1837 | </td><td> int |
|---|
| 1838 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1839 | </td></tr> |
|---|
| 1840 | <tr> |
|---|
| 1841 | <th style="background-color: rgb(204, 204, 204);" rowspan="2"> Input Arguments |
|---|
| 1842 | </th><td> handle |
|---|
| 1843 | </td><td> int |
|---|
| 1844 | </td><td> handle to a currently open NeXus file. |
|---|
| 1845 | </td></tr> |
|---|
| 1846 | <tr> |
|---|
| 1847 | <td> filenameLenght |
|---|
| 1848 | </td><td> int |
|---|
| 1849 | </td><td> length of filename buffer |
|---|
| 1850 | </td></tr> |
|---|
| 1851 | <tr> |
|---|
| 1852 | <th style="background-color: rgb(204, 204, 204);">Output Arguments |
|---|
| 1853 | </th><td> filename |
|---|
| 1854 | </td><td> string |
|---|
| 1855 | </td><td> buffer to receive filename |
|---|
| 1856 | </td></tr></tbody></table> |
|---|
| 1857 | <a name="NXlinkexternal"></a><h3> NXlinkexternal</h3> |
|---|
| 1858 | <p>Links an external file. This happens by creating a group which |
|---|
| 1859 | points to an external file. Navigating into such a group automatically |
|---|
| 1860 | opens the external file. |
|---|
| 1861 | </p> |
|---|
| 1862 | <dl><dt>Usage</dt><dd><pre>status = NXlinkexternal(handle,name, nxclass, nxurl);</pre> |
|---|
| 1863 | </dd></dl> |
|---|
| 1864 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1865 | |
|---|
| 1866 | <tbody><tr> |
|---|
| 1867 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1868 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1869 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1870 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1871 | </th></tr> |
|---|
| 1872 | <tr> |
|---|
| 1873 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1874 | </th><td> status |
|---|
| 1875 | </td><td> int |
|---|
| 1876 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1877 | </td></tr> |
|---|
| 1878 | <tr> |
|---|
| 1879 | <th style="background-color: rgb(204, 204, 204);" rowspan="4"> Input Arguments |
|---|
| 1880 | </th><td> handle |
|---|
| 1881 | </td><td> int |
|---|
| 1882 | </td><td> handle to a currently open NeXus file. |
|---|
| 1883 | </td></tr> |
|---|
| 1884 | <tr> |
|---|
| 1885 | <td> name |
|---|
| 1886 | </td><td> string (NXname) |
|---|
| 1887 | </td><td> The name of the group to link the file to. |
|---|
| 1888 | </td></tr> |
|---|
| 1889 | <tr> |
|---|
| 1890 | <td> nxclass |
|---|
| 1891 | </td><td> string (NXname) |
|---|
| 1892 | </td><td> The NeXus class of the group to which the external file is to be linked. |
|---|
| 1893 | </td></tr> |
|---|
| 1894 | <tr> |
|---|
| 1895 | <td> nxurl |
|---|
| 1896 | </td><td> string (NXURL) |
|---|
| 1897 | </td><td> An URL of a format which the NeXus-API understands. The only |
|---|
| 1898 | URL format so far is: nxfile://path-to-file#path-to-group-in-file. This |
|---|
| 1899 | consistes of two parts: The file path and a path to a group in the file |
|---|
| 1900 | which is to be mapped into the source file. |
|---|
| 1901 | </td></tr></tbody></table> |
|---|
| 1902 | <a name="NXisexternalgroup"></a><h3>NXisexternalgroup</h3> |
|---|
| 1903 | <p>Tests in the group is an external group. If not, NX_ERROR is |
|---|
| 1904 | returned. If yes, NX_OK is returned and the URL of the external file is |
|---|
| 1905 | copied into nxurl. |
|---|
| 1906 | </p> |
|---|
| 1907 | <dl><dt>Usage</dt><dd><pre>status = NXisexternalgroup(handle,name, nxclass, nxurl,nxurllen);</pre> |
|---|
| 1908 | </dd></dl> |
|---|
| 1909 | <table style="border: 1px solid navy; margin: 5px; padding: 2px; border-collapse: collapse; background-color: rgb(238, 238, 238); vertical-align: top;" align="center" border="1" cellpadding="2" cellspacing="2" width="90%"> |
|---|
| 1910 | |
|---|
| 1911 | <tbody><tr> |
|---|
| 1912 | <th style="background-color: rgb(204, 204, 204);" width="20%"> |
|---|
| 1913 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Name |
|---|
| 1914 | </th><th style="background-color: rgb(204, 204, 204);" width="15%">Type |
|---|
| 1915 | </th><th style="background-color: rgb(204, 204, 204);" width="50%">Description |
|---|
| 1916 | </th></tr> |
|---|
| 1917 | <tr> |
|---|
| 1918 | <th style="background-color: rgb(204, 204, 204);"> Return Value |
|---|
| 1919 | </th><td> status |
|---|
| 1920 | </td><td> int |
|---|
| 1921 | </td><td> Error status (NX_OK, NX_ERROR) |
|---|
| 1922 | </td></tr> |
|---|
| 1923 | <tr> |
|---|
| 1924 | <th style="background-color: rgb(204, 204, 204);" rowspan="4"> Input Arguments |
|---|
| 1925 | </th><td> handle |
|---|
| 1926 | </td><td> int |
|---|
| 1927 | </td><td> handle to a currently open NeXus file. |
|---|
| 1928 | </td></tr> |
|---|
| 1929 | <tr> |
|---|
| 1930 | <td> name |
|---|
| 1931 | </td><td> string (NXname) |
|---|
| 1932 | </td><td> The name of the group to test. |
|---|
| 1933 | </td></tr> |
|---|
| 1934 | <tr> |
|---|
| 1935 | <td> nxclass |
|---|
| 1936 | </td><td> string (NXname) |
|---|
| 1937 | </td><td> The NeXus class of the group to test. |
|---|
| 1938 | </td></tr> |
|---|
| 1939 | <tr> |
|---|
| 1940 | <td> nxurllen |
|---|
| 1941 | </td><td> int |
|---|
| 1942 | </td><td> length of the nxurl buffer |
|---|
| 1943 | </td></tr> |
|---|
| 1944 | <tr> |
|---|
| 1945 | <th style="background-color: rgb(204, 204, 204);" rowspan="4"> Output Arguments |
|---|
| 1946 | </th><td> nxurl |
|---|
| 1947 | </td><td> string |
|---|
| 1948 | </td><td> buffer to copy the URL, too. |
|---|
| 1949 | </td></tr></tbody></table> |
|---|
| 1950 | |
|---|
| 1951 | <!-- Served by shadow.nd.rl.ac.uk in 1.611 secs. --></body></html> |
|---|