read_horiba function may return bad raman shifts (as string)
charlesll opened this issue · 3 comments
charlesll commented
We need to change in the function:
lambdas=df.columns.values[2:]
to
lambdas=df.columns.values[2:].values
For now, a quick fix is to add the line
my_map.w = my_map.w.astype(float)
after generating your map object.
KacperGrodecki commented
You mean you wont to change lambdas from string to float right? I think it needs casting on float in this line:
lambdas=df.columns.values[2:]
As I remember pandas is on numpy and thus while generating .values we generate numpy- maybe of strings. Isn't it easier to perform:
lambdas=float(df.columns.values[2:])
However I'm not sure it it will generate array or not.
charlesll commented
I will have a look, but maybe the safest option is
lambdas = df.columns.values[2:].values.astype(float)
charlesll commented
Corrected in v0.4.8, closing.