batplot 1.8.50__tar.gz → 1.8.52__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 (338) hide show
  1. {batplot-1.8.50 → batplot-1.8.52}/DEVELOPING.md +25 -1
  2. {batplot-1.8.50 → batplot-1.8.52}/PKG-INFO +39 -10
  3. {batplot-1.8.50 → batplot-1.8.52}/README.md +36 -9
  4. {batplot-1.8.50 → batplot-1.8.52}/batplot/__init__.py +1 -1
  5. {batplot-1.8.50 → batplot-1.8.52}/batplot/args.py +59 -11
  6. {batplot-1.8.50 → batplot-1.8.52}/batplot/batch.py +6 -0
  7. {batplot-1.8.50 → batplot-1.8.52}/batplot/batplot.py +35 -4
  8. {batplot-1.8.50 → batplot-1.8.52}/batplot/cli_save.py +3 -2
  9. {batplot-1.8.50 → batplot-1.8.52}/batplot/color_utils.py +263 -63
  10. {batplot-1.8.50 → batplot-1.8.52}/batplot/config.py +66 -50
  11. batplot-1.8.52/batplot/converters.py +373 -0
  12. {batplot-1.8.50 → batplot-1.8.52}/batplot/data/CHANGELOG.md +15 -0
  13. batplot-1.8.52/batplot/data/latest_release_notes.json +7 -0
  14. {batplot-1.8.50 → batplot-1.8.52}/batplot/dev_upgrade.py +45 -0
  15. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_commands.py +33 -25
  16. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_io.py +28 -6
  17. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_panel_state.py +25 -0
  18. batplot-1.8.52/batplot/plot_modes/batch_session/batch_scoped_sync.py +132 -0
  19. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/common.py +45 -0
  20. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/cpc_batch_helpers.py +296 -53
  21. batplot-1.8.52/batplot/plot_modes/batch_session/dqdv_2d_batch_helpers.py +84 -0
  22. batplot-1.8.52/batplot/plot_modes/batch_session/ec_batch_helpers.py +888 -0
  23. batplot-1.8.52/batplot/plot_modes/batch_session/kinds.py +285 -0
  24. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/load.py +35 -39
  25. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/menu_cpc.py +148 -43
  26. batplot-1.8.52/batplot/plot_modes/batch_session/menu_dqdv_2d.py +468 -0
  27. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/menu_ec.py +75 -37
  28. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/menu_histo.py +47 -9
  29. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/menu_operando.py +149 -32
  30. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/menu_xy.py +317 -57
  31. batplot-1.8.52/batplot/plot_modes/batch_session/operando_batch_helpers.py +1348 -0
  32. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/routing.py +3 -5
  33. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/xy_batch_helpers.py +129 -30
  34. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/axis_state.py +81 -10
  35. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/batch_font.py +19 -0
  36. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/font_extras.py +10 -0
  37. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/fonts.py +12 -0
  38. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/interactive_state.py +15 -17
  39. batplot-1.8.52/batplot/plot_modes/common/line_dash.py +110 -0
  40. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/menus.py +53 -28
  41. batplot-1.8.52/batplot/plot_modes/common/session_data_guarantee.py +197 -0
  42. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/session_helpers.py +209 -3
  43. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/session_key_smoke.py +1 -0
  44. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/sources.py +23 -9
  45. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/spines.py +219 -63
  46. batplot-1.8.52/batplot/plot_modes/common/title_offsets.py +172 -0
  47. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/actions.py +150 -114
  48. batplot-1.8.52/batplot/plot_modes/cpc/add_file.py +552 -0
  49. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/colors.py +116 -35
  50. batplot-1.8.52/batplot/plot_modes/cpc/interactive.py +1114 -0
  51. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/labels.py +69 -21
  52. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/legend.py +35 -11
  53. batplot-1.8.52/batplot/plot_modes/cpc/legend_order.py +199 -0
  54. batplot-1.8.52/batplot/plot_modes/cpc/load.py +277 -0
  55. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/menu.py +2 -0
  56. batplot-1.8.52/batplot/plot_modes/cpc/panel_menus.py +700 -0
  57. batplot-1.8.52/batplot/plot_modes/cpc/routing.py +394 -0
  58. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/session.py +318 -187
  59. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/snapshots.py +58 -16
  60. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/style.py +146 -117
  61. batplot-1.8.52/batplot/plot_modes/cpc/wasd_menu.py +326 -0
  62. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/actions.py +52 -19
  63. batplot-1.8.52/batplot/plot_modes/electrochem/capacity_cum.py +117 -0
  64. batplot-1.8.52/batplot/plot_modes/electrochem/colors.py +889 -0
  65. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/dqdv_2d.py +314 -27
  66. batplot-1.8.52/batplot/plot_modes/electrochem/dual_axis_menu.py +989 -0
  67. batplot-1.8.52/batplot/plot_modes/electrochem/interactive.py +1977 -0
  68. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/labels.py +68 -13
  69. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/legend.py +12 -8
  70. batplot-1.8.52/batplot/plot_modes/electrochem/legend_order.py +145 -0
  71. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/line_style.py +76 -23
  72. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/menu.py +9 -5
  73. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/overview.py +22 -5
  74. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/routing.py +24 -4
  75. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/session.py +585 -310
  76. batplot-1.8.52/batplot/plot_modes/electrochem/smoothing_menu.py +595 -0
  77. batplot-1.8.52/batplot/plot_modes/electrochem/spine_colors.py +165 -0
  78. batplot-1.8.52/batplot/plot_modes/electrochem/style.py +1302 -0
  79. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/style_apply.py +254 -75
  80. batplot-1.8.52/batplot/plot_modes/electrochem/undo_state.py +891 -0
  81. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/actions.py +32 -11
  82. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/colors.py +42 -8
  83. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/density_curve.py +39 -7
  84. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/interactive.py +132 -25
  85. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/labels.py +32 -10
  86. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/line_style.py +13 -12
  87. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/plot.py +7 -4
  88. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/session.py +24 -4
  89. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/spines.py +54 -22
  90. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/y_range.py +7 -5
  91. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/actions.py +30 -11
  92. batplot-1.8.52/batplot/plot_modes/operando/axes_limits_menu.py +628 -0
  93. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/axis_units.py +23 -0
  94. batplot-1.8.52/batplot/plot_modes/operando/cif_menu.py +495 -0
  95. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/colors.py +36 -10
  96. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/grid.py +17 -5
  97. batplot-1.8.52/batplot/plot_modes/operando/intensity_menu.py +296 -0
  98. batplot-1.8.52/batplot/plot_modes/operando/interactive.py +1924 -0
  99. batplot-1.8.52/batplot/plot_modes/operando/ions_axis.py +417 -0
  100. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/labels.py +109 -35
  101. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/layout.py +28 -7
  102. batplot-1.8.52/batplot/plot_modes/operando/line_style.py +199 -0
  103. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/menu.py +3 -1
  104. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/peaks.py +268 -32
  105. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/plot.py +27 -0
  106. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/routing.py +3 -2
  107. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/session.py +351 -109
  108. batplot-1.8.52/batplot/plot_modes/operando/spine_colors.py +227 -0
  109. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/style.py +73 -47
  110. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/style_apply.py +399 -188
  111. batplot-1.8.52/batplot/plot_modes/operando/undo_state.py +1066 -0
  112. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/visibility.py +51 -6
  113. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/actions.py +30 -23
  114. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/arrange.py +13 -0
  115. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/axis_range.py +120 -25
  116. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/axis_units.py +124 -0
  117. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/cif.py +55 -24
  118. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/colors.py +43 -10
  119. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/derivative.py +16 -8
  120. batplot-1.8.52/batplot/plot_modes/xy/full_data.py +416 -0
  121. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/interactive.py +261 -925
  122. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/labels.py +37 -8
  123. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/line_style.py +49 -50
  124. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/menu.py +7 -2
  125. batplot-1.8.52/batplot/plot_modes/xy/offset_menu.py +255 -0
  126. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/peaks.py +11 -3
  127. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/pipeline.py +51 -34
  128. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/session.py +330 -146
  129. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/smoothing.py +40 -0
  130. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/spines.py +88 -22
  131. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/style.py +194 -83
  132. batplot-1.8.52/batplot/plot_modes/xy/undo_state.py +977 -0
  133. batplot-1.8.52/batplot/readers.py +145 -0
  134. batplot-1.8.52/batplot/readers_common.py +127 -0
  135. batplot-1.8.50/batplot/readers.py → batplot-1.8.52/batplot/readers_ec.py +9 -211
  136. batplot-1.8.52/batplot/screen_color.py +950 -0
  137. batplot-1.8.52/batplot/strip_header.py +281 -0
  138. {batplot-1.8.50 → batplot-1.8.52}/batplot/ui.py +617 -73
  139. {batplot-1.8.50 → batplot-1.8.52}/batplot/utils.py +170 -43
  140. {batplot-1.8.50 → batplot-1.8.52}/batplot/version_check.py +1 -3
  141. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/PKG-INFO +39 -10
  142. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/SOURCES.txt +90 -1
  143. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/requires.txt +2 -0
  144. {batplot-1.8.50 → batplot-1.8.52}/pyproject.toml +8 -3
  145. {batplot-1.8.50 → batplot-1.8.52}/tests/test_all_menus_smoke.py +106 -1
  146. batplot-1.8.52/tests/test_batch_all_modes_sync.py +416 -0
  147. batplot-1.8.52/tests/test_batch_geometry_pisb_keys.py +186 -0
  148. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_menu_parity.py +9 -4
  149. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_pisb_contract.py +17 -5
  150. batplot-1.8.52/tests/test_batch_scoped_sync_modes.py +466 -0
  151. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_session.py +305 -10
  152. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_spine_sync.py +14 -5
  153. batplot-1.8.52/tests/test_batch_style_pisb_keys.py +267 -0
  154. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cli_all_flags.py +16 -3
  155. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cli_smoke.py +9 -0
  156. {batplot-1.8.50 → batplot-1.8.52}/tests/test_color_listing_visible.py +11 -5
  157. {batplot-1.8.50 → batplot-1.8.52}/tests/test_common_palettes.py +6 -1
  158. batplot-1.8.52/tests/test_convert_xrd.py +143 -0
  159. batplot-1.8.52/tests/test_cpc_add_file.py +332 -0
  160. batplot-1.8.52/tests/test_cpc_legend_order.py +263 -0
  161. batplot-1.8.52/tests/test_cross_os_oe_paths.py +158 -0
  162. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cross_platform_parity.py +34 -0
  163. batplot-1.8.52/tests/test_deep_residual_pisb_gates.py +268 -0
  164. batplot-1.8.52/tests/test_deep_round10_bc_safe.py +52 -0
  165. batplot-1.8.52/tests/test_deep_round11_title_fidelity.py +103 -0
  166. batplot-1.8.52/tests/test_deep_round12_commercial_gates.py +122 -0
  167. batplot-1.8.52/tests/test_deep_round13_final_key_audit.py +138 -0
  168. batplot-1.8.52/tests/test_deep_round3_pisb_gates.py +225 -0
  169. batplot-1.8.52/tests/test_deep_round4_pisb_gates.py +145 -0
  170. batplot-1.8.52/tests/test_deep_round5_pisb_gates.py +168 -0
  171. batplot-1.8.52/tests/test_deep_round6_session_fidelity.py +136 -0
  172. batplot-1.8.52/tests/test_deep_round7_root_helpers.py +120 -0
  173. batplot-1.8.52/tests/test_deep_round8_root_helpers.py +104 -0
  174. batplot-1.8.52/tests/test_deep_round9_root_helpers.py +88 -0
  175. batplot-1.8.52/tests/test_default_sizes_and_oe_persistence.py +223 -0
  176. {batplot-1.8.50 → batplot-1.8.52}/tests/test_dqdv_contour_session_keys.py +41 -0
  177. batplot-1.8.52/tests/test_dqdv_smooth_status.py +94 -0
  178. batplot-1.8.52/tests/test_dual_axis_menu_audit.py +263 -0
  179. batplot-1.8.52/tests/test_dual_mode_pisb.py +351 -0
  180. batplot-1.8.52/tests/test_dual_pisb_hard_gates.py +285 -0
  181. batplot-1.8.52/tests/test_dual_tk_a_coupling.py +266 -0
  182. batplot-1.8.52/tests/test_dual_top_wasd_both_layers.py +315 -0
  183. batplot-1.8.52/tests/test_ec_cpc_geometry_pisb_keys.py +486 -0
  184. batplot-1.8.52/tests/test_ec_cpc_style_pisb_keys.py +296 -0
  185. batplot-1.8.52/tests/test_ec_cycle_identity_roundtrip.py +208 -0
  186. batplot-1.8.52/tests/test_ec_multifile_color_menu.py +310 -0
  187. {batplot-1.8.50 → batplot-1.8.52}/tests/test_ec_roundtrip.py +1 -0
  188. batplot-1.8.52/tests/test_ec_session_bc_new_keys.py +202 -0
  189. batplot-1.8.52/tests/test_every_key_behavioral_walk.py +562 -0
  190. batplot-1.8.52/tests/test_final_audit_residuals.py +142 -0
  191. batplot-1.8.52/tests/test_full_menu_audit_gaps.py +145 -0
  192. batplot-1.8.52/tests/test_gc_cumulative.py +103 -0
  193. batplot-1.8.52/tests/test_hard_check_twin_and_batch.py +151 -0
  194. batplot-1.8.52/tests/test_histo_geometry_pisb_keys.py +274 -0
  195. batplot-1.8.52/tests/test_histo_style_pisb_keys.py +299 -0
  196. batplot-1.8.52/tests/test_interactive_handler_intent.py +250 -0
  197. {batplot-1.8.50 → batplot-1.8.52}/tests/test_interactive_menu_smoke.py +144 -13
  198. {batplot-1.8.50 → batplot-1.8.52}/tests/test_interactive_state.py +53 -1
  199. batplot-1.8.52/tests/test_line_dash_styles.py +282 -0
  200. {batplot-1.8.50 → batplot-1.8.52}/tests/test_menu_handler_imports.py +7 -0
  201. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_batch_menu.py +1 -1
  202. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_cif_add.py +8 -7
  203. batplot-1.8.52/tests/test_operando_geometry_pisb_keys.py +265 -0
  204. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_layout_menu.py +1 -1
  205. batplot-1.8.52/tests/test_operando_peaks_axis_units.py +121 -0
  206. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_roundtrip.py +203 -15
  207. batplot-1.8.52/tests/test_operando_spine_isolation.py +144 -0
  208. batplot-1.8.52/tests/test_operando_style_pisb_keys.py +213 -0
  209. {batplot-1.8.50 → batplot-1.8.52}/tests/test_pisb_deep_all_modes.py +14 -4
  210. batplot-1.8.52/tests/test_recent_axis_names.py +248 -0
  211. batplot-1.8.52/tests/test_screen_color.py +195 -0
  212. batplot-1.8.52/tests/test_screen_color_pisb.py +62 -0
  213. batplot-1.8.52/tests/test_secondary_spine_colors.py +60 -0
  214. {batplot-1.8.50 → batplot-1.8.52}/tests/test_session_backward_compat.py +6 -0
  215. batplot-1.8.52/tests/test_session_full_data_guarantee.py +453 -0
  216. batplot-1.8.52/tests/test_session_save_integrity.py +240 -0
  217. batplot-1.8.52/tests/test_session_style_restore_parity.py +331 -0
  218. batplot-1.8.52/tests/test_spine_colors_pisb.py +283 -0
  219. batplot-1.8.52/tests/test_spine_wasd_pisb_all_modes.py +435 -0
  220. batplot-1.8.52/tests/test_strip_header.py +104 -0
  221. batplot-1.8.52/tests/test_stupid_input_hardening.py +88 -0
  222. batplot-1.8.52/tests/test_style_import_integrity.py +144 -0
  223. batplot-1.8.52/tests/test_tick_visibility_save_truth.py +166 -0
  224. batplot-1.8.52/tests/test_undo_stack_integrity.py +201 -0
  225. batplot-1.8.52/tests/test_xrd_crosshair_bragg.py +53 -0
  226. {batplot-1.8.50 → batplot-1.8.52}/tests/test_xy_axis_units.py +28 -0
  227. batplot-1.8.52/tests/test_xy_full_data_retention.py +134 -0
  228. batplot-1.8.52/tests/test_xy_geometry_pisb_keys.py +372 -0
  229. {batplot-1.8.50 → batplot-1.8.52}/tests/test_xy_modules.py +7 -1
  230. batplot-1.8.52/tests/test_xy_offset_menu.py +65 -0
  231. batplot-1.8.52/tests/test_xy_style_pisb_keys.py +339 -0
  232. batplot-1.8.50/batplot/converters.py +0 -366
  233. batplot-1.8.50/batplot/data/latest_release_notes.json +0 -9
  234. batplot-1.8.50/batplot/plot_modes/batch_session/ec_batch_helpers.py +0 -469
  235. batplot-1.8.50/batplot/plot_modes/batch_session/kinds.py +0 -48
  236. batplot-1.8.50/batplot/plot_modes/batch_session/operando_batch_helpers.py +0 -472
  237. batplot-1.8.50/batplot/plot_modes/common/title_offsets.py +0 -65
  238. batplot-1.8.50/batplot/plot_modes/cpc/interactive.py +0 -1742
  239. batplot-1.8.50/batplot/plot_modes/cpc/routing.py +0 -544
  240. batplot-1.8.50/batplot/plot_modes/electrochem/colors.py +0 -864
  241. batplot-1.8.50/batplot/plot_modes/electrochem/interactive.py +0 -3385
  242. batplot-1.8.50/batplot/plot_modes/electrochem/legend_order.py +0 -56
  243. batplot-1.8.50/batplot/plot_modes/electrochem/spine_colors.py +0 -108
  244. batplot-1.8.50/batplot/plot_modes/electrochem/style.py +0 -705
  245. batplot-1.8.50/batplot/plot_modes/operando/interactive.py +0 -3980
  246. batplot-1.8.50/batplot/plot_modes/operando/ions_axis.py +0 -141
  247. batplot-1.8.50/batplot/plot_modes/operando/line_style.py +0 -106
  248. batplot-1.8.50/tests/test_batch_all_modes_sync.py +0 -134
  249. {batplot-1.8.50 → batplot-1.8.52}/LICENSE +0 -0
  250. {batplot-1.8.50 → batplot-1.8.52}/MANIFEST.in +0 -0
  251. {batplot-1.8.50 → batplot-1.8.52}/NOTICE +0 -0
  252. {batplot-1.8.50 → batplot-1.8.52}/batplot/_mpl_backend.py +0 -0
  253. {batplot-1.8.50 → batplot-1.8.52}/batplot/canvas_interactive.py +0 -0
  254. {batplot-1.8.50 → batplot-1.8.52}/batplot/cif.py +0 -0
  255. {batplot-1.8.50 → batplot-1.8.52}/batplot/cli.py +0 -0
  256. {batplot-1.8.50 → batplot-1.8.52}/batplot/ec_common.py +0 -0
  257. {batplot-1.8.50 → batplot-1.8.52}/batplot/modes.py +0 -0
  258. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/__init__.py +0 -0
  259. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/__init__.py +0 -0
  260. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_crosshair.py +0 -0
  261. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_figure_io.py +0 -0
  262. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_geom_helpers.py +0 -0
  263. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_menu_helpers.py +0 -0
  264. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/batch_menu_io.py +0 -0
  265. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/batch_session/histo_batch_helpers.py +0 -0
  266. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/__init__.py +0 -0
  267. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/crosshair_export.py +0 -0
  268. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/files.py +0 -0
  269. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/menu_rendering.py +0 -0
  270. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/overview_metrics.py +0 -0
  271. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/palettes.py +0 -0
  272. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/size_spec.py +0 -0
  273. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/smoothing.py +0 -0
  274. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/state_capture.py +0 -0
  275. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/style_routing.py +0 -0
  276. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/common/terminal.py +0 -0
  277. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/__init__.py +0 -0
  278. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/cpc/overview.py +0 -0
  279. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/__init__.py +0 -0
  280. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/electrochem/export.py +0 -0
  281. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/__init__.py +0 -0
  282. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/fonts.py +0 -0
  283. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/load.py +0 -0
  284. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/routing.py +0 -0
  285. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/toggles.py +0 -0
  286. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/histo/wizard.py +0 -0
  287. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/__init__.py +0 -0
  288. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/operando/layout_menu.py +0 -0
  289. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/session_routing.py +0 -0
  290. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/__init__.py +0 -0
  291. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/data_ops.py +0 -0
  292. {batplot-1.8.50 → batplot-1.8.52}/batplot/plot_modes/xy/game.py +0 -0
  293. {batplot-1.8.50 → batplot-1.8.52}/batplot/plotting.py +0 -0
  294. {batplot-1.8.50 → batplot-1.8.52}/batplot/readers_xrd.py +0 -0
  295. {batplot-1.8.50 → batplot-1.8.52}/batplot/session.py +0 -0
  296. {batplot-1.8.50 → batplot-1.8.52}/batplot/showcol.py +0 -0
  297. {batplot-1.8.50 → batplot-1.8.52}/batplot/style.py +0 -0
  298. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/dependency_links.txt +0 -0
  299. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/entry_points.txt +0 -0
  300. {batplot-1.8.50 → batplot-1.8.52}/batplot.egg-info/top_level.txt +0 -0
  301. {batplot-1.8.50 → batplot-1.8.52}/setup.cfg +0 -0
  302. {batplot-1.8.50 → batplot-1.8.52}/setup.py +0 -0
  303. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_crosshair.py +0 -0
  304. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_ec_cycles_status.py +0 -0
  305. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_font_menu.py +0 -0
  306. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_geom_menu.py +0 -0
  307. {batplot-1.8.50 → batplot-1.8.52}/tests/test_batch_panel_status.py +0 -0
  308. {batplot-1.8.50 → batplot-1.8.52}/tests/test_bc_new_fields_defaults.py +0 -0
  309. {batplot-1.8.50 → batplot-1.8.52}/tests/test_bruker_intensity.py +0 -0
  310. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cif_tick_crystallography.py +0 -0
  311. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cli_save.py +0 -0
  312. {batplot-1.8.50 → batplot-1.8.52}/tests/test_color_display_hex.py +0 -0
  313. {batplot-1.8.50 → batplot-1.8.52}/tests/test_color_utils.py +0 -0
  314. {batplot-1.8.50 → batplot-1.8.52}/tests/test_common_files.py +0 -0
  315. {batplot-1.8.50 → batplot-1.8.52}/tests/test_contracts.py +0 -0
  316. {batplot-1.8.50 → batplot-1.8.52}/tests/test_cpc_roundtrip.py +0 -0
  317. {batplot-1.8.50 → batplot-1.8.52}/tests/test_critical_stability_fixes.py +0 -0
  318. {batplot-1.8.50 → batplot-1.8.52}/tests/test_crosshair_export.py +0 -0
  319. {batplot-1.8.50 → batplot-1.8.52}/tests/test_csv_readers.py +0 -0
  320. {batplot-1.8.50 → batplot-1.8.52}/tests/test_deep_noninteractive_bugs.py +0 -0
  321. {batplot-1.8.50 → batplot-1.8.52}/tests/test_dev_upgrade.py +0 -0
  322. {batplot-1.8.50 → batplot-1.8.52}/tests/test_histo.py +0 -0
  323. {batplot-1.8.50 → batplot-1.8.52}/tests/test_histo_interactive_imports.py +0 -0
  324. {batplot-1.8.50 → batplot-1.8.52}/tests/test_imk_stderr_guard.py +0 -0
  325. {batplot-1.8.50 → batplot-1.8.52}/tests/test_menu_prompt_order.py +0 -0
  326. {batplot-1.8.50 → batplot-1.8.52}/tests/test_mpl_backend.py +0 -0
  327. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_axis_units.py +0 -0
  328. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_cif_color.py +0 -0
  329. {batplot-1.8.50 → batplot-1.8.52}/tests/test_operando_submenu_smoke.py +0 -0
  330. {batplot-1.8.50 → batplot-1.8.52}/tests/test_overview_metrics.py +0 -0
  331. {batplot-1.8.50 → batplot-1.8.52}/tests/test_pi_axis_units_persistence.py +0 -0
  332. {batplot-1.8.50 → batplot-1.8.52}/tests/test_session_font_restore.py +0 -0
  333. {batplot-1.8.50 → batplot-1.8.52}/tests/test_state_capture.py +0 -0
  334. {batplot-1.8.50 → batplot-1.8.52}/tests/test_style_routing.py +0 -0
  335. {batplot-1.8.50 → batplot-1.8.52}/tests/test_undo_deep_all_modes.py +0 -0
  336. {batplot-1.8.50 → batplot-1.8.52}/tests/test_xy_cif_add.py +0 -0
  337. {batplot-1.8.50 → batplot-1.8.52}/tests/test_xy_roundtrip.py +0 -0
  338. {batplot-1.8.50 → batplot-1.8.52}/tests/test_xy_source_files.py +0 -0
@@ -112,6 +112,9 @@ Important files:
112
112
  - `colors.py`, `line_style.py`, `labels.py`, `axis_range.py`, `smoothing.py`,
113
113
  `derivative.py`, `peaks.py`, `cif.py`, `data_ops.py`, `arrange.py`: focused
114
114
  XY features.
115
+ - `undo_state.py`: undo snapshot capture/restore (`xy_push_state` /
116
+ `xy_restore_state`), called through thin wrappers in `interactive.py`.
117
+ - `offset_menu.py`: the `o` curve-offset submenu.
115
118
 
116
119
  ### Electrochemistry Mode
117
120
 
@@ -125,6 +128,10 @@ Important files:
125
128
  - `dqdv_2d.py`: dQ/dV 2D companion contour persistence and helpers.
126
129
  - `style.py`, `colors.py`, `line_style.py`, `labels.py`, `legend.py`,
127
130
  `legend_order.py`, `spine_colors.py`: EC styling features.
131
+ - `undo_state.py`: undo snapshot capture/restore (`ec_push_state` /
132
+ `ec_restore_state`), called through thin wrappers in `interactive.py`.
133
+ - `dual_axis_menu.py`: the `a` capacity/ions/dual-X submenu.
134
+ - `smoothing_menu.py`: the `sm` dQ/dV smoothing submenu.
128
135
 
129
136
  Shared EC/CPC defaults live in `batplot/ec_common.py`. Canvas size, plot layout,
130
137
  and mass-resolution behavior should be changed there when the goal is parity
@@ -141,6 +148,9 @@ Important files:
141
148
  - `interactive.py`: CPC-specific interactive command loop.
142
149
  - `actions.py`: save/export/undo actions.
143
150
  - `legend.py`, `colors.py`, `labels.py`, `snapshots.py`: CPC-specific behavior.
151
+ - `wasd_menu.py`: the `t` WASD spine/tick/label toggle submenu.
152
+ - `panel_menus.py`: the `v`/`k`/`d`/`ry`/`l`/`m`/`ie` submenus (visibility,
153
+ spine colors, display mode, efficiency axis, widths, markers, inversion).
144
154
  - `session.py`: public CPC session wrappers.
145
155
 
146
156
  CPC shares several expectations with EC but has a second y-axis and scatter
@@ -162,6 +172,12 @@ Important files:
162
172
  display behavior.
163
173
  - `style.py`, `colors.py`, `labels.py`, `line_style.py`, `peaks.py`: styling
164
174
  and annotation behavior.
175
+ - `undo_state.py`: undo snapshot capture/restore (`op_snapshot` /
176
+ `op_restore`), called through thin wrappers in `interactive.py`.
177
+ - `cif_menu.py`: the `c` CIF tick-label submenu.
178
+ - `axes_limits_menu.py`: the `ox`/`oy`/`et`/`ex`/`ey` range and ions/time
179
+ submenus.
180
+ - `intensity_menu.py`: the `oz` color-scale submenu (including the drag bar).
165
181
  - `session.py`: public operando session wrappers.
166
182
 
167
183
  Operando state has more moving parts than the other modes. Keep changes focused
@@ -171,7 +187,15 @@ and add round-trip tests for persistence changes.
171
187
 
172
188
  ### Readers
173
189
 
174
- File parsing lives primarily in `batplot/readers.py`.
190
+ File parsing lives primarily in `batplot/readers.py`, which re-exports every
191
+ public reader so `from batplot.readers import ...` always works. The
192
+ implementations are split by area:
193
+
194
+ - `readers.py`: generic CSV/XY readers plus the re-export facade.
195
+ - `readers_ec.py`: electrochemistry readers (BioLogic, Neware, Landt, CS-B,
196
+ BATX, dQ/dV numerics, time-voltage).
197
+ - `readers_xrd.py`: XRD vendor formats.
198
+ - `readers_common.py`: low-level numeric parsing helpers shared by the above.
175
199
 
176
200
  Add a reader here when:
177
201
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: batplot
3
- Version: 1.8.50
3
+ Version: 1.8.52
4
4
  Summary: Interactive plotting tool for material science (1D plot) and electrochemistry (GC, CV, dQ/dV, CPC, operando) with batch processing
5
5
  Author-email: Tian Dai <tianda@uio.no>
6
6
  License: MIT License
@@ -45,10 +45,12 @@ License-File: LICENSE
45
45
  License-File: NOTICE
46
46
  Requires-Dist: numpy>=1.21.0
47
47
  Requires-Dist: matplotlib>=3.5.0
48
+ Requires-Dist: scipy>=1.7.0
48
49
  Requires-Dist: rich>=10.0.0
49
50
  Requires-Dist: openpyxl>=3.0.0
50
51
  Provides-Extra: test
51
52
  Requires-Dist: pytest>=7.0; extra == "test"
53
+ Requires-Dist: pytest-timeout>=2.0; extra == "test"
52
54
  Requires-Dist: basedpyright>=1.28.0; extra == "test"
53
55
  Dynamic: license-file
54
56
 
@@ -71,6 +73,7 @@ With a single line of command to easily plot publication-ready plots with custom
71
73
  - **Style Management**: Import/export plot styles as `.bps`/`.bpsg` files (histogram: `.bpsh`)
72
74
  - **Batch Processing**: Export each file separately with `--all`
73
75
  - **Column preview**: `--showcol` prints numbered columns, header names when found, and the first 10 values per column (CSV, Excel, text, .mpt, .brml, Bruker .raw, etc.)
76
+ - **Strip header lines**: `--strip-header N` removes the first N lines from a file or a folder of files (with `--ext`) and writes copies into a `stripped/` subfolder (originals untouched)
74
77
 
75
78
  ## Installation
76
79
 
@@ -83,7 +86,6 @@ pip install batplot
83
86
 
84
87
  - Tutorial: https://drive.google.com/file/d/1NTFJWNBbWW4mgz0H5ZelGjuOBWxoFgkr/view
85
88
  - Tutorial files: https://github.com/chem-plot/batplot/blob/main/batplot_tutorial.zip
86
- - Manual: https://github.com/chem-plot/batplot/blob/main/batplot_user_manual.pdf
87
89
 
88
90
  ---
89
91
 
@@ -111,20 +113,41 @@ batplot pattern.xye --xaxis 2theta --out figure
111
113
  batplot pattern.txt --xaxis Energy --out figure.png
112
114
  ```
113
115
 
114
- ### Wavelength and Q conversion for XRD data
116
+ ### Strip header lines (export copies)
115
117
 
116
118
  ```bash
117
- # Convert to Q using wavelength (Å), --xaxis is no longer needed as providing wavelength is implying that user wants to convert and plot the data in Q space
118
- batplot data.raw --wl 1.5406 --i
119
+ # Single file: drop first 5 lines ./stripped/data.txt
120
+ batplot data.txt --strip-header 5
121
+
122
+ # Folder: only .xy files → folder/stripped/*.xy
123
+ batplot /path/to/folder --strip-header 3 --ext .xy
124
+
125
+ # Multiple extensions (comma-separated)
126
+ batplot /path/to/folder --strip-header 2 --ext .xy,.dat,.txt
127
+ ```
128
+
129
+ Originals are never modified. Binary formats (`.brml`, `.raw`, `.xlsx`, …) are skipped.
130
+
131
+ ### Wavelength and XRD unit conversion (plot vs export)
119
132
 
120
- # Per-file wavelength: file.xye:1.54, in this case --xaxis is also not needed and files will be plotted in Q space
133
+ ```bash
134
+ # Plot: convert 2θ→Q for display (λ in Å). --xaxis not needed when --wl / file:λ is given
135
+ batplot data.raw --wl 1.5406 --i
121
136
  batplot scan1.brml:1.5406 scan2.xye:0.7093 --i
122
137
 
123
- # Convert and export to converted/ subfolder (q and Q equivalent)
124
- batplot data.xye --convert 1.54 q
125
- batplot data.qye --convert q 1.54
138
+ # Export: --convert writes into a converted/ subfolder next to each input
139
+ # Units: q|Q, d|D, 2theta|2th|tth — or a number = 2θ at that wavelength
140
+ batplot data.xye --convert 1.54 q # 2θ(λ=1.54) → Q → *.qye
141
+ batplot data.qye --convert q 1.54 # Q → 2θ(λ=1.54) → *.xy
142
+ batplot data.qye --convert q d # Q ↔ d (no λ)
143
+ batplot data.xy --convert d 2theta --wl 1.5406
144
+ batplot data.xye --convert 0.26 1.54 # 2θ(λ1) → 2θ(λ2)
145
+
146
+ # Folder of .xy → Q with typed extension filter / output extension
147
+ batplot /path/to/folder --ext .xy --convert 0.26 q
148
+ batplot /path/to/folder --ext xy --convert 2theta q --wl 0.26 --convert-ext .qye
126
149
 
127
- # With --readcol for custom column layout (e.g. 2θ in col 3, intensity in col 4)
150
+ # Custom columns when converting
128
151
  batplot data.csv --readcol 3 4 --convert 1.54 q
129
152
  batplot f1.txt --readcol 2 3 f2.txt --readcol 5 6 --convert 1.54 q
130
153
  ```
@@ -242,10 +265,16 @@ batplot file1.csv file2.csv --gc --save
242
265
 
243
266
  GC mode plots potential vs. capacity for each charge/discharge cycle—the primary visualization for battery cycling data. Batplot automatically detects cycles from Neware `.csv` or Biologic `.mpt` files, assigns each cycle a distinct color, and supports both specific capacity (mAh/g) and raw capacity. For `.mpt` files, pass `--mass` (mg) to compute specific capacity. Discontinuous or paused experiments are handled by splitting data into contiguous charge/discharge segments. Use the interactive menu to customize colors, visibility, and export.
244
267
 
268
+ By default each half-cycle resets capacity near 0 (cycles overlaid). With `--gc --cum`, capacity is laid **end-to-end** (cumulative / throughput capacity) so charge and discharge connect from the start to the end of the experiment; cycle colors, multifile overlay, overview, display mode, style/session save, and `--ro` still apply.
269
+
245
270
  ```bash
246
271
  # From .csv (capacity in file)
247
272
  batplot battery.csv --gc --i
248
273
 
274
+ # Cumulative capacity (charge/discharge connected end-to-end)
275
+ batplot battery.csv --gc --cum --i
276
+ batplot f1.csv f2.csv --gc --cum --i
277
+
249
278
  # From .mpt (requires --mass in mg)
250
279
  batplot battery.mpt --gc --mass 7.0 --i
251
280
 
@@ -17,6 +17,7 @@ With a single line of command to easily plot publication-ready plots with custom
17
17
  - **Style Management**: Import/export plot styles as `.bps`/`.bpsg` files (histogram: `.bpsh`)
18
18
  - **Batch Processing**: Export each file separately with `--all`
19
19
  - **Column preview**: `--showcol` prints numbered columns, header names when found, and the first 10 values per column (CSV, Excel, text, .mpt, .brml, Bruker .raw, etc.)
20
+ - **Strip header lines**: `--strip-header N` removes the first N lines from a file or a folder of files (with `--ext`) and writes copies into a `stripped/` subfolder (originals untouched)
20
21
 
21
22
  ## Installation
22
23
 
@@ -29,7 +30,6 @@ pip install batplot
29
30
 
30
31
  - Tutorial: https://drive.google.com/file/d/1NTFJWNBbWW4mgz0H5ZelGjuOBWxoFgkr/view
31
32
  - Tutorial files: https://github.com/chem-plot/batplot/blob/main/batplot_tutorial.zip
32
- - Manual: https://github.com/chem-plot/batplot/blob/main/batplot_user_manual.pdf
33
33
 
34
34
  ---
35
35
 
@@ -57,20 +57,41 @@ batplot pattern.xye --xaxis 2theta --out figure
57
57
  batplot pattern.txt --xaxis Energy --out figure.png
58
58
  ```
59
59
 
60
- ### Wavelength and Q conversion for XRD data
60
+ ### Strip header lines (export copies)
61
61
 
62
62
  ```bash
63
- # Convert to Q using wavelength (Å), --xaxis is no longer needed as providing wavelength is implying that user wants to convert and plot the data in Q space
64
- batplot data.raw --wl 1.5406 --i
63
+ # Single file: drop first 5 lines ./stripped/data.txt
64
+ batplot data.txt --strip-header 5
65
+
66
+ # Folder: only .xy files → folder/stripped/*.xy
67
+ batplot /path/to/folder --strip-header 3 --ext .xy
68
+
69
+ # Multiple extensions (comma-separated)
70
+ batplot /path/to/folder --strip-header 2 --ext .xy,.dat,.txt
71
+ ```
72
+
73
+ Originals are never modified. Binary formats (`.brml`, `.raw`, `.xlsx`, …) are skipped.
74
+
75
+ ### Wavelength and XRD unit conversion (plot vs export)
65
76
 
66
- # Per-file wavelength: file.xye:1.54, in this case --xaxis is also not needed and files will be plotted in Q space
77
+ ```bash
78
+ # Plot: convert 2θ→Q for display (λ in Å). --xaxis not needed when --wl / file:λ is given
79
+ batplot data.raw --wl 1.5406 --i
67
80
  batplot scan1.brml:1.5406 scan2.xye:0.7093 --i
68
81
 
69
- # Convert and export to converted/ subfolder (q and Q equivalent)
70
- batplot data.xye --convert 1.54 q
71
- batplot data.qye --convert q 1.54
82
+ # Export: --convert writes into a converted/ subfolder next to each input
83
+ # Units: q|Q, d|D, 2theta|2th|tth — or a number = 2θ at that wavelength
84
+ batplot data.xye --convert 1.54 q # 2θ(λ=1.54) → Q → *.qye
85
+ batplot data.qye --convert q 1.54 # Q → 2θ(λ=1.54) → *.xy
86
+ batplot data.qye --convert q d # Q ↔ d (no λ)
87
+ batplot data.xy --convert d 2theta --wl 1.5406
88
+ batplot data.xye --convert 0.26 1.54 # 2θ(λ1) → 2θ(λ2)
89
+
90
+ # Folder of .xy → Q with typed extension filter / output extension
91
+ batplot /path/to/folder --ext .xy --convert 0.26 q
92
+ batplot /path/to/folder --ext xy --convert 2theta q --wl 0.26 --convert-ext .qye
72
93
 
73
- # With --readcol for custom column layout (e.g. 2θ in col 3, intensity in col 4)
94
+ # Custom columns when converting
74
95
  batplot data.csv --readcol 3 4 --convert 1.54 q
75
96
  batplot f1.txt --readcol 2 3 f2.txt --readcol 5 6 --convert 1.54 q
76
97
  ```
@@ -188,10 +209,16 @@ batplot file1.csv file2.csv --gc --save
188
209
 
189
210
  GC mode plots potential vs. capacity for each charge/discharge cycle—the primary visualization for battery cycling data. Batplot automatically detects cycles from Neware `.csv` or Biologic `.mpt` files, assigns each cycle a distinct color, and supports both specific capacity (mAh/g) and raw capacity. For `.mpt` files, pass `--mass` (mg) to compute specific capacity. Discontinuous or paused experiments are handled by splitting data into contiguous charge/discharge segments. Use the interactive menu to customize colors, visibility, and export.
190
211
 
212
+ By default each half-cycle resets capacity near 0 (cycles overlaid). With `--gc --cum`, capacity is laid **end-to-end** (cumulative / throughput capacity) so charge and discharge connect from the start to the end of the experiment; cycle colors, multifile overlay, overview, display mode, style/session save, and `--ro` still apply.
213
+
191
214
  ```bash
192
215
  # From .csv (capacity in file)
193
216
  batplot battery.csv --gc --i
194
217
 
218
+ # Cumulative capacity (charge/discharge connected end-to-end)
219
+ batplot battery.csv --gc --cum --i
220
+ batplot f1.csv f2.csv --gc --cum --i
221
+
195
222
  # From .mpt (requires --mass in mg)
196
223
  batplot battery.mpt --gc --mass 7.0 --i
197
224
 
@@ -7,7 +7,7 @@ import importlib.abc
7
7
  import importlib.machinery
8
8
  import sys
9
9
 
10
- __version__ = "1.8.50"
10
+ __version__ = "1.8.52"
11
11
 
12
12
 
13
13
  _LEGACY_MODULE_ALIASES = {
@@ -158,6 +158,7 @@ def _print_general_help() -> None:
158
158
  " [Electrochemistry]\n"
159
159
  " batplot --gc file.mpt --mass 7.0 --i # GC from .mpt\n"
160
160
  " batplot --gc file.csv --i # GC from .csv\n"
161
+ " batplot --gc --cum file.csv --i # GC cumulative capacity (end-to-end)\n"
161
162
  " batplot --dqdv file.csv --i # dQ/dV\n"
162
163
  " batplot --cv file.mpt --i # Cyclic voltammetry\n"
163
164
  " batplot --cpc file.csv --mass 3.52 --i # Capacity per cycle\n\n"
@@ -183,6 +184,8 @@ def _print_general_help() -> None:
183
184
  "More help:\n"
184
185
  " batplot --v # Version and release info (with option to show full release notes)\n"
185
186
  " batplot --showcol FILE [FILE...] # Preview column names + first 10 values per column\n"
187
+ " batplot FILE --strip-header N # Remove first N lines; write to stripped/ subfolder\n"
188
+ " batplot FOLDER --strip-header N --ext .xy # Same for a folder (comma-separated exts ok)\n"
186
189
  " batplot --h # This help\n"
187
190
  " batplot --h xy # XY file plotting guide\n"
188
191
  " batplot --h ec # Electrochemistry (GC/dQdV/CV/CPC) guide\n"
@@ -255,21 +258,33 @@ def _print_xy_help() -> None:
255
258
  " --ro : swap x and y axes (exchange x and y values before plotting)\n"
256
259
  " e.g. --xaxis time --ro plots time as y-axis and potential as x-axis\n"
257
260
  " --wl <float> : set wavelength for Q conversion for all files, e.g. --wl 1.5406\n"
258
- " --convert <from> <to> : convert XRD data and export to 'converted' subfolder:\n"
259
- " - <wl1> <wl2> : convert from wavelength1 to wavelength2\n"
260
- " - <wl> q or Q : convert (with wavelength) to Q space (q and Q equivalent)\n"
261
- " - q or Q <wl> : convert Q space to 2θ (with wavelength)\n"
262
- " Works with --readcol for custom column layout (per-file, per-ext, or global):\n"
261
+ " --strip-header <N> : remove the first N lines from text file(s) and export copies\n"
262
+ " into a 'stripped/' subfolder next to each input (originals untouched).\n"
263
+ " Single file: batplot data.txt --strip-header 5\n"
264
+ " Folder: batplot /path/to/folder --strip-header 3 --ext .xy\n"
265
+ " Multiple exts: batplot folder --strip-header 2 --ext .xy,.dat,.txt\n"
266
+ " (--ext required for folders; optional filter when listing files)\n"
267
+ " --convert <from> <to> : convert XRD x-axis and export to a 'converted/' subfolder:\n"
268
+ " Units: q|Q, d|D, 2theta|2th|tth (or a numeric wavelength = 2θ at that λ)\n"
269
+ " - <wl1> <wl2> : 2θ(λ1) → 2θ(λ2)\n"
270
+ " - <wl> q : 2θ(λ) → Q\n"
271
+ " - q <wl> : Q → 2θ(λ)\n"
272
+ " - q d / d q : Q ↔ d (no λ needed)\n"
273
+ " - <wl> d / d <wl> : 2θ(λ) ↔ d\n"
274
+ " - 2theta q --wl λ : same as `<wl> q` (explicit unit names)\n"
275
+ " Folder of .xy → Q (writes folder/converted/*.qye):\n"
276
+ " batplot /path/to/folder --ext .xy --convert 0.26 q\n"
277
+ " Choose input / output extensions:\n"
278
+ " --ext .xy : only convert this extension in a folder\n"
279
+ " --convert-ext .qye : force output extension (default: .qye for Q, .xy otherwise)\n"
280
+ " With --readcol:\n"
263
281
  " batplot data.csv --readcol 3 4 --convert 1.54 q\n"
264
- " batplot f1.txt --readcol 2 3 f2.txt --readcol 5 6 --convert 1.54 q\n"
265
- " Directory: pass a folder to convert all .xy/.xye/.qye/.dat/.csv/.txt files:\n"
266
- " batplot /path/to/folder --convert 0.25448 1.54\n"
267
- " Batch in current folder: use allfiles token (non-convertible files are skipped):\n"
268
- " batplot allfiles --convert q 1.54\n"
269
282
  " Examples:\n"
270
283
  " batplot file.xye --convert 1.54 0.25\n"
271
284
  " batplot file.xye --convert 1.54 q\n"
285
+ " batplot file.qye --convert q d\n"
272
286
  " batplot file.qye --convert Q 1.54\n"
287
+ " batplot allfiles --ext xy --convert 2theta q --wl 1.5406 --convert-ext qye\n"
273
288
  " File wavelength syntax : specify wavelength(s) per file using colon syntax:\n"
274
289
  " - file:wl : single wavelength (for Q conversion or CIF 2theta calculation)\n"
275
290
  " - file:wl1:wl2 : dual wavelength (convert 2theta→Q using wl1, then Q→2theta using wl2)\n"
@@ -319,6 +334,7 @@ def _print_ec_help() -> None:
319
334
  "GC from supported .csv: specific capacity read directly when available; use --mass for\n"
320
335
  " Neware absolute-capacity files (Cycle Index / Step Index / DataPoint format).\n"
321
336
  " batplot --gc file.csv\n"
337
+ " batplot --gc --cum file.csv --i # Cumulative capacity (charge/discharge end-to-end)\n"
322
338
  " batplot --gc file.csv --mass 3.52 # Neware absolute-capacity CSV\n\n"
323
339
  "Per-file mass: repeat --mass once per file that needs it, in file order.\n"
324
340
  " batplot f1.mpt --mass 6.5 f2.csv f3.mpt --mass 7.0 --gc\n"
@@ -459,6 +475,14 @@ def _add_help_and_entry_arguments(parser: argparse.ArgumentParser) -> None:
459
475
  action="store_true",
460
476
  help=argparse.SUPPRESS,
461
477
  )
478
+ parser.add_argument(
479
+ "--strip-header",
480
+ type=int,
481
+ metavar="N",
482
+ dest="strip_header",
483
+ default=None,
484
+ help=argparse.SUPPRESS,
485
+ )
462
486
  parser.add_argument("--manual", action="store_true", help=argparse.SUPPRESS)
463
487
  parser.add_argument("files", nargs="*", help=argparse.SUPPRESS)
464
488
 
@@ -472,7 +496,26 @@ def _add_xy_arguments(parser: argparse.ArgumentParser) -> None:
472
496
  parser.add_argument("--errors", action="store_true", help=argparse.SUPPRESS)
473
497
  parser.add_argument("--xaxis", type=str, help=argparse.SUPPRESS)
474
498
  parser.add_argument("--convert", nargs=2, metavar=("FROM", "TO"),
475
- help="Convert XRD data: wavelength-to-wavelength (e.g., 1.54 0.25), wavelength-to-Q (e.g., 1.54 q), or Q-to-wavelength (e.g., q 1.54). Exports to 'converted' subfolder.")
499
+ help="Convert XRD data among 2θ/Q/d (or λ1→λ2 for ). Exports to 'converted' subfolder.")
500
+ parser.add_argument(
501
+ "--ext",
502
+ type=str,
503
+ default=None,
504
+ metavar="EXT",
505
+ help=(
506
+ "With --convert or --strip-header: only process files with this extension "
507
+ "(e.g. .xy or xy). For --strip-header, comma-separated lists are allowed "
508
+ "(e.g. .xy,.dat,.txt)."
509
+ ),
510
+ )
511
+ parser.add_argument(
512
+ "--convert-ext",
513
+ type=str,
514
+ default=None,
515
+ metavar="EXT",
516
+ dest="convert_ext",
517
+ help="With --convert: output file extension (e.g. .qye or qye). Default: .qye for Q, .xy otherwise.",
518
+ )
476
519
  parser.add_argument("--extract-brml-scans", nargs="?", const="", metavar="OUT_DIR",
477
520
  help="Extract each XRD scan from .brml file to separate .xy files. Optional OUT_DIR (default: <brml_stem>_scans).")
478
521
  parser.add_argument("--wl", type=float, help=argparse.SUPPRESS)
@@ -512,6 +555,11 @@ def _add_interactive_export_arguments(parser: argparse.ArgumentParser) -> None:
512
555
  def _add_electrochem_arguments(parser: argparse.ArgumentParser) -> None:
513
556
  """Register electrochemistry mode arguments."""
514
557
  parser.add_argument("--gc", action="store_true", help=argparse.SUPPRESS)
558
+ parser.add_argument(
559
+ "--cum",
560
+ action="store_true",
561
+ help="With --gc: plot cumulative (throughput) capacity — charge/discharge laid end-to-end.",
562
+ )
515
563
  parser.add_argument("--mass", type=parse_mass_mg_from_cli, action='append', help=argparse.SUPPRESS)
516
564
  parser.add_argument("--dqdv", action="store_true", help=argparse.SUPPRESS)
517
565
  parser.add_argument("--cv", action="store_true", help=argparse.SUPPRESS)
@@ -40,6 +40,7 @@ def _is_mpt_like_ext(ext: str) -> bool:
40
40
 
41
41
 
42
42
  from .ec_common import _resolve_mass
43
+ from .plot_modes.electrochem.capacity_cum import apply_gc_capacity_mode, stamp_gc_capacity_mode
43
44
  from .utils import _confirm_overwrite, natural_sort_key, ensure_subdirectory
44
45
 
45
46
 
@@ -706,6 +707,10 @@ def batch_process_ec(directory: str, args):
706
707
  x_label = r'Specific Capacity (mAh g$^{-1}$)'
707
708
  else:
708
709
  raise ValueError(f"Unsupported file type for GC: {ext}")
710
+
711
+ cap_x, x_label, _cum_gc = apply_gc_capacity_mode(
712
+ args, cap_x, charge_mask, discharge_mask, x_label
713
+ )
709
714
 
710
715
  # Plot cycles
711
716
  if cycle_numbers is not None:
@@ -758,6 +763,7 @@ def batch_process_ec(directory: str, args):
758
763
  ax_b.set_title(f"{fname}")
759
764
  legend = ax_b.legend(loc='best', fontsize='small', framealpha=0.8, title='Cycle')
760
765
  sync_legend_title_fontsize(legend)
766
+ stamp_gc_capacity_mode(fig_b, cumulative=_cum_gc)
761
767
 
762
768
  # ---- CV Mode ----
763
769
  elif mode == 'cv':
@@ -267,9 +267,19 @@ def _run_convert_route(args) -> int | None:
267
267
  print("Error: --convert requires file(s) or a directory to convert")
268
268
  return 1
269
269
 
270
+ from .converters import normalize_extension
270
271
  from .utils import natural_sort_key
271
272
 
272
- convert_ext = {'.xy', '.xye', '.qye', '.dat', '.csv', '.txt'}
273
+ default_exts = {".xy", ".xye", ".qye", ".dat", ".csv", ".txt"}
274
+ # Optional --ext filters which files in a folder (or among listed files) to convert.
275
+ ext_filter = normalize_extension(getattr(args, "ext", None))
276
+ if ext_filter:
277
+ convert_ext = {ext_filter}
278
+ else:
279
+ convert_ext = set(default_exts)
280
+
281
+ out_ext = normalize_extension(getattr(args, "convert_ext", None))
282
+
273
283
  expanded = []
274
284
  for p in args.files:
275
285
  if os.path.isfile(p):
@@ -277,7 +287,8 @@ def _run_convert_route(args) -> int | None:
277
287
  if ext in convert_ext:
278
288
  expanded.append(p)
279
289
  else:
280
- print(f"Warning: Skipping non-convertible file: {p}")
290
+ want = ext_filter or "supported XRD text"
291
+ print(f"Warning: Skipping file (extension filter {want}): {p}")
281
292
  elif os.path.isdir(p):
282
293
  for f in sorted(os.listdir(p), key=natural_sort_key):
283
294
  fp = os.path.join(p, f)
@@ -286,11 +297,18 @@ def _run_convert_route(args) -> int | None:
286
297
  else:
287
298
  print(f"Warning: Not a file or directory: {p}")
288
299
  if not expanded:
289
- print("Error: No convertible files found (.xy, .xye, .qye, .dat, .csv, .txt)")
300
+ shown = ", ".join(sorted(convert_ext))
301
+ print(f"Error: No convertible files found (looking for: {shown})")
290
302
  return 1
291
303
 
292
304
  from_param, to_param = args.convert
293
- convert_xrd_data(expanded, from_param, to_param, args=args)
305
+ convert_xrd_data(
306
+ expanded,
307
+ from_param,
308
+ to_param,
309
+ args=args,
310
+ out_ext=out_ext,
311
+ )
294
312
  return 0
295
313
 
296
314
 
@@ -396,6 +414,16 @@ def batplot_main() -> int: # type: ignore
396
414
 
397
415
  return run_showcol(args.files)
398
416
 
417
+ # --strip-header: remove leading lines and write copies to stripped/, then exit
418
+ if getattr(args, "strip_header", None) is not None:
419
+ from .strip_header import run_strip_header
420
+
421
+ return run_strip_header(
422
+ args.files or [],
423
+ args.strip_header,
424
+ ext=getattr(args, "ext", None),
425
+ )
426
+
399
427
  # ====================================================================
400
428
  # STEP 2: VALIDATE INPUT
401
429
  # ====================================================================
@@ -416,6 +444,7 @@ def batplot_main() -> int: # type: ignore
416
444
  getattr(args, 'convert', None) is not None, # Conversion mode
417
445
  getattr(args, 'canvas', False), # Canvas combine mode
418
446
  getattr(args, 'extract_brml_scans', None) is not None, # BRML scan extract
447
+ getattr(args, 'strip_header', None) is not None, # Header strip utility
419
448
  ])
420
449
 
421
450
  # If no files AND no special flags, nothing to do
@@ -548,6 +577,8 @@ def batplot_main() -> int: # type: ignore
548
577
  # Normal XY interactive menu is imported from batplot.plot_modes.xy.interactive as `interactive_menu`.
549
578
 
550
579
  # Galvanostatic cycling mode check: .mpt or supported .csv file with --gc flag
580
+ if getattr(args, 'cum', False) and not getattr(args, 'gc', False):
581
+ print("Warning: --cum applies only with --gc (cumulative capacity); ignoring --cum.")
551
582
  if getattr(args, 'gc', False):
552
583
  from .plot_modes.electrochem.routing import handle_gc_mode
553
584
  return handle_gc_mode(args)
@@ -186,7 +186,7 @@ def save_xy_session(
186
186
  from .session import dump_session
187
187
 
188
188
  tick_state = default_flat_tick_state()
189
- dump_session(
189
+ ok = dump_session(
190
190
  target,
191
191
  fig=fig,
192
192
  ax=ax,
@@ -207,7 +207,8 @@ def save_xy_session(
207
207
  show_cif_titles=show_cif_titles,
208
208
  skip_confirm=True,
209
209
  )
210
- fig._last_session_save_path = os.path.abspath(target)
210
+ if not ok:
211
+ raise RuntimeError(f"Failed to save XY session to {target}")
211
212
 
212
213
 
213
214
  @contextmanager