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 plotting #17

Open razimantv opened 2 years ago

razimantv commented 2 years ago

https://github.com/arnaudon/netSALT/blob/379b503479e9c41917a603989e95b89f45f55374/netsalt/plotting.py#L395

This line is causing an error sometimes:

ERROR: [pid 2099207] Worker Worker(salt=744350808, workers=1, host=chillisauce, username=razimantv, pid=2099207) failed    PlotScanWithModeTrajectories(lasing_modes_id=null, plot_path=figures/mode_trajectories.pd
f)                                                                                                                                                                                                                  
Traceback (most recent call last):                                                                                                                                                                                  
  File "/media/data/Software/venv/netSALT/lib/python3.10/site-packages/luigi/worker.py", line 191, in run                                                                                                           
    new_deps = self._run_get_new_deps()                                                                                                                                                                             
  File "/media/data/Software/venv/netSALT/lib/python3.10/site-packages/luigi/worker.py", line 133, in _run_get_new_deps                                                                                             
    task_gen = self.task.run()                                                                                                                                                                                      
  File "/media/data/Backups/ICL/Documents/Code/netSALT/netsalt/tasks/analysis.py", line 192, in run                                                                                                                 
    plot_scan(qg, qualities, modes_df, relax_upper=True)                                                                                                                                                            
  File "/media/data/Backups/ICL/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/Backups/ICL/Documents/Code/netSALT/netsalt/plotting.py", line 396, 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                                                 
arnaudon commented 2 years ago

could you pm me an example to reproduce? thanks!