propagation fix
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "scgenerator"
|
name = "scgenerator"
|
||||||
version = "0.3.15"
|
version = "0.3.16"
|
||||||
description = "Simulate nonlinear pulse propagation in optical fibers"
|
description = "Simulate nonlinear pulse propagation in optical fibers"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "Benoit Sierro", email = "benoit.sierro@iap.unibe.ch" }]
|
authors = [{ name = "Benoit Sierro", email = "benoit.sierro@iap.unibe.ch" }]
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ class Propagation(Generic[ParamsOrNone]):
|
|||||||
def _warn_negative_index(self, index: int | None):
|
def _warn_negative_index(self, index: int | None):
|
||||||
if (index is not None and index >= 0) or self.parameters is None:
|
if (index is not None and index >= 0) or self.parameters is None:
|
||||||
return
|
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")
|
warnings.warn(f"attempting to access index {index} on an incomplete propagation obj")
|
||||||
|
|
||||||
def load_all(self) -> Spectrum:
|
def load_all(self) -> Spectrum:
|
||||||
|
|||||||
Reference in New Issue
Block a user