Skip to content

Single-channel EDFA causes IndexError in Edfa.interpol_params #559

@EstherLerouzic

Description

@EstherLerouzic

from #545

Observed:
In elements.py, class Edfa, method interpol_params assumes at least two channels and computes slot width as:

self.slot_width = self.channel_freq[1] - self.channel_freq[0]
With a single channel (len(self.channel_freq) == 1), accessing self.channel_freq[1] raises IndexError.

Expected:
GNPy should support single-channel operation (common in testing/provisioning) or at minimum raise a clear error with guidance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions