propagation fix

This commit is contained in:
Benoît Sierro
2023-10-04 09:53:24 +02:00
parent 27de20e6ca
commit 6d806cdfcf
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "scgenerator"
version = "0.3.15"
version = "0.3.16"
description = "Simulate nonlinear pulse propagation in optical fibers"
readme = "README.md"
authors = [{ name = "Benoit Sierro", email = "benoit.sierro@iap.unibe.ch" }]

View File

@@ -253,7 +253,7 @@ class Propagation(Generic[ParamsOrNone]):
def _warn_negative_index(self, index: int | None):
if (index is not None and index >= 0) or self.parameters is None:
return
if self._current_index < len(self.z_positions):
if self._current_index < self.parameters.z_num:
warnings.warn(f"attempting to access index {index} on an incomplete propagation obj")
def load_all(self) -> Spectrum: