RocketPy
RocketPy copied to clipboard
ENH: Add Monte Carlo outputs export to CSV/JSON (#242)
Pull request type
- [x] Code changes (bugfix, features)
Checklist
-
[x] Implement export functionality for
.csv. -
[x] Implement export functionality for
.json. -
[x] Ensure that
export_listand customdata_collectorvariables are included in the export. -
[x] Add unit tests in
tests/ensuring the files are created and contain correct data. -
[x] Update the documentation to include examples of how to export data.
Current behavior
Currently the MonteCarlo class saves the simulation results into .outputs.txt files. There is no method that allowa users to export these results into .csv or .json files. See issue #242.
New behavior
Implements the export_results method in the MonteCarlo class. This method reads the data from .outputs.txt files and rewrites them to .csv and .json format, based on the user`s selection
Breaking change
- [ ] Yes
- [x] No