new: support for negative prop index
This commit is contained in:
@@ -157,6 +157,8 @@ class Propagation:
|
||||
return self._load_slice(key)
|
||||
if isinstance(key, (float, np.floating)):
|
||||
key = math.argclosest(self.parameters.compute("z_targets"), key)
|
||||
elif key < 0:
|
||||
key = len(self) + key
|
||||
array = self.io.load_spectrum(key)
|
||||
return Spectrum(array, self.parameters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user