Better Scenario class#32
Conversation
|
|
||
| @staticmethod | ||
| def from_txt_file(filename: str, old_format=False) -> "Scenario": | ||
| if old_format: |
There was a problem hiding this comment.
hopefully this will become obsolete when we expand to new users
kaelyndunnell
left a comment
There was a problem hiding this comment.
Looks amazing, thank you so much Remi. Was thinking about the adjustability for RISP and it's seems easy from our end with the caveat that the user has RISP data files for each timestep...but that's already outside the scope. Maybe can think about this more in depth down the line if we decide to expand the package to include taking data directly from certain plasma codes, converting them to .txt files, and going from there...
I think this See |
This PR extends the current
Scenarioclass so that users can create a scenario from python instead of having to write a txt file by hand.Features:
This will make testing much easier and give more flexibility to run different cases.
Example usage
This will produce the following txt file:
It is also possible to read a scenario from a txt file:
Afraid of backwards compatibility with this horrible txt format? I got you covered: