jlingema / uGMTScripts

Script collection for upgraded GMT
1 stars 4 forks source link

Scripts to dump and analyze spy buffer contents #56

Closed dinyar closed 8 years ago

dinyar commented 8 years ago

Contains two scripts to create and then analyze the contents of our spy buffers along with some modifications to the muon_helpers module that allow it to convert output muons to decimal values. The two scripts can work in tandem (i.e. the files dumped by read_counters.py can be used by spy_buffer_parser.py without manual modifications). This pull request closes #55.

jlingema commented 8 years ago

Hi,

Looks fine to me...

But there is already a unsigned->signed function without bitstrings in bithelpers: https://github.com/jlingema/uGMTScripts/blob/master/tools/bithelper.py#L5

jlingema commented 8 years ago

Some additional minor comments: https://github.com/jlingema/uGMTScripts/pull/56/files#diff-5fc558f73e20b573a26f263083caf182R19 could be replaced with

with open(fname, 'w') as f:
    print(..)

Also: https://github.com/jlingema/uGMTScripts/pull/56/files#diff-9174b3be5928417746f3e93a86601f17R1 Since you made the script executable, it should technically have a "main" I think..

Also concerning the general read functionality, there are already some scripts with potential overlap in: https://github.com/jlingema/uGMTScripts/tree/master/lut_tests/read_write_tools

dinyar commented 8 years ago

Hi Joschka,

thanks for the feedback. I changed the file writing and added the main function. I had noticed the read functionality in inspect.py (and shamelessly stole from there.. ), however the Inspector class returned information largely via print statements and furthermore adds a lot of information not required for my use case. I didn't want to change it though as I know there are some (hacky) bash scripts at p5 that use it which I didn't want to break..