I have a set of nd2 files that I can’t read with either pims_nd2 or nd2reader. I have shared an example file here (warning: it’s 36GB). If I read a single frame in random-access, it works fine. But if I try to read a bunch of frames in sequence, it fails. With pims_nd2, I get a LIM_ERR_FAIL error. With nd2reader, I get a “ValueError: the file seems to be corrupted” error.
I’ve made a test Python script in this gist, shared also with the tracebacks I get from both libraries. Run
python test_nd2.py --help for usage info. The program creates a dask array (lazy numpy array) from the file based on this code from dask_image, but any sequential access to the frames fails.
I presume there will not be a short term fix to this, but I wanted to provide the file as an example for the aforementioned libraries.
I’ll also note that I could find the metadata for “channel name” and “channel colour” in pims_nd2, but not in nd2reader…