dschick / pyEvalData

Python module to read and evaluate experimental data
https://pyevaldata.readthedocs.io
MIT License
7 stars 6 forks source link

NX_MEMORY to smal for file #48

Closed amolodts closed 2 years ago

amolodts commented 2 years ago

pyEvalData.io.SardanaNeXus fails to read in a 4GB file.

NeXusError: Use slabs to access data larger than NX_MEMORY=2000 MB

amolodts commented 2 years ago

Reason: If the NeXus data is contained in a file and the size of the NXfield array is too large to be stored in memory, the value is not read in until this attribute is directly accessed. Even then, if there is insufficient memory, a value of None will be returned. In this case, the NXfield array should be read as a series of smaller slabs using ‘get’.

Solution: from nexusformat.nexus import * tree.nxgetmemory() tree.nxsetmemory(8000)

See Documentation