ENH : Add of a line for saving the filtered dataset#518
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #518 +/- ##
===========================================
- Coverage 72.02% 71.99% -0.04%
===========================================
Files 56 56
Lines 9370 9372 +2
===========================================
- Hits 6749 6747 -2
- Misses 2621 2625 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
phmbressan
left a comment
There was a problem hiding this comment.
Thanks for the contributions! Left I quick comment on this feature regarding making the save behavior more versatile.
rocketpy/mathutils/function.py
Outdated
| ) | ||
|
|
||
| # Save the new csv file with filtered data | ||
| np.savetxt("filtered_data.csv", filtered_signal, delimiter=",") |
There was a problem hiding this comment.
Good feature. One small note is that it might not be the user's will to always save the file and in this location.
Therefore, what I suggest is to add an optional parameter to the method filepath (or another name you prefer) that defaults to None (in this case nothing will be saved), but may receive the filepath (and filename) string that will go into the np.savetxt.
The final step would be describing this behavior on this parameter docstring.
As always, we are open to any other suggestions you might have.
There was a problem hiding this comment.
Good idea, thank you! I didn't thought about it, I will try to implement it!
…e if he wants to save the CSV or not
…Team/RocketPy into enh/save-filtered-data
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
The code is able to filter data (of a CSV file) but doesn't save the filtered dataset.
New behavior
Once you filter a dataset, this one is saved in a CSV file.
Breaking change
Additional information
Enter text here...