Update vamas.py for floating coordinate in MAP file#2
Conversation
Some MAP VAMAS file in XPS give coordinate in a floating format (example: -2.156)
when you read the file you get a string like '-2.156\n' which cause a fault when using int()
I propose to use int(float('-2.156\n')) to get the int value of the coordinate
|
Thanks for reporting this. Unfortunately, I could never test MAP files. |
Sorry, didn't see you question. Back to use this library, I don't know exactly what to answer. My case was a user with a MAP file with only one spectra. Maybe I should ask for an image to test the result of the data extraction on real MAP file. |
|
In general, it would be nice if we would have a bit more files, ideally from different machines of which we know the parameters that were set. Then we could write more tests to catch edge cases like this one. Personally, I just have access to one AES and one XPS. |
Some MAP VAMAS file in XPS give coordinate in a floating format (example: -2.156) when you read the file you get a string like '-2.156\n' which cause a fault when using int() I propose to use int(float('-2.156\n')) to get the int value of the coordinate