pyahmed / PyCORN

A script to extract data from ÄKTA/UNICORN result-files (.res)
46 stars 25 forks source link

Added an additional example script to convert .res to .png #21

Closed aretasg closed 5 years ago

aretasg commented 5 years ago

res_to_png.py allows to easily convert .res to .png with no argument usage. It is also perfect if you wish to bundle the script using PyInstaller and distribute it to people not familiar with the terminal. When executed, it simply converts all .res files in the same directory as the script.

pyahmed commented 5 years ago

Hi - thanks for the contribution. The way this is currently written it completely duplicates the pycorn class within your script, completely defeating the purpose of having it as a module/lib that can be imported. Any updates to those classes would need to be replicated within your script. It would be much better if you create a script that imports the necessary classes and then does the plotting on its own.

aretasg commented 5 years ago

Hi. I apologise for a late response. My goal was to create a script that can be bundled up using PyInstaller for easy distribution for colleagues not familiar with CLI. Initially, I had some issue with importing pycorn and that is why instead of importing I duplicated the classes on the script itself. I realise it was not an elegant solution but it did work. Nevertheless, I have updated the script according to your suggestion. If you don't mind this pull request can be closed and I will open another one?