tlambert03 / nd2

Full-featured nd2 (Nikon NIS Elements) file reader for python. Outputs to numpy, dask, and xarray. Exhaustive metadata extraction
https://tlambert03.github.io/nd2
BSD 3-Clause "New" or "Revised" License
53 stars 15 forks source link

Update _ome.py #221

Closed rysk-t closed 5 months ago

rysk-t commented 5 months ago

This change is for custom-date format like "%Y/%m/%d %H:%M:%S" (our nd2 files include such kinds of date format representing the acquisition date). This change might be for minor language user.

codspeed-hq[bot] commented 5 months ago

CodSpeed Performance Report

Merging #221 will not alter performance

Comparing rysk-t:main (7017236) with main (706fe8d)

Summary

✅ 13 untouched benchmarks

tlambert03 commented 5 months ago

thanks @rysk-t. can you give me a literal string example of the type of date you have in your file? I might actually upstream the fix to ome-types. but in the meantime, you also need to import datetime here for tests to pass

tlambert03 commented 5 months ago

found a better solution for extracting datetime in #226

rysk-t commented 5 months ago

Thanks for your reply, and sorry for my lazy PR. The example acquisiton-date string of our system is "2023/06/13 15:03:43". I believe this string style is unique to the Japanese system. However, considering that the developer of the nd2 file (Nikon) is a Japanese company, the influence is not so small.

tlambert03 commented 5 months ago

Thanks!

Actually nd2 is made by a small Czech company! https://www.lim.cz (Contracted by Nikon of course)

They've been very helpful in general. I've got a better locale-independent source for the timestamp now, just dealing with some final issues with certain dates on windows. Will release a fix soon. Thanks again for your pr