NelisW / pyradi

a Python toolkit to perform optical and infrared computational radiometry
http://nelisw.github.io/pyradi-docs/_build/html/index.html
MIT License
58 stars 34 forks source link

Conversion ptw file in ASCII file #26

Open Andrea99-beep opened 7 months ago

Andrea99-beep commented 7 months ago

Hi, I'm new in this technology and I am curious if this repository offers the possibility to convert a ptw file in an ASCII file.

Thank you in advance Andrea

NelisW commented 7 months ago

Hi Andrea, unfortunately there is no easy way to convert the file to ASCII. You could also be more precise, there are at least two different objectives : (1) convert the file as a whole with no regard for content or meaning - this could be done by using a mime tool to covert it to mime type (Google 'mime to convert file to ascii code'). (2) convert the images and meta data from binary format to ASCII, maintaining the meaning of the data. This you would have to do yourself. The code in pyradi can be used to read and parse the file into the different data items, which you can then write the code to convert to ASCII. Python numpy has a function to export binary arrays to text. Google 'python numpy array export to ascii'

Good luck with your project!