Open catrionamurray opened 2 years ago
I get this issue for this file also when slicing the rainbow!
Strongly suspect this is an issue with sorting:
The wavelengths were in reverse order and this issue disappears if I correctly order them in the reader before importing into Rainbow
Very weird! I think this must be something with the arrays loaded out of the h5
still referencing the same underlying arrays, which can then be modified inside the Rainbow
. I'll take a look at the basic initialization from arrays method to check. In other contexts, I've had luck just multiplying every array by 1, so that the thing that gets stored internally is the result of a calculation, rather than a link to some mutable object somewhere else. I confess I still don't totally understand this perfectly, but hopefully it's a kludge that will work well enough.
OK, I updated _initialize_from_arrays
and _initialize_from_dictionaries
to (hopefully?) decouple the input arrays from the internal ones. I just pushed this to develop
, so pulling down the most recent might (hopefully?) fix the problem?
@catrionamurray , when you get a chance, can you please confirm that the updates I made to this in early August actually fix the problem with Adina's hdf5 file?
Hi Zach, I'm afraid I still have the same issue with v0.3.14!
Blerg. OK. Let's try to figure this out tomorrow!
For some reason when I create a Rainbow object with numpy arrays the original arrays are changed and have a strange double-transit feature? Some issue with sorting perhaps?