IMCtermite
IMCtermite copied to clipboard
README.md incorrect
Hi, it looks like you do not support the imc BUS format. Instead it is the imc2 DATA format. The extension .raw is almost the same as .dat with 2 limitations: 1: only one channel is allowed 2: only the type integer is supported
Are you aware that the imc2 DATA format is well documented?: https://files.imc-tm.de/index.php/s/H4XNbKFZHTwRRMw chapter 5 imc Data format
Thanks for the link ! Currently we have no resources to look into this. I'll put a warning into the readme. Of course if you want to fix this properly you are welcome to make a PR :-)
@TallDaikon Do you happen to have any samples of the actual imc BUS format at hand that you are able to share? Instead of correcting the README I might as well generalize the decoding to properly support the imc BUS format...
Using IMCtermite to read in python channels from a raw file measured by IMC Cronos, I'm getting a JSONDecodeError. I am not sure if it is the same issue @TallDaikon mentioned. Unfortunately I'm not deep enough into decoding to contribute by myself. But I could provide a test dataset.
---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
Input In [18], in <cell line: 1>()
----> 1 data = raw.get_channels(True)
File IMCtermite.pyx:25, in IMCtermite.imctermite.get_channels()
File ~\.conda\envs\myAnaconda\lib\json\__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
341 s = s.decode(detect_encoding(s), 'surrogatepass')
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder
File ~\.conda\envs\myAnaconda\lib\json\decoder.py:337, in JSONDecoder.decode(self, s, _w)
332 def decode(self, s, _w=WHITESPACE.match):
333 """Return the Python representation of ``s`` (a ``str`` instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
File ~\.conda\envs\myAnaconda\lib\json\decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 400 (char 399)
@dominikdh Judging from the error logs you provided, the problem is probably unrelated to the current imc2 DATA vs. imc BUS format issue. So please open a separate issue for your JSONDecode Error. If you are able to share the test data set, I'm happy to have a look at it...
@dominikdh Judging from the error logs you provided, the problem is probably unrelated to the current imc2 DATA vs. imc BUS format issue. So please open a separate issue for your JSONDecode Error. If you are able to share the test data set, I'm happy to have a look at it...
Thank you, and sorry for not replying earlier... I created a separate issue.