Closed SGParsons closed 6 years ago
I cannot replicate this problem. My code reads in the log file you attach with no problem. The line it fails on is:
hlog[cnam] = np.array(hlog[cnam], dtype=dtypes[cnam])
which is invoking a numpy method. What version of numpy are you using? ('pydoc numpy.version'). I am using 1.13.3. I don't know why this would matter at all, but it is the only thing I can think of.
Numpy version 1.14.5
just replicated the problem with numpy 1.14.5. So it's either a numpy bug or a feature ... will look into it
Phew! With help from someone on stack overflow I have managed to fix this for both versions of numpy. Have pushed the fix to github. Closing this.
Reducing some ULTRACAM data with the pipeline. While the reduction itself runs fine, when I try to access the log file either using plog or within python using hipercam.hlog.Hlog.from_ascii I get the following error message:
Traceback (most recent call last): File "/usr/local/python3_modules/bin/plog", line 11, in
sys.exit(plog())
File "/usr/local/lib/python3.5/dist-packages/hipercam/scripts/plog.py", line 142, in plog
hlog = hcam.hlog.Hlog.from_ascii(log)
File "/usr/local/lib/python3.5/dist-packages/hipercam/hlog.py", line 141, in from_ascii
hlog[cnam] = np.array(hlog[cnam], dtype=dtypes[cnam])
ValueError: invalid literal for int() with base 10: b'\x01\x00\x00\x00\xfc\x9ay\xd1\xa2\xec@\x01L7\xa933s@\x00\x00\x80\xbf\x04\xf6\x13D\x00\x00\x80\xbf\xfe\xd4\xb0B\x00\x00\x80\xbf\x00\x00\x00\x00\x00\x00\x80\xbf\x00\x00\x00\x00\x00\x00\x80\xbf33!Bff
This has happened for multiple log files. I've attached one of these
run011.log