arnaudon / netSALT

Simulation of lasing networks with quantum graphs and SALT theory.
https://arnaudon.github.io/netSALT/
GNU General Public License v3.0
5 stars 1 forks source link

IndexError in PlotScanWithModeTrajectories #25

Open razimantv opened 1 year ago

razimantv commented 1 year ago

https://github.com/arnaudon/netSALT/blob/60431f0786526fbb8c27f89aadb94ba98c869897/netsalt/plotting.py#L395

I am getting an IndexError at this line.

ERROR: [pid 331978] Worker Worker(salt=5753432277, workers=1, host=chillisauce4, username=razimantv, pid=331978) failed    PlotScanWithModeTrajectories(lasing_modes_id=null, plot_path=figures/mode_trajectories.pdf)
Traceback (most recent call last):
  File "/home/razimantv/Software/venv/netSALT/lib/python3.11/site-packages/luigi/worker.py", line 203, in run
    new_deps = self._run_get_new_deps()
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/razimantv/Software/venv/netSALT/lib/python3.11/site-packages/luigi/worker.py", line 138, in _run_get_new_deps
    task_gen = self.task.run()
               ^^^^^^^^^^^^^^^
  File "/media/data/Documents/Code/netSALT/netsalt/tasks/analysis.py", line 192, in run
    plot_scan(qg, qualities, modes_df, relax_upper=True)
  File "/media/data/Documents/Code/netSALT/netsalt/plotting.py", line 255, in plot_scan
    plot_pump_traj(modes_df, with_scatter=with_scatter, with_approx=with_approx, ax=ax)
  File "/media/data/Documents/Code/netSALT/netsalt/plotting.py", line 395, in plot_pump_traj
    vmax = c[max(np.argmin(abs(np.imag(pumped_modes)), axis=1)) + 1]
           ~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
INFO: Informed scheduler that task   PlotScanWithModeTrajectories_null_figures_mode_tra_2a0d3c4d61   has status   FAILED

What files would you like to diagnose?

razimantv commented 1 year ago

After tinkering around a bit, I think the +1 at the end is not necessary. Is that correct?

arnaudon commented 1 year ago

probably yes, I don't quite remember this haha