rowingdata 3.8.4__tar.gz → 3.8.6__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.
Files changed (204) hide show
  1. {rowingdata-3.8.4/rowingdata.egg-info → rowingdata-3.8.6}/PKG-INFO +2 -1
  2. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/data/fit_export_spec.json +2 -19
  3. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/fitwrite.py +76 -102
  4. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/fitwrite_spec.py +2 -2
  5. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/otherparsers.py +13 -6
  6. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/rowingdata.py +1 -2
  7. {rowingdata-3.8.4 → rowingdata-3.8.6/rowingdata.egg-info}/PKG-INFO +2 -1
  8. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata.egg-info/requires.txt +1 -0
  9. {rowingdata-3.8.4 → rowingdata-3.8.6}/setup.py +1 -0
  10. {rowingdata-3.8.4 → rowingdata-3.8.6}/tests/test_fit_instroke_export.py +138 -69
  11. {rowingdata-3.8.4 → rowingdata-3.8.6}/tests/test_fit_standard.py +12 -13
  12. {rowingdata-3.8.4 → rowingdata-3.8.6}/tests/test_rowingdata.py +1 -56
  13. {rowingdata-3.8.4 → rowingdata-3.8.6}/LICENSE +0 -0
  14. {rowingdata-3.8.4 → rowingdata-3.8.6}/MANIFEST.in +0 -0
  15. {rowingdata-3.8.4 → rowingdata-3.8.6}/README.rst +0 -0
  16. {rowingdata-3.8.4 → rowingdata-3.8.6}/bin/crewnerddata.csv +0 -0
  17. {rowingdata-3.8.4 → rowingdata-3.8.6}/bin/crewnerddata.tcx +0 -0
  18. {rowingdata-3.8.4 → rowingdata-3.8.6}/bin/testdata.csv +0 -0
  19. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/.buildinfo +0 -0
  20. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/2x20min.png +0 -0
  21. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/editrower.JPG +0 -0
  22. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/greghoc.png +0 -0
  23. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/image001.png +0 -0
  24. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/otwlogbook.JPG +0 -0
  25. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/otwscreenshot.JPG +0 -0
  26. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/screenshot.JPG +0 -0
  27. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/screenshotlogbook.JPG +0 -0
  28. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_images/woensdag.png +0 -0
  29. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_sources/index.txt +0 -0
  30. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_sources/modules.txt +0 -0
  31. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_sources/rowingdata.txt +0 -0
  32. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/ajax-loader.gif +0 -0
  33. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/alabaster.css +0 -0
  34. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/basic.css +0 -0
  35. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/comment-bright.png +0 -0
  36. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/comment-close.png +0 -0
  37. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/comment.png +0 -0
  38. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/custom.css +0 -0
  39. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/doctools.js +0 -0
  40. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/down-pressed.png +0 -0
  41. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/down.png +0 -0
  42. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/file.png +0 -0
  43. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/jquery-1.11.1.js +0 -0
  44. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/jquery.js +0 -0
  45. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/minus.png +0 -0
  46. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/plus.png +0 -0
  47. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/pygments.css +0 -0
  48. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/searchtools.js +0 -0
  49. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/underscore-1.3.1.js +0 -0
  50. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/underscore.js +0 -0
  51. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/up-pressed.png +0 -0
  52. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/up.png +0 -0
  53. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/_static/websupport.js +0 -0
  54. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/genindex.html +0 -0
  55. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/index.html +0 -0
  56. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/modules.html +0 -0
  57. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/objects.inv +0 -0
  58. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/py-modindex.html +0 -0
  59. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/rowingdata.html +0 -0
  60. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/search.html +0 -0
  61. {rowingdata-3.8.4 → rowingdata-3.8.6}/docs/_build/html/searchindex.js +0 -0
  62. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/__init__.py +0 -0
  63. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/__main__.py +0 -0
  64. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/boatedit.py +0 -0
  65. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/checkdatafiles.py +0 -0
  66. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/copystats.py +0 -0
  67. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/crewnerdplot.py +0 -0
  68. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/crewnerdplottime.py +0 -0
  69. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/csvparsers.py +0 -0
  70. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergdataplot.py +0 -0
  71. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergdataplottime.py +0 -0
  72. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergdatatotcx.py +0 -0
  73. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergstickplot.py +0 -0
  74. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergstickplottime.py +0 -0
  75. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/ergsticktotcx.py +0 -0
  76. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/fit_garmin_bridge.py +0 -0
  77. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/fit_transcode.py +0 -0
  78. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/gpxtools.py +0 -0
  79. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/gpxwrite.py +0 -0
  80. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/konkatenaadje.py +0 -0
  81. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/laptesting.py +0 -0
  82. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/obsolete.py +0 -0
  83. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsled_desktop_plot.py +0 -0
  84. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsled_desktop_plottime.py +0 -0
  85. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsled_desktop_toc2.py +0 -0
  86. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsledplot.py +0 -0
  87. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsledplottime.py +0 -0
  88. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/painsledtoc2.py +0 -0
  89. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/roweredit.py +0 -0
  90. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/rowproplot.py +0 -0
  91. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/rowproplottime.py +0 -0
  92. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/speedcoachplot.py +0 -0
  93. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/speedcoachplottime.py +0 -0
  94. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/speedcoachtoc2.py +0 -0
  95. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxplot.py +0 -0
  96. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxplot_nogeo.py +0 -0
  97. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxplottime.py +0 -0
  98. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxplottime_nogeo.py +0 -0
  99. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxtoc2.py +0 -0
  100. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/tcxtools.py +0 -0
  101. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/trainingparser.py +0 -0
  102. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/utils.py +0 -0
  103. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/windcorrected.py +0 -0
  104. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata/writetcx.py +0 -0
  105. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata.egg-info/SOURCES.txt +0 -0
  106. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata.egg-info/dependency_links.txt +0 -0
  107. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata.egg-info/not-zip-safe +0 -0
  108. {rowingdata-3.8.4 → rowingdata-3.8.6}/rowingdata.egg-info/top_level.txt +0 -0
  109. {rowingdata-3.8.4 → rowingdata-3.8.6}/setup.cfg +0 -0
  110. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/2016-03-25-0758.CSV +0 -0
  111. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/2016-03-25-0758_data.CSV +0 -0
  112. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/2x20min_o.csv +0 -0
  113. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/2x2km.tcx +0 -0
  114. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/3km_cd_o.csv +0 -0
  115. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/3x250m.tcx +0 -0
  116. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/EUBoatCoach.csv +0 -0
  117. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/EmpowerSpeedCoachForce.csv +0 -0
  118. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/NKEmporfromgreg.csv +0 -0
  119. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/NKLiNKv130.csv +0 -0
  120. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/NoHR.tcx +0 -0
  121. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/PainsledForce.csv +0 -0
  122. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/RP_interval.csv +0 -0
  123. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/RP_interval.csv_o.CSV +0 -0
  124. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/RP_testdata.csv +0 -0
  125. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpdCoach2_imp_inconsistent.csv +0 -0
  126. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpdCoachAmbiguous.csv +0 -0
  127. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpeedCoach GPS Workout.csv +0 -0
  128. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpeedCoach2Link_interval.csv +0 -0
  129. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpeedCoach2Linkv1.27.csv +0 -0
  130. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/SpeedCoach2v2.12.csv +0 -0
  131. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/Speedcoach2example.csv +0 -0
  132. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/aritmo.csv +0 -0
  133. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/bc1.csv +0 -0
  134. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/bc2.csv +0 -0
  135. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/bc3.csv +0 -0
  136. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/boatcoach.csv +0 -0
  137. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/boatcoach_fixed_distance.csv +0 -0
  138. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/boatcoach_otw.csv +0 -0
  139. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/correctedpainsled.csv +0 -0
  140. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/cottwich.csv +0 -0
  141. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/coxmate.csv +0 -0
  142. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/crewnerd_interval.csv +0 -0
  143. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/crewnerddata.CSV +0 -0
  144. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/crewnerddata.tcx +0 -0
  145. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/crewnerddata_o.CSV +0 -0
  146. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/cumvalues.csv +0 -0
  147. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergdata_example.csv +0 -0
  148. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergdata_example.csv_o.CSV +0 -0
  149. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergstick.csv +0 -0
  150. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergstick.csv_o.CSV +0 -0
  151. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergstick2.csv +0 -0
  152. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ergstick_o.csv +0 -0
  153. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/example.csv +0 -0
  154. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/example_data.csv +0 -0
  155. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/faketcx.tcx +0 -0
  156. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/float.csv +0 -0
  157. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/herodata.csv +0 -0
  158. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/humon.csv +0 -0
  159. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/impeller_empower.csv +0 -0
  160. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/invalidchar.tcx +0 -0
  161. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/kinomap.csv +0 -0
  162. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/mystery.csv +0 -0
  163. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/nk_logbook.csv +0 -0
  164. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/painsled.tcx +0 -0
  165. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/painsled_desktop_example.csv +0 -0
  166. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/painsled_out_data.csv +0 -0
  167. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/painsled_to_csv_20160221-105218_erg-400150318_760465m.csv +0 -0
  168. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/quiske_per_stroke_left.csv +0 -0
  169. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/quiske_per_stroke_new.csv +0 -0
  170. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/quiske_per_stroke_right.csv +0 -0
  171. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/quiske_per_stroke_seat.csv +0 -0
  172. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/recover.tcx +0 -0
  173. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/ritmointervals.csv +0 -0
  174. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowingdata_eth.csv +0 -0
  175. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowinginmotionexample.TCX +0 -0
  176. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowinginmotionexample.TCX_o.CSV +0 -0
  177. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowperfect.csv +0 -0
  178. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowpro5.csv +0 -0
  179. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rowpro_carrick.csv +0 -0
  180. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rp3_curve.csv +0 -0
  181. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rp3intervals.csv +0 -0
  182. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rp3intervals2.csv +0 -0
  183. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/rp_out.csv +0 -0
  184. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/smartrow.csv +0 -0
  185. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/smartrow_intervals.csv +0 -0
  186. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/spdcoach2noheader.csv +0 -0
  187. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/speedcoach2test2.csv +0 -0
  188. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/speedcoach3test3.csv +0 -0
  189. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/speedcoachexample.csv +0 -0
  190. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/speedcoachexample.csv_o.CSV +0 -0
  191. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/strava_export.tcx +0 -0
  192. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/summarytest.csv +0 -0
  193. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testdata.csv +0 -0
  194. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testdata_part1.csv +0 -0
  195. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testdata_part2.csv +0 -0
  196. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testdatasummary.csv +0 -0
  197. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testlapidx.csv +0 -0
  198. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testtcs_210614.tcx +0 -0
  199. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testtcx.tcx +0 -0
  200. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/testtcx_210614.tcx +0 -0
  201. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata/tim.csv +0 -0
  202. {rowingdata-3.8.4 → rowingdata-3.8.6}/testdata//345/210/222/350/210/271.csv" +0 -0
  203. {rowingdata-3.8.4 → rowingdata-3.8.6}/tests/test_fit_transcode.py +0 -0
  204. {rowingdata-3.8.4 → rowingdata-3.8.6}/tests/testparser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rowingdata
3
- Version: 3.8.4
3
+ Version: 3.8.6
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
@@ -18,6 +18,7 @@ Requires-Dist: fitparse
18
18
  Requires-Dist: fit-tool>=0.9.14
19
19
  Requires-Dist: arrow>=1.0.2
20
20
  Requires-Dist: python-dateutil
21
+ Requires-Dist: six
21
22
  Requires-Dist: docopt
22
23
  Requires-Dist: tqdm
23
24
  Requires-Dist: rowingphysics>=0.2.3
@@ -1,11 +1,9 @@
1
1
  {
2
- "version": 5,
2
+ "version": 6,
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. 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. 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
- "summary_start": 20,
8
- "summary_id_padding": "ceil_to_10",
9
7
  "curve_start": 60
10
8
  },
11
9
  "instroke_curve_types": {
@@ -13,21 +11,6 @@
13
11
  "y_scale": 10,
14
12
  "y_units": "N",
15
13
  "default_abscissa": "HANDLE_DISTANCE_UNIFORM_M"
16
- },
17
- "BoatAcceleratorCurve": {
18
- "y_scale": 100,
19
- "y_units": "m/s^2",
20
- "default_abscissa": "TIME_UNIFORM_MS"
21
- },
22
- "OarAngleVelocityCurve": {
23
- "y_scale": 10,
24
- "y_units": "deg/s",
25
- "default_abscissa": "TIME_UNIFORM_MS"
26
- },
27
- "SeatCurve": {
28
- "y_scale": 255,
29
- "y_units": "m",
30
- "default_abscissa": "HANDLE_DISTANCE_UNIFORM_M"
31
14
  }
32
15
  },
33
16
  "abscissa_enum": {
@@ -22,6 +22,7 @@ from . import fit_garmin_bridge
22
22
  try:
23
23
  from fit_tool.base_type import BaseType
24
24
  from fit_tool.developer_field import DeveloperField
25
+ from fit_tool.field import Field
25
26
  from fit_tool.fit_file_builder import FitFileBuilder
26
27
  from fit_tool.profile.messages.developer_data_id_message import DeveloperDataIdMessage
27
28
  from fit_tool.profile.messages.field_description_message import FieldDescriptionMessage
@@ -95,13 +96,8 @@ ALWAYS_EMIT_DEV_FIELD_IDS = frozenset(_FIT_EXPORT_RAW['always_emit_field_ids'])
95
96
  # UUID v5 generated from DNS namespace with name "rowingdata" for deterministic, unique ID.
96
97
  ROWINGDATA_APP_ID = uuid.uuid5(uuid.NAMESPACE_DNS, 'rowingdata').bytes
97
98
 
98
- # In-stroke curve summary fields (20-59) are unallocated in the registry, so
99
- # they travel under a private application ID and cannot collide with a future
100
- # committee allocation. HandleForceCurve (60) and axis metadata 90-92 are
101
- # assigned and stay under ROWINGDATA_APP_ID; other curves go to the companion
102
- # JSON file (standard §6.1).
103
- INSTROKE_APP_ID = uuid.uuid5(uuid.NAMESPACE_DNS, 'rowingdata.instroke').bytes
104
- INSTROKE_DEV_DATA_IDX = 1
99
+ # Only HandleForceCurve (60) and axis metadata 90-92 go in the FIT file, under
100
+ # ROWINGDATA_APP_ID; every other curve goes to the companion JSON file (standard §6.1).
105
101
 
106
102
  # Canonical mapping: df column name -> FIT curve type name (RP3/Quiske); from fit_export_spec.json
107
103
  INSTROKE_COLUMN_MAP = dict(_FIT_EXPORT_RAW['instroke_column_map'])
@@ -114,38 +110,6 @@ def _parse_instroke_curve(df, col):
114
110
  return d.apply(pd.to_numeric, errors='coerce')
115
111
 
116
112
 
117
- def _compute_instroke_summary(df, col):
118
- """
119
- Compute per-stroke summary metrics for a curve column (q1..q4, diff, maxpos, minpos).
120
- Mirrors add_instroke_metrics, add_instroke_diff, add_instroke_maxminpos from rowingdata.
121
- Returns dict with keys q1,q2,q3,q4,diff,maxpos,minpos (each a 1D array of length len(df)).
122
- """
123
- curve = _parse_instroke_curve(df, col)
124
- dfnorm = curve.copy().abs()
125
- row_max = dfnorm.T.max()
126
- row_max = row_max.replace(0, np.nan)
127
- dfnorm = dfnorm.T / row_max.values
128
- dfnorm = dfnorm.T
129
- dfnorm = dfnorm.fillna(0)
130
-
131
- ncol = len(dfnorm.columns)
132
- markers = (np.arange(5) * ncol / 4).astype(int)
133
- q1 = dfnorm.iloc[:, markers[0]:markers[1]].mean(axis=1).rolling(10, min_periods=1).std().fillna(0).values
134
- q2 = dfnorm.iloc[:, markers[1]:markers[2]].mean(axis=1).rolling(10, min_periods=1).std().fillna(0).values
135
- q3 = dfnorm.iloc[:, markers[2]:markers[3]].mean(axis=1).rolling(10, min_periods=1).std().fillna(0).values
136
- q4 = dfnorm.iloc[:, markers[3]:markers[4]].mean(axis=1).rolling(10, min_periods=1).std().fillna(0).values
137
-
138
- diff_mat = dfnorm.diff(axis=0).fillna(0) ** 2
139
- diff_arr = (diff_mat.sum(axis=1) / float(ncol)).fillna(0).values
140
-
141
- min_idxs = dfnorm.idxmin(axis=1)
142
- max_idxs = dfnorm.idxmax(axis=1)
143
- maxpos = (max_idxs.astype(float) / ncol).fillna(0).values
144
- minpos = (min_idxs.astype(float) / ncol).fillna(0).values
145
-
146
- return {'q1': q1, 'q2': q2, 'q3': q3, 'q4': q4, 'diff': diff_arr, 'maxpos': maxpos, 'minpos': minpos}
147
-
148
-
149
113
  def _downsample_instroke_curve(df, col, n_points):
150
114
  """Downsample each row's curve to n_points. Returns list of arrays, one per row."""
151
115
  curve = _parse_instroke_curve(df, col)
@@ -166,6 +130,23 @@ def _downsample_instroke_curve(df, col, n_points):
166
130
  return result
167
131
 
168
132
 
133
+ def _instroke_row_point_counts(df, col, n_points):
134
+ """
135
+ Number of real samples each record's curve carries in the FIT file.
136
+
137
+ A curve is written at its own length (at most ``n_points``): short strokes are not
138
+ padded, so InstrokePointCount and InstrokeSampleInterval describe every record
139
+ truthfully. Rows with fewer than 2 samples carry no curve (count 0).
140
+ """
141
+ curve = _parse_instroke_curve(df, col)
142
+ counts = np.zeros(len(curve), dtype=int)
143
+ for i in range(len(curve)):
144
+ row = curve.iloc[i].dropna().values
145
+ n = int(np.count_nonzero(np.isfinite(row)))
146
+ counts[i] = min(n, int(n_points)) if n >= 2 else 0
147
+ return counts
148
+
149
+
169
150
  def _get_instroke_curve_for_export(df, col, mode, downsample_points):
170
151
  """
171
152
  Get in-stroke curve array for FIT export.
@@ -342,7 +323,9 @@ def _compute_instroke_axis_arrays(df, n_points, instroke_abscissa_type, instroke
342
323
  must not write a placeholder interval (§7.2). The caller then leaves the curve out.
343
324
  """
344
325
  nr = len(df)
345
- if n_points < 2:
326
+ # n_points is one count for every record, or one count per record (0 = no curve)
327
+ npts = np.broadcast_to(np.asarray(n_points, dtype=np.float64), (nr,))
328
+ if nr == 0 or npts.max() < 2:
346
329
  return None
347
330
  if instroke_abscissa_type is not None:
348
331
  atype = int(instroke_abscissa_type)
@@ -362,19 +345,37 @@ def _compute_instroke_axis_arrays(df, n_points, instroke_abscissa_type, instroke
362
345
  df[' DriveLength (meters)'].values, nan=0.0, posinf=0.0, neginf=0.0
363
346
  )
364
347
  # Millimeters between uniform samples along handle travel
365
- interval = np.round(drive_m * 1000.0 / np.maximum(n_points - 1, 1))
348
+ interval = np.round(drive_m * 1000.0 / np.maximum(npts - 1, 1))
366
349
  interval = np.clip(interval, 0, UINT16_MAX_VALID)
367
350
  elif atype == INSTROKE_ABSCISSA_TIME_UNIFORM_MS and ' DriveTime (ms)' in df.columns:
368
351
  drive_ms = np.nan_to_num(df[' DriveTime (ms)'].values, nan=0.0, posinf=0.0, neginf=0.0)
369
- interval = np.round(drive_ms / np.maximum(n_points - 1, 1))
352
+ interval = np.round(drive_ms / np.maximum(npts - 1, 1))
370
353
  interval = np.clip(interval, 0, UINT16_MAX_VALID)
371
354
  else:
372
355
  return None # no way to derive the spacing: do not write a placeholder
373
- pc = np.full(nr, float(min(int(n_points), 127)))
356
+ interval = np.where(npts >= 2, interval, 0.0)
357
+ pc = np.where(npts >= 2, np.minimum(npts, 127.0), 0.0)
374
358
  ta = np.full(nr, float(atype))
375
359
  return ta, interval, pc
376
360
 
377
361
 
362
+ CYCLE_LENGTH16_FIELD_ID = 87
363
+
364
+
365
+ def _set_cycle_length16(rec, metres):
366
+ """
367
+ Write native Record ``cycle_length16`` (field 87, UINT16, scale 100, m): distance per
368
+ stroke cycle, catch to catch (standard §4). fit-tool's Record profile does not define
369
+ this field (only the 8-bit ``cycle_length``, max 2.55 m), so it is added by hand.
370
+ """
371
+ metres = min(max(metres, 0.0), UINT16_MAX_VALID / 100.0)
372
+ field = Field(name='cycle_length16', field_id=CYCLE_LENGTH16_FIELD_ID,
373
+ base_type=BaseType.UINT16, offset=0, scale=100, size=0, units='m',
374
+ type_name='', growable=True, sub_fields=[])
375
+ rec.fields.append(field)
376
+ field.set_value(0, metres)
377
+
378
+
378
379
  # Sport string to FIT enum mapping
379
380
  SPORT_MAP = {
380
381
  'rowing': Sport.ROWING,
@@ -584,7 +585,6 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
584
585
  ``...(lbs)`` columns exist for backward compatibility (see ``fit_export_spec.json``).
585
586
  instroke_export : str
586
587
  'off' (default): no in-stroke curve export.
587
- 'summary': export q1,q2,q3,q4,diff,maxpos,minpos per curve as developer fields.
588
588
  'downsampled': export fixed-length downsampled curve (UINT16 array) per stroke.
589
589
  'full': export full-resolution curve up to 127 points per stroke (FIT size limit).
590
590
  'companion': write curve data to .instroke.json sidecar file.
@@ -637,6 +637,12 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
637
637
  if not FIT_TOOL_AVAILABLE:
638
638
  raise ImportError("fit-tool is required for FIT export. Install with: pip install fit-tool")
639
639
 
640
+ if instroke_export not in ('off', 'downsampled', 'full', 'companion'):
641
+ raise ValueError(
642
+ "instroke_export must be 'off', 'downsampled', 'full' or 'companion' "
643
+ "(got %r; the 'summary' mode was removed because it used field IDs 20-59, "
644
+ "which the Rowing Data Standard reserves)" % (instroke_export,))
645
+
640
646
  # Detect in-stroke columns early (for return value and overwrite check)
641
647
  detected_instroke_cols = _detect_instroke_columns(df)
642
648
  curve_cols_for_export = (
@@ -744,7 +750,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
744
750
  stroke_distance = None
745
751
  if ' StrokeDistance (meters)' in df.columns:
746
752
  stroke_distance = np.nan_to_num(df[' StrokeDistance (meters)'].values, nan=0.0, posinf=0.0, neginf=0.0)
747
- stroke_distance = np.clip(stroke_distance, 0, 655.35) # uint16 scale 100 max
753
+ stroke_distance = np.clip(stroke_distance, 0, 655.34) # uint16 scale 100, below invalid 65535
748
754
 
749
755
  # Stroke number for native total_cycles field (data is per-stroke, one record per stroke)
750
756
  try:
@@ -767,13 +773,8 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
767
773
  dev_arrays = {}
768
774
  dev_specs = []
769
775
  DEV_DATA_IDX = 0
770
- instroke_private_field_ids = set()
771
-
772
- def _dev_index_for(field_id):
773
- """Developer data index: private namespace for unallocated curve IDs."""
774
- if field_id in instroke_private_field_ids:
775
- return INSTROKE_DEV_DATA_IDX
776
- return DEV_DATA_IDX
776
+ instroke_row_points = None # per row: real samples of the HandleForceCurve
777
+ axis_row_ok = None # per row: the curve's X-axis is fully known (§6.3)
777
778
 
778
779
  if use_dev:
779
780
  _spec = fitwrite_spec.load_fit_spec()
@@ -854,10 +855,9 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
854
855
 
855
856
  # In-stroke curve export (summary, downsampled, or companion)
856
857
  instroke_curve_cols = []
857
- instroke_summary_arrays = {}
858
858
  instroke_downsampled_arrays = {}
859
859
  col_map = instroke_column_map if instroke_column_map is not None else INSTROKE_COLUMN_MAP
860
- if instroke_export in ('summary', 'downsampled', 'full', 'companion'):
860
+ if instroke_export in ('downsampled', 'full', 'companion'):
861
861
  curve_cols = instroke_columns if instroke_columns is not None else _detect_instroke_columns(df)
862
862
  instroke_curve_cols = [c for c in curve_cols if c in df.columns]
863
863
  # Validate: in-stroke data requires stroke-boundary recording
@@ -869,28 +869,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
869
869
  "Curves are inherently per-stroke and require stroke-boundary recording. "
870
870
  "Use recording_strategy=RECORDING_STRATEGY_STROKE_BOUNDARY (default) or RECORDING_STRATEGY_UNKNOWN."
871
871
  )
872
- if instroke_export == 'summary' and instroke_curve_cols and use_dev:
873
- base_id = _FIT_EXPORT_RAW['instroke_dynamic']['summary_start']
874
- for col in instroke_curve_cols:
875
- canonical = col_map.get(col, col)
876
- try:
877
- summ = _compute_instroke_summary(df, col)
878
- except (ValueError, KeyError, TypeError):
879
- continue
880
- for metric, arr in summ.items():
881
- field_id = base_id
882
- name = '%s_%s' % (canonical, metric)
883
- arr = np.nan_to_num(arr, nan=0.0, posinf=0.0, neginf=0.0)
884
- # UINT16: encoded = value * scale, must be <= 65534. Scale 1 => max display 65534
885
- scale = 1
886
- arr = np.clip(arr, 0, UINT16_MAX_VALID / max(scale, 1))
887
- dev_arrays[field_id] = arr
888
- dev_specs.append((field_id, col, name, BaseType.UINT16, 2, scale, ''))
889
- instroke_private_field_ids.add(field_id)
890
- instroke_summary_arrays.setdefault(col, {})[metric] = field_id
891
- base_id += 1
892
- base_id = (base_id // 10 + 1) * 10
893
- elif instroke_export in ('downsampled', 'full') and instroke_curve_cols and use_dev:
872
+ if instroke_export in ('downsampled', 'full') and instroke_curve_cols and use_dev:
894
873
  for col in instroke_curve_cols:
895
874
  canonical = col_map.get(col, col)
896
875
  if canonical != HANDLE_FORCE_CURVE_NAME:
@@ -911,29 +890,21 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
911
890
  continue
912
891
  arr_2d = np.array(curves_list, dtype=np.float64)
913
892
  size = n_points * 2
893
+ instroke_row_points = _instroke_row_point_counts(df, col, n_points)
914
894
  dev_arrays[base_id] = arr_2d
915
895
  dev_specs.append((base_id, col, canonical, BaseType.UINT16, size, y_scale, y_units))
916
896
  instroke_downsampled_arrays[col] = base_id
917
897
 
918
898
  if instroke_export in ('downsampled', 'full') and instroke_downsampled_arrays and use_dev:
919
899
  fit_curve_cols = list(instroke_downsampled_arrays)
920
- nmax = 0
921
- for col in fit_curve_cols:
922
- try:
923
- _, np_ = _get_instroke_curve_for_export(
924
- df, col, instroke_export, instroke_downsample_points
925
- )
926
- nmax = max(nmax, np_)
927
- except (ValueError, KeyError, TypeError):
928
- pass
929
900
  axis_tuples = None
930
- if nmax >= 2:
901
+ if instroke_row_points is not None and instroke_row_points.max() >= 2:
931
902
  axis_abscissa = instroke_abscissa_type
932
903
  if axis_abscissa is None:
933
904
  canonicals = [col_map.get(c, c) for c in fit_curve_cols]
934
905
  axis_abscissa = _default_instroke_abscissa_type(df, canonicals)
935
906
  axis_tuples = _compute_instroke_axis_arrays(
936
- df, nmax, axis_abscissa, instroke_sample_interval_ms)
907
+ df, instroke_row_points, axis_abscissa, instroke_sample_interval_ms)
937
908
  if axis_tuples is None:
938
909
  # A curve without a declared X-axis is not conforming (§6.3): leave it
939
910
  # out of the FIT file (it can still go in the companion JSON file).
@@ -950,6 +921,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
950
921
  instroke_downsampled_arrays.clear()
951
922
  else:
952
923
  ta, interval, pc = axis_tuples
924
+ axis_row_ok = np.nan_to_num(np.asarray(interval, dtype=np.float64)) > 0
953
925
  axis_arrays = [ta, interval, pc]
954
926
  for axis_row, arr in zip(
955
927
  fitwrite_spec.load_fit_spec()['INSTROKE_AXIS_DEV_FIELDS'], axis_arrays):
@@ -1086,14 +1058,9 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1086
1058
  dev_id_msg.application_id = ROWINGDATA_APP_ID
1087
1059
  dev_id_msg.developer_data_index = DEV_DATA_IDX
1088
1060
  builder.add(dev_id_msg)
1089
- if instroke_private_field_ids:
1090
- instroke_id_msg = DeveloperDataIdMessage()
1091
- instroke_id_msg.application_id = INSTROKE_APP_ID
1092
- instroke_id_msg.developer_data_index = INSTROKE_DEV_DATA_IDX
1093
- builder.add(instroke_id_msg)
1094
1061
  for field_id, col, name, base_type, size, scale, units in dev_specs:
1095
1062
  fd_msg = FieldDescriptionMessage()
1096
- fd_msg.developer_data_index = _dev_index_for(field_id)
1063
+ fd_msg.developer_data_index = DEV_DATA_IDX
1097
1064
  fd_msg.field_definition_number = field_id
1098
1065
  fd_msg.fit_base_type_id = base_type.value
1099
1066
  fd_msg.field_name = name
@@ -1135,8 +1102,12 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1135
1102
  )
1136
1103
 
1137
1104
  def _curve_in_row(i):
1105
+ # A curve is written only where its X-axis is fully known: a Record without
1106
+ # a sample interval (e.g. no drive time) carries neither curve nor axis fields.
1138
1107
  curve = dev_arrays.get(HANDLE_FORCE_CURVE_FIELD_ID)
1139
- return curve is not None and curve.ndim == 2 and bool(np.any(np.nan_to_num(curve[i]) != 0))
1108
+ if curve is None or curve.ndim != 2 or not np.any(np.nan_to_num(curve[i]) != 0):
1109
+ return False
1110
+ return axis_row_ok is None or bool(axis_row_ok[i])
1140
1111
 
1141
1112
  def _emit_record(i):
1142
1113
  """Emit a single Record message for row index i."""
@@ -1145,21 +1116,24 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1145
1116
  for field_id, col, name, base_type, size, scale, units in dev_specs:
1146
1117
  if field_id not in dev_arrays:
1147
1118
  continue
1148
- if field_id in INSTROKE_AXIS_FIELD_IDS and not _curve_in_row(i):
1149
- continue # axis metadata only on Records that carry curve data (§6.3)
1119
+ if (field_id in INSTROKE_AXIS_FIELD_IDS
1120
+ or field_id == HANDLE_FORCE_CURVE_FIELD_ID) and not _curve_in_row(i):
1121
+ continue # curve and axis metadata go together, or not at all (§6.3)
1150
1122
  arr = dev_arrays[field_id]
1151
1123
  is_array_field = (base_type == BaseType.UINT16 and size > 2)
1152
1124
  if is_array_field and arr.ndim == 2:
1153
1125
  row = arr[i]
1126
+ if field_id == HANDLE_FORCE_CURVE_FIELD_ID and instroke_row_points is not None:
1127
+ row = row[:int(instroke_row_points[i])] # no padding
1154
1128
  vals = np.nan_to_num(row, nan=0.0, posinf=0.0, neginf=0.0)
1155
1129
  max_phys = UINT16_MAX_VALID / max(scale, 1)
1156
1130
  vals = np.clip(vals, 0, max_phys)
1157
1131
  has_data = np.any(vals != 0)
1158
1132
  if has_data:
1159
1133
  dev = DeveloperField(
1160
- developer_data_index=_dev_index_for(field_id),
1134
+ developer_data_index=DEV_DATA_IDX,
1161
1135
  field_id=field_id,
1162
- size=size,
1136
+ size=len(vals) * 2,
1163
1137
  name=name,
1164
1138
  base_type=base_type,
1165
1139
  scale=scale,
@@ -1175,7 +1149,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1175
1149
  val = int(np.clip(round(val), 0, UINT8_MAX_VALID))
1176
1150
  if val != 0 or field_id in ALWAYS_EMIT_DEV_FIELD_IDS:
1177
1151
  dev = DeveloperField(
1178
- developer_data_index=_dev_index_for(field_id),
1152
+ developer_data_index=DEV_DATA_IDX,
1179
1153
  field_id=field_id,
1180
1154
  size=size,
1181
1155
  name=name,
@@ -1197,8 +1171,8 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1197
1171
  rec.enhanced_speed = float(enhanced_speed[i]) if enhanced_speed[i] > 0 else None
1198
1172
  if hasattr(rec, 'total_cycles'):
1199
1173
  rec.total_cycles = int(stroke_number[i])
1200
- if stroke_distance is not None and hasattr(rec, 'cycle_length16'):
1201
- rec.cycle_length16 = float(stroke_distance[i]) # fit-tool applies scale 100
1174
+ if stroke_distance is not None and stroke_distance[i] > 0:
1175
+ _set_cycle_length16(rec, float(stroke_distance[i]))
1202
1176
  if not (np.isnan(lat[i]) or lat[i] == 0) and not (np.isnan(lon[i]) or lon[i] == 0):
1203
1177
  rec.position_lat = float(lat[i])
1204
1178
  rec.position_long = float(lon[i])
@@ -1326,7 +1300,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
1326
1300
  if instroke_export == 'off' and detected_instroke_cols:
1327
1301
  result = {
1328
1302
  'instroke_columns_available': detected_instroke_cols,
1329
- 'suggestion': 'Re-export with instroke_export="summary", "downsampled", "full", or "companion" to include curve data.'
1303
+ 'suggestion': 'Re-export with instroke_export="downsampled", "full", or "companion" to include curve data.'
1330
1304
  }
1331
1305
  if companion_written_path is not None:
1332
1306
  if result is None:
@@ -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):
81
+ if version not in (1, 2, 3, 4, 5, 6):
82
82
  warnings.warn(
83
- 'fit_export_spec.json version %s may be unsupported (expected 1, 2, 3, 4 or 5)' % version,
83
+ 'fit_export_spec.json version %s may be unsupported (expected 1 to 6)' % version,
84
84
  UserWarning,
85
85
  stacklevel=2,
86
86
  )
@@ -36,12 +36,12 @@ def strip_non_ascii(string):
36
36
  return ''.join(stripped)
37
37
 
38
38
  def _standard_app_ids():
39
- """(standard, private in-stroke) 16-byte application IDs used by fitwrite."""
39
+ """16-byte application ID of the Rowing Data Standard."""
40
40
  try:
41
- from .fitwrite import ROWINGDATA_APP_ID, INSTROKE_APP_ID
41
+ from .fitwrite import ROWINGDATA_APP_ID
42
42
  except (ValueError, ImportError): # pragma: no cover
43
- from fitwrite import ROWINGDATA_APP_ID, INSTROKE_APP_ID
44
- return ROWINGDATA_APP_ID, INSTROKE_APP_ID
43
+ from fitwrite import ROWINGDATA_APP_ID
44
+ return ROWINGDATA_APP_ID
45
45
 
46
46
 
47
47
  # FIT invalid ("no data") value per base type (standard §6.5): read as missing.
@@ -807,6 +807,13 @@ class FITParser(object):
807
807
  'seatcurve': 'seat curve',
808
808
  }
809
809
 
810
+ # fitparse's profile lacks Record field 87 (cycle_length16, UINT16, scale 100, m)
811
+ # and returns it raw as ``unknown_87``.
812
+ if 'unknown_87' in self.df.columns and 'cycle_length16' not in self.df.columns:
813
+ self.df['cycle_length16'] = pd.to_numeric(
814
+ self.df['unknown_87'], errors='coerce').mask(lambda v: v == 65535) / 100.0
815
+ self.df.drop(columns=['unknown_87'], inplace=True)
816
+
810
817
  self.df.rename(columns=newcolnames,inplace=True)
811
818
  self._map_standard_developer_fields()
812
819
  self._apply_lap_intensity()
@@ -821,7 +828,7 @@ class FITParser(object):
821
828
 
822
829
  Files written before protocol version 1 do not carry it (standard §1.5).
823
830
  """
824
- standard_id, _instroke_id = _standard_app_ids()
831
+ standard_id = _standard_app_ids()
825
832
  try:
826
833
  for msg in self.fitfile.get_messages('developer_data_id'):
827
834
  if _app_id_bytes(msg.get_value('application_id')) == standard_id:
@@ -855,7 +862,7 @@ class FITParser(object):
855
862
  application ID and metre-scaled DriveLength; those are reported
856
863
  separately so their older scaling can be honoured.
857
864
  """
858
- standard_id, _instroke_id = _standard_app_ids()
865
+ standard_id = _standard_app_ids()
859
866
  index_to_app = {}
860
867
  try:
861
868
  for msg in self.fitfile.get_messages('developer_data_id'):
@@ -6,7 +6,7 @@ from __future__ import print_function
6
6
  from six.moves import range
7
7
  from six.moves import input
8
8
 
9
- __version__ = "3.8.4"
9
+ __version__ = "3.8.6"
10
10
 
11
11
  from collections import Counter
12
12
 
@@ -3154,7 +3154,6 @@ class rowingdata:
3154
3154
  ``docs/FIT_EXPORT.md``).
3155
3155
  instroke_export : str
3156
3156
  'off' (default): no in-stroke curve export.
3157
- 'summary': export q1,q2,q3,q4,diff,maxpos,minpos per curve as developer fields.
3158
3157
  'downsampled': export fixed-length downsampled curve (UINT16 array) per stroke.
3159
3158
  'full': export full-resolution curve up to 127 points per stroke (FIT size limit).
3160
3159
  'companion': write curve data to .instroke.json sidecar file.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rowingdata
3
- Version: 3.8.4
3
+ Version: 3.8.6
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
@@ -18,6 +18,7 @@ Requires-Dist: fitparse
18
18
  Requires-Dist: fit-tool>=0.9.14
19
19
  Requires-Dist: arrow>=1.0.2
20
20
  Requires-Dist: python-dateutil
21
+ Requires-Dist: six
21
22
  Requires-Dist: docopt
22
23
  Requires-Dist: tqdm
23
24
  Requires-Dist: rowingphysics>=0.2.3
@@ -7,6 +7,7 @@ fitparse
7
7
  fit-tool>=0.9.14
8
8
  arrow>=1.0.2
9
9
  python-dateutil
10
+ six
10
11
  docopt
11
12
  tqdm
12
13
  rowingphysics>=0.2.3
@@ -57,6 +57,7 @@ setup(name='rowingdata',
57
57
  'arrow>=1.0.2',
58
58
  # 'mechanize',
59
59
  'python-dateutil',
60
+ 'six', # imported directly; python-dateutil 4 no longer brings it in
60
61
  'docopt',
61
62
  'tqdm',
62
63
  'rowingphysics>=0.2.3',