stuart-cls / python-agilent-file-formats

Python library for reading FT-IR imaging datasets created by Resolutions Pro on Agilent Cary instruments with FPA area detectors.
MIT License
3 stars 1 forks source link

BSP files #4

Open borondics opened 6 months ago

borondics commented 6 months ago

Apparently the BSP files belong to the Microsoft standard OLE2 files. There are modules like olefile in python that handles them. This was discovered by a colleague of @raul-freitas. The found the saved image in there by looking for the jpeg header (or similar). I think we could cross-check these and add them to this reader!

stuart-cls commented 6 months ago

Thanks @borondics! I always thought it must be some serialization standard but I couldn't identify which one.

Did they publish this code anywhere we could use?

stuart-cls commented 6 months ago

I tried with olefile a bit, it doesn't seem to help with parsing the data stream (inside the OLE2 container) at all. Perhaps there is another tool.

This module currently does a lot of sniffing around as you describe so should be possible to at least extract the saved image.

bbmt commented 1 month ago

Hi @stuart-cls. I was revisiting the issue of opening BSP files and ended up here in your repository. Out of curiosity, I opened the issue tab and found this conversation. I'm the guy Ferenc referred to. Feel free to use the code at: https://github.com/bbmt/BSP_Reader. There are jupyter notebooks, as we chose to be more friendly for people who don't want or know how to install an entire python environment.

stuart-cls commented 2 weeks ago

Thanks! I will take a look.