Draft: Added support for plotting result from many simulations. Solves #209
Open
Draft: Added support for plotting result from many simulations. Solves #209
MultiSimPlot
into
master
4 unresolved threads
4 unresolved threads
Merge request reports
Activity
62 64 self.setWindowTitle(title) 63 65 self._auto_redraw = False 64 66 67 ########### Flattening sim_result, if it is a list of results ####### 68 # take: sim_result (possibly on form ['name1', simres1, 'name2', simres2, ...] 69 # generate: sim_result (dict) 70 if type(sim_result) == Simulation: changed this line in version 2 of the diff
62 64 self.setWindowTitle(title) 63 65 self._auto_redraw = False 64 66 67 ########### Flattening sim_result, if it is a list of results ####### 68 # take: sim_result (possibly on form ['name1', simres1, 'name2', simres2, ...] 69 # generate: sim_result (dict) 70 if type(sim_result) == Simulation: 71 sim_result = sim_result._results 72 assert type(sim_result) == dict, TypeError( 73 "Parsing sim_result as a Simulation, but the _result seems broken." 74 ) 75 elif type(sim_result) == list: changed this line in version 2 of the diff
added 1 commit
- 53e8fd7a - plot_window: changed type(obj)==xxx to isinstance(obj, xxx)
added 1 commit
- 9475ae93 - PlotWindow: Added `add_result(...)`. Refactored slightly
added 1 commit
- eba4e307 - PlotWindow: Added `add_result(...)`. Refactored slightly
276 ix = 0 277 self._auto_redraw = False 278 for key, res in result.items(): 279 key2 = name + "." + key 280 ischecked = Qt.CheckState.Unchecked 281 if re.fullmatch(r"[0-9]+", key): 282 key2 = name + '.out' + key 283 ischecked = Qt.CheckState.Checked 284 285 if len(res) <= 100: 286 fmt = markers[ix] + '-' 287 ix = (ix + 1) % len(markers) 288 else: 289 fmt = '-' 290 291 def addline(key, vector, checked): changed this line in version 5 of the diff
246 367 247 368 def start_simulation_dialog( 248 369 sim_results: Dict[str, List[complex]], sfg_name: Optional[str] = None 370 ): 371 """Deprecated. Use `show_simulation_result` instead.""" This will add a deprecation notice in the docs and link to the correct function. (Although we may just drop it as well, considering the status of the project, not having official releases etc. But maybe wait with that until after the lab series though...)
changed this line in version 5 of the diff
added 1 commit
- a2b3fa86 - plot_window: Updated Oscars suggestions, and some more.
Please register or sign in to reply