The warning is triggered by the next line

```
        self.lines.sort('wavelength', inplace=True)
```