fujiisoup / sif_parser

A small package to read Andor Technology Multi-Channel files.
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

Load spooling binary files #22

Closed rjlopez2 closed 11 months ago

rjlopez2 commented 1 year ago

This is a very basic implementation to read binary data and metadata from the directory created with the spooling function with Andor Solis software.

The function takes as argument a directory and assert that the expected files (sifx, dat, *.ini) are present. The argument ignore_missing assert only if the number of frames expected from the metadata equals the number of binary files in the input directory. No check for corrupted binary files has been implemented (but would be nice to add). No formal suite test has been implemented (I am not sure how to do them). The function return a numpy array and the metadata just as the np_open does.

This is mostly proof of concept.

Reviews/advice are super welcome

Cheers

fujiisoup commented 1 year ago

Now I realized tests are failing due to a deprecation in numpy. I will fix it soon.

You can run the test with pytest testings/test_open.py

fujiisoup commented 1 year ago

Now you can merge the master again to reflect the small change. (see #23)

rjlopez2 commented 1 year ago

Thanks for the comments/ feedback

I am working on designing the test and get/add some data for that as well.

This may take a little bit but some ideas I have are:

Any other ideas?

cheers

fujiisoup commented 1 year ago

Thank you. We don't need to be complete from the beginning. Tests for your actual use cases would be already good to us. If we faced a problem, let's fix the problem at that point.

rjlopez2 commented 11 months ago

Hey @fujiisoup Sorry it took me a bit to long to get back to this. If you have some time, please review the changes. I have added some documentation and remove from now support for the 'Mono12Packed' data type. I tested locally and all test seem to be ok.

fujiisoup commented 11 months ago

Thank you, @rjlopez2, for your hard work. I have started spool acquisition, and actually this PR is helpful. Merging

rjlopez2 commented 11 months ago

Thanks, appreciate your words . This is my real first contribution to open source and I learning a lot by using and working on this package. Thank you as well for your guidance when I was feeling lost. Cheers