rowingdata 3.8.7__tar.gz → 3.8.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rowingdata-3.8.7/rowingdata.egg-info → rowingdata-3.8.10}/PKG-INFO +1 -24
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/data/fit_export_spec.json +4 -2
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/fitwrite.py +32 -6
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/fitwrite_spec.py +9 -3
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/otherparsers.py +17 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/rowingdata.py +1 -1
- {rowingdata-3.8.7 → rowingdata-3.8.10/rowingdata.egg-info}/PKG-INFO +1 -24
- {rowingdata-3.8.7 → rowingdata-3.8.10}/tests/test_fit_instroke_export.py +51 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/tests/test_fit_standard.py +100 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/tests/test_rowingdata.py +2 -1
- {rowingdata-3.8.7 → rowingdata-3.8.10}/LICENSE +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/MANIFEST.in +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/README.rst +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/bin/crewnerddata.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/bin/crewnerddata.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/bin/testdata.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/.buildinfo +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/2x20min.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/editrower.JPG +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/greghoc.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/image001.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/otwlogbook.JPG +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/otwscreenshot.JPG +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/screenshot.JPG +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/screenshotlogbook.JPG +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_images/woensdag.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_sources/index.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_sources/modules.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_sources/rowingdata.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/ajax-loader.gif +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/alabaster.css +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/basic.css +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/comment-bright.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/comment-close.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/comment.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/custom.css +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/doctools.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/down-pressed.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/down.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/file.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/jquery-1.11.1.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/jquery.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/minus.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/plus.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/pygments.css +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/searchtools.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/underscore-1.3.1.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/underscore.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/up-pressed.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/up.png +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/_static/websupport.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/genindex.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/index.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/modules.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/objects.inv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/py-modindex.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/rowingdata.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/search.html +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/docs/_build/html/searchindex.js +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/__init__.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/__main__.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/boatedit.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/checkdatafiles.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/copystats.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/crewnerdplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/crewnerdplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/csvparsers.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergdataplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergdataplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergdatatotcx.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergstickplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergstickplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/ergsticktotcx.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/fit_garmin_bridge.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/fit_transcode.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/gpxtools.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/gpxwrite.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/konkatenaadje.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/laptesting.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/obsolete.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsled_desktop_plot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsled_desktop_plottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsled_desktop_toc2.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsledplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsledplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/painsledtoc2.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/roweredit.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/rowproplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/rowproplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/speedcoachplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/speedcoachplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/speedcoachtoc2.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxplot.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxplot_nogeo.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxplottime.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxplottime_nogeo.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxtoc2.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/tcxtools.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/trainingparser.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/utils.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/windcorrected.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata/writetcx.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata.egg-info/SOURCES.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata.egg-info/dependency_links.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata.egg-info/not-zip-safe +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata.egg-info/requires.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/rowingdata.egg-info/top_level.txt +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/setup.cfg +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/setup.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/2016-03-25-0758.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/2016-03-25-0758_data.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/2x20min_o.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/2x2km.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/3km_cd_o.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/3x250m.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/EUBoatCoach.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/EmpowerSpeedCoachForce.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/NKEmporfromgreg.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/NKLiNKv130.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/NoHR.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/PainsledForce.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/RP_interval.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/RP_interval.csv_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/RP_testdata.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpdCoach2_imp_inconsistent.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpdCoachAmbiguous.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpeedCoach GPS Workout.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpeedCoach2Link_interval.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpeedCoach2Linkv1.27.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/SpeedCoach2v2.12.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/Speedcoach2example.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/aritmo.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/bc1.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/bc2.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/bc3.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/boatcoach.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/boatcoach_fixed_distance.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/boatcoach_otw.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/correctedpainsled.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/cottwich.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/coxmate.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/crewnerd_interval.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/crewnerddata.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/crewnerddata.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/crewnerddata_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/cumvalues.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergdata_example.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergdata_example.csv_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergstick.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergstick.csv_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergstick2.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ergstick_o.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/example.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/example_data.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/faketcx.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/float.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/herodata.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/humon.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/impeller_empower.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/invalidchar.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/kinomap.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/mystery.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/nk_logbook.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/painsled.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/painsled_desktop_example.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/painsled_out_data.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/painsled_to_csv_20160221-105218_erg-400150318_760465m.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/quiske_per_stroke_left.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/quiske_per_stroke_new.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/quiske_per_stroke_right.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/quiske_per_stroke_seat.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/recover.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/ritmointervals.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowingdata_eth.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowinginmotionexample.TCX +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowinginmotionexample.TCX_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowperfect.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowpro5.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rowpro_carrick.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rp3_curve.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rp3intervals.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rp3intervals2.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/rp_out.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/smartrow.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/smartrow_intervals.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/spdcoach2noheader.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/speedcoach2test2.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/speedcoach3test3.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/speedcoachexample.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/speedcoachexample.csv_o.CSV +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/strava_export.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/summarytest.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testdata.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testdata_part1.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testdata_part2.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testdatasummary.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testlapidx.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testtcs_210614.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testtcx.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/testtcx_210614.tcx +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata/tim.csv +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/testdata//345/210/222/350/210/271.csv" +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/tests/test_fit_transcode.py +0 -0
- {rowingdata-3.8.7 → rowingdata-3.8.10}/tests/testparser.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rowingdata
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.10
|
|
4
4
|
Summary: The rowingdata library to create colorful plots from CrewNerd, Painsled and other rowing data tools
|
|
5
5
|
Home-page: https://github.com/sanderroosendaal/rowingdata
|
|
6
6
|
Author: Sander Roosendaal
|
|
@@ -9,29 +9,6 @@ License: MIT
|
|
|
9
9
|
Keywords: rowing ergometer concept2
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist: Cython
|
|
13
|
-
Requires-Dist: numpy
|
|
14
|
-
Requires-Dist: scipy
|
|
15
|
-
Requires-Dist: matplotlib
|
|
16
|
-
Requires-Dist: pandas
|
|
17
|
-
Requires-Dist: fitparse
|
|
18
|
-
Requires-Dist: fit-tool>=0.9.14
|
|
19
|
-
Requires-Dist: arrow>=1.0.2
|
|
20
|
-
Requires-Dist: python-dateutil
|
|
21
|
-
Requires-Dist: six
|
|
22
|
-
Requires-Dist: docopt
|
|
23
|
-
Requires-Dist: tqdm
|
|
24
|
-
Requires-Dist: rowingphysics>=0.2.3
|
|
25
|
-
Requires-Dist: iso8601
|
|
26
|
-
Requires-Dist: lxml>=6.1.0
|
|
27
|
-
Requires-Dist: xmltodict
|
|
28
|
-
Requires-Dist: nose_parameterized
|
|
29
|
-
Requires-Dist: timezonefinder
|
|
30
|
-
Requires-Dist: pycairo
|
|
31
|
-
Requires-Dist: tk
|
|
32
|
-
Requires-Dist: requests
|
|
33
|
-
Requires-Dist: polars
|
|
34
|
-
Requires-Dist: pytz
|
|
35
12
|
|
|
36
13
|
**************
|
|
37
14
|
Rowingdata
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 7,
|
|
3
3
|
"protocol_version": 1,
|
|
4
4
|
"handle_force_curve_field_id": 60,
|
|
5
|
-
"_comment": "Authoritative FIT developer field definitions for rowingdata fitwrite. Field IDs, scales and units must match the Rowing Data Standard registry at https://github.com/Rowing-Industry-Trade-Association/rowing-data-standard (registry/field-ids.md); that repository is the source of truth, this file is only rowingdata's machine-readable copy of the subset it emits. v2: mm precision for DriveLength/PeakForcePositionAbs (scale 1000); StrokeRate dev field (93); instroke curve Y-scale registry. v6: in-stroke summary fields (20-59, reserved in the standard) and the non-standard curve types (BoatAccelerator, OarAngleVelocity, Seat) are no longer written to FIT; only HandleForceCurve (60) is, other curves go to the companion JSON. v5: main of 2026-11-05: record field 9 (WorkoutState) was removed from the standard and its ID is reserved, so it is read-only here (group legacy) and never written; always_emit_field_ids is empty (axis fields 90-92 are only written with curve data and never as UNKNOWN). v4: main of 2026-10-31: AverageBoatSpeed scale 100; EffectiveLength -> EffectiveArc (deg, scale 10; 16, 210, 211); force fields named without the N suffix. v3: standard draft 0.1: WorkoutState holds FIT intensity values; StrokeState (96); SlipThreshold/WashThreshold (94/95); HandleForceCurve fixed at 60; fields 4, 5 and 93 are not in the standard and are read-only (group legacy).",
|
|
5
|
+
"_comment": "Authoritative FIT developer field definitions for rowingdata fitwrite. Field IDs, scales and units must match the Rowing Data Standard registry at https://github.com/Rowing-Industry-Trade-Association/rowing-data-standard (registry/field-ids.md); that repository is the source of truth, this file is only rowingdata's machine-readable copy of the subset it emits. v7: TimestampMs (97, record, UINT16 ms, group record_time): the milliseconds past the native whole-second timestamp, which is truncated to the second (proposal 0002); it is computed from TimeStamp (sec), and its df_columns entry is only the column the reader folds back into TimeStamp (sec). v2: mm precision for DriveLength/PeakForcePositionAbs (scale 1000); StrokeRate dev field (93); instroke curve Y-scale registry. v6: in-stroke summary fields (20-59, reserved in the standard) and the non-standard curve types (BoatAccelerator, OarAngleVelocity, Seat) are no longer written to FIT; only HandleForceCurve (60) is, other curves go to the companion JSON. v5: main of 2026-11-05: record field 9 (WorkoutState) was removed from the standard and its ID is reserved, so it is read-only here (group legacy) and never written; always_emit_field_ids is empty (axis fields 90-92 are only written with curve data and never as UNKNOWN). v4: main of 2026-10-31: AverageBoatSpeed scale 100; EffectiveLength -> EffectiveArc (deg, scale 10; 16, 210, 211); force fields named without the N suffix. v3: standard draft 0.1: WorkoutState holds FIT intensity values; StrokeState (96); SlipThreshold/WashThreshold (94/95); HandleForceCurve fixed at 60; fields 4, 5 and 93 are not in the standard and are read-only (group legacy).",
|
|
6
6
|
"instroke_dynamic": {
|
|
7
7
|
"curve_start": 60
|
|
8
8
|
},
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"always_emit_field_ids": [],
|
|
25
25
|
"instroke_column_map": {
|
|
26
26
|
"curve_data": "HandleForceCurve",
|
|
27
|
+
"Handle_Force_(N)": "HandleForceCurve",
|
|
27
28
|
"boat accelerator curve": "BoatAcceleratorCurve",
|
|
28
29
|
"oar angle velocity curve": "OarAngleVelocityCurve",
|
|
29
30
|
"seat curve": "SeatCurve"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
{"field_id": 95, "group": "metadata", "fit_name": "WashThreshold", "base_type": "UINT16", "size": 2, "scale": 1, "units": "N", "df_columns": [], "message_type": "session"},
|
|
45
46
|
{"field_id": 19, "group": "rowing", "fit_name": "StrokeWork", "base_type": "UINT16", "size": 2, "scale": 1, "units": "J", "df_columns": [" WorkPerStroke (joules)", "driveenergy"]},
|
|
46
47
|
{"field_id": 96, "group": "rowing", "fit_name": "StrokeState", "base_type": "UINT8", "size": 1, "scale": 1, "units": "", "df_columns": [" StrokeState"]},
|
|
48
|
+
{"field_id": 97, "group": "record_time", "fit_name": "TimestampMs", "base_type": "UINT16", "size": 2, "scale": 1, "units": "ms", "df_columns": [" TimestampMs (ms)"]},
|
|
47
49
|
{"field_id": 93, "group": "legacy", "fit_name": "StrokeRate", "base_type": "UINT16", "size": 2, "scale": 100, "units": "spm", "df_columns": [" Cadence (stokes/min)"]},
|
|
48
50
|
|
|
49
51
|
{"field_id": 11, "group": "oarlock", "fit_name": "Catch", "base_type": "SINT16", "size": 2, "scale": 10, "units": "deg", "df_columns": ["catch", " catch", "catchAngle"]},
|
|
@@ -69,6 +69,7 @@ RECORDING_STRATEGY_FIELD_ID = 10
|
|
|
69
69
|
SLIP_THRESHOLD_FIELD_ID = 94
|
|
70
70
|
WASH_THRESHOLD_FIELD_ID = 95
|
|
71
71
|
STROKE_STATE_FIELD_ID = 96
|
|
72
|
+
TIMESTAMP_MS_FIELD_ID = 97
|
|
72
73
|
HANDLE_FORCE_CURVE_FIELD_ID = int(_FIT_EXPORT_RAW.get('handle_force_curve_field_id', 60))
|
|
73
74
|
HANDLE_FORCE_CURVE_NAME = 'HandleForceCurve'
|
|
74
75
|
INSTROKE_AXIS_FIELD_IDS = frozenset((90, 91, 92))
|
|
@@ -106,7 +107,8 @@ INSTROKE_CURVE_TYPES = dict(_FIT_EXPORT_RAW.get('instroke_curve_types') or {})
|
|
|
106
107
|
|
|
107
108
|
def _parse_instroke_curve(df, col):
|
|
108
109
|
"""Parse curve column to DataFrame of numeric values. Same format as rowingdata get_instroke_data."""
|
|
109
|
-
|
|
110
|
+
# Curves are stored as "(1,2,3)", "[1,2,3]" or "1,2,3" (OpenRowingMonitor)
|
|
111
|
+
d = df[col].astype(str).str.strip().str.strip('()[]').str.split(',', expand=True)
|
|
110
112
|
return d.apply(pd.to_numeric, errors='coerce')
|
|
111
113
|
|
|
112
114
|
|
|
@@ -267,6 +269,17 @@ def _values_for_fit_field(arr, units, scale, base_type):
|
|
|
267
269
|
return arr
|
|
268
270
|
|
|
269
271
|
|
|
272
|
+
def _fit_whole_second_ms(unixtime):
|
|
273
|
+
"""Unix time in s -> ms for a fit-tool date_time, truncated to the whole second.
|
|
274
|
+
|
|
275
|
+
fit-tool rounds a date_time to the nearest second. Records write the truncated
|
|
276
|
+
second plus TimestampMs (field 97, §5.1), so Lap, Session and Event times are
|
|
277
|
+
truncated the same way to stay in step with their records.
|
|
278
|
+
"""
|
|
279
|
+
total_ms = int(round(float(unixtime) * 1000.0))
|
|
280
|
+
return (total_ms // 1000) * 1000
|
|
281
|
+
|
|
282
|
+
|
|
270
283
|
def _split_cadence_arrays(df, nr_rows):
|
|
271
284
|
"""
|
|
272
285
|
Return (cadence, cadence256, stroke_rate_spm) per row.
|
|
@@ -474,7 +487,7 @@ def _compute_interval_summaries(df, lap_col, unixtimes, distance_m, heart_rate,
|
|
|
474
487
|
if len(indices) == 0:
|
|
475
488
|
continue
|
|
476
489
|
|
|
477
|
-
start_time_ms =
|
|
490
|
+
start_time_ms = _fit_whole_second_ms(unixtimes[indices[0]])
|
|
478
491
|
first_t = float(unixtimes[indices[0]])
|
|
479
492
|
last_t = float(unixtimes[indices[-1]])
|
|
480
493
|
if j + 1 < len(interval_nrs):
|
|
@@ -540,7 +553,7 @@ def _downsample_curve_series(series, n_points):
|
|
|
540
553
|
curves = []
|
|
541
554
|
for val in series:
|
|
542
555
|
s = str(val).strip().strip('"')
|
|
543
|
-
inner = s[1:-1] if len(s) > 2 else s
|
|
556
|
+
inner = s[1:-1] if len(s) > 2 and s[0] in '([' and s[-1] in ')]' else s
|
|
544
557
|
parts = [float(x) for x in inner.split(',') if x.strip()]
|
|
545
558
|
if len(parts) < 2:
|
|
546
559
|
curves.append([0.0] * n_points)
|
|
@@ -700,8 +713,15 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
700
713
|
else:
|
|
701
714
|
unixtimes = seconds
|
|
702
715
|
|
|
716
|
+
# Record time to the millisecond, split into the native whole-second timestamp
|
|
717
|
+
# and TimestampMs (field 97, §5.1). The split truncates, so the native
|
|
718
|
+
# timestamp is the floor of the true time: 12:00:05.999 -> 12:00:05 + 999 ms.
|
|
719
|
+
record_total_ms = np.round(np.asarray(unixtimes, dtype=np.float64) * 1000.0).astype(np.int64)
|
|
720
|
+
record_whole_s = record_total_ms // 1000
|
|
721
|
+
record_ms = record_total_ms - record_whole_s * 1000
|
|
722
|
+
|
|
703
723
|
# FIT timestamps in milliseconds (fit-tool convention for timestamp fields)
|
|
704
|
-
start_time_ms =
|
|
724
|
+
start_time_ms = _fit_whole_second_ms(unixtimes[0])
|
|
705
725
|
total_elapsed_ms = int((unixtimes[-1] - unixtimes[0]) * 1000) if nr_rows > 1 else 0
|
|
706
726
|
total_elapsed_s = (unixtimes[-1] - unixtimes[0]) if nr_rows > 1 else 0.0 # seconds, for Activity/Session/Lap
|
|
707
727
|
|
|
@@ -794,6 +814,12 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
794
814
|
arr = _values_for_fit_field(arr, units, scale, base_type)
|
|
795
815
|
dev_arrays[field_id] = arr
|
|
796
816
|
dev_specs.append((field_id, col, name, base_type, size, scale, units))
|
|
817
|
+
# TimestampMs (97): only when the record times carry sub-second information
|
|
818
|
+
if np.any(record_ms != 0):
|
|
819
|
+
for field_id, name, base_type, size, scale, units in _spec['RECORD_TIME_DEV_FIELDS']:
|
|
820
|
+
if field_id == TIMESTAMP_MS_FIELD_ID:
|
|
821
|
+
dev_arrays[field_id] = record_ms.astype(np.float64)
|
|
822
|
+
dev_specs.append((field_id, '_record_time', name, base_type, size, scale, units))
|
|
797
823
|
for fd in OARLOCK_DEV_FIELDS:
|
|
798
824
|
field_id, possible_cols, name, base_type, size, scale, units = fd
|
|
799
825
|
col = next((c for c in possible_cols if c in df.columns), None)
|
|
@@ -1161,7 +1187,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
1161
1187
|
dev.set_value(0, val)
|
|
1162
1188
|
dev_fields.append(dev)
|
|
1163
1189
|
rec = RecordMessage(developer_fields=dev_fields) if dev_fields else RecordMessage()
|
|
1164
|
-
rec.timestamp = int(
|
|
1190
|
+
rec.timestamp = int(record_whole_s[i]) * 1000 # whole seconds; ms in field 97
|
|
1165
1191
|
rec.distance = float(distance_m[i])
|
|
1166
1192
|
rec.heart_rate = heart_rate[i] if heart_rate[i] > 0 else None
|
|
1167
1193
|
rec.cadence = cadence[i] if cadence[i] > 0 else None
|
|
@@ -1240,7 +1266,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
1240
1266
|
event_stop = EventMessage()
|
|
1241
1267
|
event_stop.event = Event.TIMER
|
|
1242
1268
|
event_stop.event_type = EventType.STOP_ALL
|
|
1243
|
-
event_stop.timestamp =
|
|
1269
|
+
event_stop.timestamp = _fit_whole_second_ms(unixtimes[-1]) if nr_rows > 0 else start_time_ms
|
|
1244
1270
|
builder.add(event_stop)
|
|
1245
1271
|
|
|
1246
1272
|
fit_file = builder.build()
|
|
@@ -78,9 +78,9 @@ def load_fit_spec_raw():
|
|
|
78
78
|
|
|
79
79
|
def _validate_spec(raw):
|
|
80
80
|
version = raw.get('version', 0)
|
|
81
|
-
if version not in (1, 2, 3, 4, 5, 6):
|
|
81
|
+
if version not in (1, 2, 3, 4, 5, 6, 7):
|
|
82
82
|
warnings.warn(
|
|
83
|
-
'fit_export_spec.json version %s may be unsupported (expected 1 to
|
|
83
|
+
'fit_export_spec.json version %s may be unsupported (expected 1 to 7)' % version,
|
|
84
84
|
UserWarning,
|
|
85
85
|
stacklevel=2,
|
|
86
86
|
)
|
|
@@ -104,6 +104,7 @@ def _materialize_dev_field_tuples(raw):
|
|
|
104
104
|
oarlock = []
|
|
105
105
|
peak = []
|
|
106
106
|
instroke_axis = []
|
|
107
|
+
record_time = []
|
|
107
108
|
dual_sides = {}
|
|
108
109
|
|
|
109
110
|
for row in raw['developer_fields']:
|
|
@@ -143,6 +144,9 @@ def _materialize_dev_field_tuples(raw):
|
|
|
143
144
|
)
|
|
144
145
|
elif group == 'instroke_axis':
|
|
145
146
|
instroke_axis.append((fid, name, bt, size, scale, units))
|
|
147
|
+
elif group == 'record_time':
|
|
148
|
+
# Computed from the record time, not from a DataFrame column (TimestampMs)
|
|
149
|
+
record_time.append((fid, name, bt, size, scale, units))
|
|
146
150
|
elif group == 'metadata':
|
|
147
151
|
# Session-level fields (RecordingStrategy, thresholds) are handled in fitwrite.py
|
|
148
152
|
pass
|
|
@@ -168,6 +172,7 @@ def _materialize_dev_field_tuples(raw):
|
|
|
168
172
|
'OARLOCK_DUAL_PAIRS': oarlock_dual_pairs,
|
|
169
173
|
'PEAK_POSITION_DEV_FIELDS': peak,
|
|
170
174
|
'INSTROKE_AXIS_DEV_FIELDS': instroke_axis,
|
|
175
|
+
'RECORD_TIME_DEV_FIELDS': record_time,
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
|
|
@@ -175,7 +180,8 @@ def load_fit_spec():
|
|
|
175
180
|
"""
|
|
176
181
|
Load and validate FIT export spec; cache globally.
|
|
177
182
|
Returns dict with keys: raw, ROWING_DEV_FIELDS, OARLOCK_DEV_FIELDS, OARLOCK_DUAL_PAIRS,
|
|
178
|
-
PEAK_POSITION_DEV_FIELDS, INSTROKE_AXIS_DEV_FIELDS,
|
|
183
|
+
PEAK_POSITION_DEV_FIELDS, INSTROKE_AXIS_DEV_FIELDS, RECORD_TIME_DEV_FIELDS,
|
|
184
|
+
instroke_column_map,
|
|
179
185
|
abscissa_enum, instroke_axis_field_ids, always_emit_field_ids, instroke_dynamic.
|
|
180
186
|
"""
|
|
181
187
|
global _SPEC_CACHE
|
|
@@ -816,6 +816,7 @@ class FITParser(object):
|
|
|
816
816
|
|
|
817
817
|
self.df.rename(columns=newcolnames,inplace=True)
|
|
818
818
|
self._map_standard_developer_fields()
|
|
819
|
+
self._apply_timestamp_ms()
|
|
819
820
|
self._apply_lap_intensity()
|
|
820
821
|
|
|
821
822
|
# timestamp
|
|
@@ -838,6 +839,22 @@ class FITParser(object):
|
|
|
838
839
|
pass
|
|
839
840
|
return None
|
|
840
841
|
|
|
842
|
+
def _apply_timestamp_ms(self):
|
|
843
|
+
"""Add TimestampMs (record field 97) to the whole-second record time (§5.1).
|
|
844
|
+
|
|
845
|
+
Values of 1000 and above are invalid and read as missing; a missing value
|
|
846
|
+
leaves the record at its whole second. Elapsed time is recomputed.
|
|
847
|
+
"""
|
|
848
|
+
column = ' TimestampMs (ms)'
|
|
849
|
+
if column not in self.df.columns:
|
|
850
|
+
return
|
|
851
|
+
ms = pd.to_numeric(self.df[column], errors='coerce')
|
|
852
|
+
ms = ms.where((ms >= 0) & (ms < 1000)).fillna(0.0)
|
|
853
|
+
timestamps = self.df['TimeStamp (sec)'] + ms.values / 1000.0
|
|
854
|
+
self.df['TimeStamp (sec)'] = timestamps
|
|
855
|
+
self.df[' ElapsedTime (sec)'] = timestamps - timestamps.values[0]
|
|
856
|
+
self.df.drop(columns=[column], inplace=True)
|
|
857
|
+
|
|
841
858
|
def _apply_lap_intensity(self):
|
|
842
859
|
"""Resolve WorkoutState: lap intensity wins; FIT intensity values -> rowingdata codes."""
|
|
843
860
|
if ' WorkoutState' in self.df.columns and (self._protocol_version() or 0) >= 1:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rowingdata
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.10
|
|
4
4
|
Summary: The rowingdata library to create colorful plots from CrewNerd, Painsled and other rowing data tools
|
|
5
5
|
Home-page: https://github.com/sanderroosendaal/rowingdata
|
|
6
6
|
Author: Sander Roosendaal
|
|
@@ -9,29 +9,6 @@ License: MIT
|
|
|
9
9
|
Keywords: rowing ergometer concept2
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist: Cython
|
|
13
|
-
Requires-Dist: numpy
|
|
14
|
-
Requires-Dist: scipy
|
|
15
|
-
Requires-Dist: matplotlib
|
|
16
|
-
Requires-Dist: pandas
|
|
17
|
-
Requires-Dist: fitparse
|
|
18
|
-
Requires-Dist: fit-tool>=0.9.14
|
|
19
|
-
Requires-Dist: arrow>=1.0.2
|
|
20
|
-
Requires-Dist: python-dateutil
|
|
21
|
-
Requires-Dist: six
|
|
22
|
-
Requires-Dist: docopt
|
|
23
|
-
Requires-Dist: tqdm
|
|
24
|
-
Requires-Dist: rowingphysics>=0.2.3
|
|
25
|
-
Requires-Dist: iso8601
|
|
26
|
-
Requires-Dist: lxml>=6.1.0
|
|
27
|
-
Requires-Dist: xmltodict
|
|
28
|
-
Requires-Dist: nose_parameterized
|
|
29
|
-
Requires-Dist: timezonefinder
|
|
30
|
-
Requires-Dist: pycairo
|
|
31
|
-
Requires-Dist: tk
|
|
32
|
-
Requires-Dist: requests
|
|
33
|
-
Requires-Dist: polars
|
|
34
|
-
Requires-Dist: pytz
|
|
35
12
|
|
|
36
13
|
**************
|
|
37
14
|
Rowingdata
|
|
@@ -375,6 +375,57 @@ def _curve_values(n_points, peak):
|
|
|
375
375
|
return [round(float(v), 1) for v in peak * np.sin(x) + 5.0]
|
|
376
376
|
|
|
377
377
|
|
|
378
|
+
class TestFitInstrokeOrmHandleForce(unittest.TestCase):
|
|
379
|
+
"""OpenRowingMonitor names its in-stroke force column ``Handle_Force_(N)``."""
|
|
380
|
+
|
|
381
|
+
ORM_COLUMN = 'Handle_Force_(N)'
|
|
382
|
+
|
|
383
|
+
def _orm_df(self):
|
|
384
|
+
df = _synthetic_stroke_df(curve_values=(100, 200, 400, 300, 50), n_strokes=3)
|
|
385
|
+
df = df.rename(columns={'curve_data': self.ORM_COLUMN})
|
|
386
|
+
# ORM writes the curve without brackets
|
|
387
|
+
df[self.ORM_COLUMN] = ['100,200,400,300,50'] * len(df)
|
|
388
|
+
df['Handle_Velocity_(m/s)'] = ['0.5,1.0,1.5,1.0,0.5'] * len(df)
|
|
389
|
+
df['Handle_Power_(W)'] = ['50,200,600,300,25'] * len(df)
|
|
390
|
+
return df
|
|
391
|
+
|
|
392
|
+
def test_column_map_names_orm_column(self):
|
|
393
|
+
self.assertEqual(fitwrite.INSTROKE_COLUMN_MAP[self.ORM_COLUMN], 'HandleForceCurve')
|
|
394
|
+
|
|
395
|
+
def test_orm_handle_force_goes_to_fit_field_60(self):
|
|
396
|
+
for mode in ('full', 'downsampled'):
|
|
397
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
398
|
+
fit_path, _ = _export_synthetic(tmp, mode, df=self._orm_df())
|
|
399
|
+
fmap = _field_description_map(fit_path)
|
|
400
|
+
self.assertEqual(fmap[60]['field_name'], 'HandleForceCurve')
|
|
401
|
+
recs = [r for r in _record_field_maps(fit_path) if 'HandleForceCurve' in r]
|
|
402
|
+
self.assertEqual(len(recs), 3)
|
|
403
|
+
for rec in recs:
|
|
404
|
+
self.assertEqual(list(rec['HandleForceCurve'].raw_value),
|
|
405
|
+
[1000, 2000, 4000, 3000, 500])
|
|
406
|
+
self.assertEqual(rec['InstrokePointCount'].raw_value, 5)
|
|
407
|
+
|
|
408
|
+
def test_orm_handle_force_not_in_companion_when_in_fit(self):
|
|
409
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
410
|
+
fit_path, _ = _export_synthetic(tmp, 'full', df=self._orm_df())
|
|
411
|
+
with open(os.path.splitext(fit_path)[0] + '.instroke.json') as f:
|
|
412
|
+
companion = json.load(f)
|
|
413
|
+
self.assertNotIn(self.ORM_COLUMN, companion)
|
|
414
|
+
self.assertNotIn('HandleForceCurve', companion)
|
|
415
|
+
|
|
416
|
+
def test_orm_velocity_and_power_stay_out_of_fit(self):
|
|
417
|
+
"""The standard (§6.1) allows only the handle force curve in the FIT file."""
|
|
418
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
419
|
+
fit_path, _ = _export_synthetic(tmp, 'full', df=self._orm_df())
|
|
420
|
+
names = {d['field_name'] for d in _field_description_map(fit_path).values()}
|
|
421
|
+
self.assertNotIn('Handle_Velocity_(m/s)', names)
|
|
422
|
+
self.assertNotIn('Handle_Power_(W)', names)
|
|
423
|
+
with open(os.path.splitext(fit_path)[0] + '.instroke.json') as f:
|
|
424
|
+
companion = json.load(f)
|
|
425
|
+
self.assertIn('Handle_Velocity_(m/s)', companion)
|
|
426
|
+
self.assertIn('Handle_Power_(W)', companion)
|
|
427
|
+
|
|
428
|
+
|
|
378
429
|
class TestFitInstrokeNativeCsvFullResolution(unittest.TestCase):
|
|
379
430
|
"""Native rowingdata CSV with 50-100 point force curves -> FIT at original resolution."""
|
|
380
431
|
|
|
@@ -300,6 +300,39 @@ class TestStandardEncoding(unittest.TestCase):
|
|
|
300
300
|
assert record.get_value('heart_rate') == 254
|
|
301
301
|
|
|
302
302
|
|
|
303
|
+
def test_timestamp_ms_carries_the_truncated_milliseconds(self):
|
|
304
|
+
"""TimestampMs (97): native timestamp is the whole-second floor (§5.1)."""
|
|
305
|
+
df = _sample_df()
|
|
306
|
+
df['TimeStamp (sec)'] = [1.0e9, 1.0e9 + 5.999, 1.0e9 + 7.5]
|
|
307
|
+
fit = self._write(df=df)
|
|
308
|
+
desc = _descriptions(fit)
|
|
309
|
+
assert desc[97]['name'] == 'TimestampMs'
|
|
310
|
+
assert desc[97]['units'] == 'ms' and desc[97]['scale'] == 1
|
|
311
|
+
records = list(fit.get_messages('record'))
|
|
312
|
+
seconds = [_record_field(r, 'timestamp').raw_value for r in records]
|
|
313
|
+
assert [t - seconds[0] for t in seconds] == [0, 5, 7]
|
|
314
|
+
ms = [_record_field(r, 'TimestampMs') for r in records]
|
|
315
|
+
assert ms[0] is None # 0 ms: omitted, absent means the whole second
|
|
316
|
+
assert [f.raw_value for f in ms[1:]] == [999, 500]
|
|
317
|
+
|
|
318
|
+
def test_timestamp_ms_not_written_for_whole_seconds(self):
|
|
319
|
+
df = _sample_df()
|
|
320
|
+
df['TimeStamp (sec)'] = [1.0e9, 1.0e9 + 2.0, 1.0e9 + 4.0]
|
|
321
|
+
fit = self._write(df=df)
|
|
322
|
+
assert 97 not in _descriptions(fit)
|
|
323
|
+
|
|
324
|
+
def test_lap_start_is_truncated_like_its_records(self):
|
|
325
|
+
"""A lap starting at x.6 s starts at second x, the second of its first record."""
|
|
326
|
+
df = _sample_df()
|
|
327
|
+
df['TimeStamp (sec)'] = [1.0e9, 1.0e9 + 2.6, 1.0e9 + 4.6]
|
|
328
|
+
df[' WorkoutState'] = [1, 3, 1]
|
|
329
|
+
fit = self._write(df=df)
|
|
330
|
+
records = list(fit.get_messages('record'))
|
|
331
|
+
laps = list(fit.get_messages('lap'))
|
|
332
|
+
assert [_record_field(lap, 'start_time').raw_value for lap in laps] == [
|
|
333
|
+
_record_field(r, 'timestamp').raw_value for r in records]
|
|
334
|
+
|
|
335
|
+
|
|
303
336
|
class TestInstrokeNamespace(unittest.TestCase):
|
|
304
337
|
"""HandleForceCurve is the one curve in the FIT file; unallocated IDs stay private."""
|
|
305
338
|
|
|
@@ -371,6 +404,73 @@ class TestReaderMapsStandardFields(unittest.TestCase):
|
|
|
371
404
|
parsed = rowingdata.FITParser(self.outfile).df
|
|
372
405
|
assert list(parsed[' WorkoutState']) == [1, 3, 5]
|
|
373
406
|
|
|
407
|
+
def test_timestamp_ms_round_trips(self):
|
|
408
|
+
df = _sample_df()
|
|
409
|
+
df['TimeStamp (sec)'] = [1.0e9 + 0.25, 1.0e9 + 5.999, 1.0e9 + 7.5]
|
|
410
|
+
df[' WorkoutState'] = [1, 3, 1]
|
|
411
|
+
fitwrite.write_fit(self.outfile, df, row_date='2016-01-01')
|
|
412
|
+
parsed = rowingdata.FITParser(self.outfile).df
|
|
413
|
+
assert ' TimestampMs (ms)' not in parsed.columns
|
|
414
|
+
times = list(parsed['TimeStamp (sec)'])
|
|
415
|
+
for got, want in zip(times, df['TimeStamp (sec)']):
|
|
416
|
+
assert abs(got - want) < 1e-6
|
|
417
|
+
elapsed = list(parsed[' ElapsedTime (sec)'])
|
|
418
|
+
assert [round(e, 3) for e in elapsed] == [0.0, 5.749, 7.25]
|
|
419
|
+
assert list(parsed[' lapIdx']) == [0, 1, 2]
|
|
420
|
+
|
|
421
|
+
def test_timestamp_ms_of_1000_or_more_is_missing(self):
|
|
422
|
+
"""Values of 1000 and above are invalid (§5.1): the record keeps its whole second."""
|
|
423
|
+
self._write_file_with_dev_field(97, 'TimestampMs', 'UINT16', 'ms', [250, 1000, 4000])
|
|
424
|
+
parsed = rowingdata.FITParser(self.outfile).df
|
|
425
|
+
elapsed = list(parsed[' ElapsedTime (sec)'])
|
|
426
|
+
assert [round(e, 3) for e in elapsed] == [0.0, 1.75, 3.75]
|
|
427
|
+
|
|
428
|
+
def _write_file_with_dev_field(self, field_id, name, base_type, units, values,
|
|
429
|
+
protocol_version=1):
|
|
430
|
+
"""A hand-written file with one record-level developer field, 2 s apart."""
|
|
431
|
+
from fit_tool.base_type import BaseType
|
|
432
|
+
from fit_tool.developer_field import DeveloperField
|
|
433
|
+
from fit_tool.fit_file_builder import FitFileBuilder
|
|
434
|
+
from fit_tool.profile.messages.developer_data_id_message import DeveloperDataIdMessage
|
|
435
|
+
from fit_tool.profile.messages.field_description_message import FieldDescriptionMessage
|
|
436
|
+
from fit_tool.profile.messages.file_id_message import FileIdMessage
|
|
437
|
+
from fit_tool.profile.messages.record_message import RecordMessage
|
|
438
|
+
from fit_tool.profile.profile_type import FileType, Manufacturer
|
|
439
|
+
|
|
440
|
+
bt = getattr(BaseType, base_type)
|
|
441
|
+
size = 1 if base_type == 'UINT8' else 2
|
|
442
|
+
builder = FitFileBuilder(auto_define=True, min_string_size=50)
|
|
443
|
+
file_id = FileIdMessage()
|
|
444
|
+
file_id.type = FileType.ACTIVITY
|
|
445
|
+
file_id.manufacturer = Manufacturer.GARMIN.value
|
|
446
|
+
file_id.time_created = 1_000_000_000_000
|
|
447
|
+
builder.add(file_id)
|
|
448
|
+
dev_id = DeveloperDataIdMessage()
|
|
449
|
+
dev_id.application_id = fitwrite.ROWINGDATA_APP_ID
|
|
450
|
+
dev_id.developer_data_index = 0
|
|
451
|
+
if protocol_version is not None:
|
|
452
|
+
dev_id.application_version = protocol_version
|
|
453
|
+
builder.add(dev_id)
|
|
454
|
+
desc = FieldDescriptionMessage()
|
|
455
|
+
desc.developer_data_index = 0
|
|
456
|
+
desc.field_definition_number = field_id
|
|
457
|
+
desc.fit_base_type_id = bt.value
|
|
458
|
+
desc.field_name = name
|
|
459
|
+
desc.scale = 1
|
|
460
|
+
desc.offset = 0
|
|
461
|
+
desc.units = units
|
|
462
|
+
builder.add(desc)
|
|
463
|
+
for i, value in enumerate(values):
|
|
464
|
+
field = DeveloperField(
|
|
465
|
+
developer_data_index=0, field_id=field_id, size=size, name=name,
|
|
466
|
+
base_type=bt, scale=1, offset=0, units=units)
|
|
467
|
+
field.set_value(0, value)
|
|
468
|
+
rec = RecordMessage(developer_fields=[field])
|
|
469
|
+
rec.timestamp = 1_000_000_000_000 + i * 2000
|
|
470
|
+
rec.distance = 8.5 * (i + 1)
|
|
471
|
+
builder.add(rec)
|
|
472
|
+
builder.build().to_file(self.outfile)
|
|
473
|
+
|
|
374
474
|
def _write_file_with_field_9(self, states, protocol_version):
|
|
375
475
|
"""An older file: record field 9 (WorkoutState), written by hand since
|
|
376
476
|
the exporter no longer produces it. No Lap carries an intensity, so the
|
|
@@ -1028,7 +1028,7 @@ class TestFITParser:
|
|
|
1028
1028
|
"""fit_export_spec.json loads; field IDs and names match exporter expectations."""
|
|
1029
1029
|
from rowingdata import fitwrite_spec
|
|
1030
1030
|
raw = fitwrite_spec.load_fit_spec_raw()
|
|
1031
|
-
assert raw['version'] ==
|
|
1031
|
+
assert raw['version'] == 7
|
|
1032
1032
|
assert raw['protocol_version'] == 1
|
|
1033
1033
|
assert raw['handle_force_curve_field_id'] == 60
|
|
1034
1034
|
assert raw['instroke_dynamic']['curve_start'] == 60
|
|
@@ -1043,6 +1043,7 @@ class TestFITParser:
|
|
|
1043
1043
|
assert len(spec['PEAK_POSITION_DEV_FIELDS']) == 2
|
|
1044
1044
|
assert spec['PEAK_POSITION_DEV_FIELDS'][0][7] == 'peak_norm'
|
|
1045
1045
|
assert len(spec['INSTROKE_AXIS_DEV_FIELDS']) == 3
|
|
1046
|
+
assert [f[0] for f in spec['RECORD_TIME_DEV_FIELDS']] == [97]
|
|
1046
1047
|
|
|
1047
1048
|
def test_fitwrite_detect_instroke_columns(self):
|
|
1048
1049
|
"""_detect_instroke_columns finds curve_data and Quiske curve columns."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|