pychemstation 0.8.3__tar.gz → 0.10.0__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 (240) hide show
  1. {pychemstation-0.8.3 → pychemstation-0.10.0}/PKG-INFO +19 -8
  2. {pychemstation-0.8.3 → pychemstation-0.10.0}/README.md +10 -4
  3. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/analysis/__init__.py +4 -0
  4. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/analysis/base_spectrum.py +9 -9
  5. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/analysis/process_report.py +13 -7
  6. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/__init__.py +4 -0
  7. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/control/controllers/__init__.py +6 -2
  8. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/controllers/comm.py +12 -5
  9. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/controllers/devices/device.py +10 -7
  10. pychemstation-0.10.0/pychemstation/control/controllers/devices/injector.py +51 -0
  11. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/controllers/tables/method.py +35 -13
  12. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/controllers/tables/sequence.py +46 -37
  13. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/controllers/tables/table.py +46 -30
  14. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/control/hplc.py +27 -11
  15. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/generated/dad_method.py +1 -1
  16. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/generated/pump_method.py +1 -1
  17. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/utils/chromatogram.py +5 -4
  18. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/injector_types.py +1 -1
  19. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/macro.py +3 -3
  20. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/utils/method_types.py +2 -2
  21. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/parsing.py +1 -0
  22. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/sequence_types.py +3 -3
  23. {pychemstation-0.8.3/pychemstation/analysis → pychemstation-0.10.0/pychemstation/utils}/spec_utils.py +3 -3
  24. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation.egg-info/PKG-INFO +37 -21
  25. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation.egg-info/SOURCES.txt +6 -8
  26. pychemstation-0.10.0/pychemstation.egg-info/requires.txt +14 -0
  27. {pychemstation-0.8.3 → pychemstation-0.10.0}/pyproject.toml +3 -3
  28. pychemstation-0.10.0/setup.cfg +4 -0
  29. {pychemstation-0.8.3 → pychemstation-0.10.0}/setup.py +5 -7
  30. {pychemstation-0.8.3 → pychemstation-0.10.0}/tests/constants.py +50 -28
  31. {pychemstation-0.8.3 → pychemstation-0.10.0}/tests/test_offline_stable.py +20 -2
  32. {pychemstation-0.8.3 → pychemstation-0.10.0}/tests/test_online_stable.py +39 -5
  33. pychemstation-0.10.0/tests/test_runs_stable.py +225 -0
  34. pychemstation-0.8.3/.coverage +0 -0
  35. pychemstation-0.8.3/.gitignore +0 -7
  36. pychemstation-0.8.3/.gitlab-ci.yml +0 -18
  37. pychemstation-0.8.3/CHANGELOG.md +0 -5
  38. pychemstation-0.8.3/CONTRIBUTING.md +0 -98
  39. pychemstation-0.8.3/build/lib/pychemstation/analysis/base_spectrum.py +0 -509
  40. pychemstation-0.8.3/build/lib/pychemstation/analysis/process_report.py +0 -254
  41. pychemstation-0.8.3/build/lib/pychemstation/analysis/spec_utils.py +0 -304
  42. pychemstation-0.8.3/build/lib/pychemstation/analysis/utils.py +0 -63
  43. pychemstation-0.8.3/build/lib/pychemstation/control/__init__.py +0 -4
  44. pychemstation-0.8.3/build/lib/pychemstation/control/comm.py +0 -206
  45. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/comm.py +0 -208
  46. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/devices/column.py +0 -12
  47. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/devices/dad.py +0 -0
  48. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/devices/device.py +0 -23
  49. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/devices/injector.py +0 -117
  50. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/devices/pump.py +0 -43
  51. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/method.py +0 -338
  52. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/sequence.py +0 -190
  53. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/table_controller.py +0 -266
  54. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/tables/method.py +0 -361
  55. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/tables/sequence.py +0 -211
  56. pychemstation-0.8.3/build/lib/pychemstation/control/controllers/tables/table.py +0 -302
  57. pychemstation-0.8.3/build/lib/pychemstation/control/hplc.py +0 -238
  58. pychemstation-0.8.3/build/lib/pychemstation/control/table/__init__.py +0 -3
  59. pychemstation-0.8.3/build/lib/pychemstation/control/table/method.py +0 -274
  60. pychemstation-0.8.3/build/lib/pychemstation/control/table/sequence.py +0 -210
  61. pychemstation-0.8.3/build/lib/pychemstation/control/table/table_controller.py +0 -201
  62. pychemstation-0.8.3/build/lib/pychemstation/generated/dad_method.py +0 -367
  63. pychemstation-0.8.3/build/lib/pychemstation/generated/pump_method.py +0 -519
  64. pychemstation-0.8.3/build/lib/pychemstation/utils/injector_types.py +0 -52
  65. pychemstation-0.8.3/build/lib/pychemstation/utils/macro.py +0 -100
  66. pychemstation-0.8.3/build/lib/pychemstation/utils/parsing.py +0 -290
  67. pychemstation-0.8.3/build/lib/pychemstation/utils/sequence_types.py +0 -54
  68. pychemstation-0.8.3/build/lib/pychemstation/utils/table_types.py +0 -92
  69. pychemstation-0.8.3/build/lib/pychemstation/utils/tray_types.py +0 -163
  70. pychemstation-0.8.3/build/lib/tests/constants.py +0 -88
  71. pychemstation-0.8.3/build/lib/tests/test_comb.py +0 -136
  72. pychemstation-0.8.3/build/lib/tests/test_comm.py +0 -65
  73. pychemstation-0.8.3/build/lib/tests/test_inj.py +0 -39
  74. pychemstation-0.8.3/build/lib/tests/test_method.py +0 -99
  75. pychemstation-0.8.3/build/lib/tests/test_nightly.py +0 -80
  76. pychemstation-0.8.3/build/lib/tests/test_proc_rep.py +0 -52
  77. pychemstation-0.8.3/build/lib/tests/test_runs_stable.py +0 -125
  78. pychemstation-0.8.3/build/lib/tests/test_sequence.py +0 -125
  79. pychemstation-0.8.3/build/lib/tests/test_stable.py +0 -276
  80. pychemstation-0.8.3/doc/index.html +0 -7
  81. pychemstation-0.8.3/doc/pychemstation/analysis/base_spectrum.html +0 -2216
  82. pychemstation-0.8.3/doc/pychemstation/analysis/spec_utils.html +0 -1073
  83. pychemstation-0.8.3/doc/pychemstation/analysis/utils.html +0 -443
  84. pychemstation-0.8.3/doc/pychemstation/analysis.html +0 -244
  85. pychemstation-0.8.3/doc/pychemstation/control/chromatogram.html +0 -863
  86. pychemstation-0.8.3/doc/pychemstation/control/hplc.html +0 -2987
  87. pychemstation-0.8.3/doc/pychemstation/control.html +0 -334
  88. pychemstation-0.8.3/doc/pychemstation/generated.html +0 -3358
  89. pychemstation-0.8.3/doc/pychemstation/utils/chemstation.html +0 -1165
  90. pychemstation-0.8.3/doc/pychemstation/utils/constants.html +0 -301
  91. pychemstation-0.8.3/doc/pychemstation/utils/hplc_param_types.html +0 -2741
  92. pychemstation-0.8.3/doc/pychemstation/utils.html +0 -245
  93. pychemstation-0.8.3/doc/pychemstation.html +0 -356
  94. pychemstation-0.8.3/doc/search.js +0 -46
  95. pychemstation-0.8.3/pychemstation/__init__.py +0 -3
  96. pychemstation-0.8.3/pychemstation/analysis/__init__.py +0 -1
  97. pychemstation-0.8.3/pychemstation/control/README.md +0 -124
  98. pychemstation-0.8.3/pychemstation/control/controllers/README.md +0 -1
  99. pychemstation-0.8.3/pychemstation/control/controllers/__init__.py +0 -7
  100. pychemstation-0.8.3/pychemstation/control/controllers/devices/__init__.py +0 -0
  101. pychemstation-0.8.3/pychemstation/control/controllers/devices/injector.py +0 -117
  102. pychemstation-0.8.3/pychemstation/control/controllers/tables/__init__.py +0 -0
  103. pychemstation-0.8.3/pychemstation/control/controllers/tables/ms.py +0 -21
  104. pychemstation-0.8.3/pychemstation/generated/__init__.py +0 -56
  105. pychemstation-0.8.3/pychemstation/utils/__init__.py +0 -0
  106. pychemstation-0.8.3/pychemstation/utils/chromatogram.py +0 -119
  107. pychemstation-0.8.3/pychemstation/utils/method_types.py +0 -56
  108. pychemstation-0.8.3/pychemstation/utils/pump_types.py +0 -7
  109. pychemstation-0.8.3/pychemstation.egg-info/requires.txt +0 -6
  110. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/0_2025-03-15 19-14-35.PDF +0 -0
  111. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/ACQRES.REG +0 -0
  112. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/CSlbk.ini +0 -5
  113. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DA.M/DAMETHOD.REG +0 -0
  114. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DA.M/INFO.MTH +0 -0
  115. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DA.M/RECALIB.MTH +0 -0
  116. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DA.M/rpthead.txt +0 -63
  117. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1.UV +0 -0
  118. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1A.ch +0 -0
  119. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1A.npz +0 -0
  120. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1B.ch +0 -0
  121. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1B.npz +0 -0
  122. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1C.ch +0 -0
  123. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1C.npz +0 -0
  124. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1D.ch +0 -0
  125. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1D.npz +0 -0
  126. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1E.ch +0 -0
  127. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DAD1E.npz +0 -0
  128. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/DiagResults.REG +0 -0
  129. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/PMP1.AnalyticalResults.drvml +0 -15
  130. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/REPORT01.CSV +0 -0
  131. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/REPORT02.CSV +0 -0
  132. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/REPORT03.CSV +0 -0
  133. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/REPORT04.CSV +0 -0
  134. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/REPORT05.CSV +0 -0
  135. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/RUN.LOG +0 -0
  136. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/Report.TXT +0 -0
  137. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/Report00.CSV +0 -0
  138. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/Report01.xls +0 -0
  139. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/SAMPLE.XML +0 -0
  140. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/SAMPLE.XML.bak +0 -0
  141. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/WLS1.Sampler.scml +0 -22
  142. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/acq.macaml +0 -957
  143. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/acq.txt +0 -0
  144. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/acq_MethHist.txt +0 -0
  145. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/acq_damethod.reg +0 -0
  146. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/da.macaml +0 -1113
  147. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/lcdiag.reg +0 -0
  148. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/sample.acaml +0 -5324
  149. pychemstation-0.8.3/tests/0_2025-03-15 19-14-35.D/single.B +0 -0
  150. pychemstation-0.8.3/tests/__init__.py +0 -0
  151. pychemstation-0.8.3/tests/hplc_talk.mac +0 -81
  152. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/CSlbk.ini +0 -5
  153. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/ACQ.MS +0 -311
  154. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.ConfigXML.xml +0 -0
  155. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.MethodMetaData.xml +0 -0
  156. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.MethodXML.xml +0 -0
  157. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.ConfigXML.xml +0 -0
  158. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.MethodMetaData.xml +0 -0
  159. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.MethodXML.xml +0 -0
  160. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.ConfigXML.xml +0 -0
  161. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.MethodMetaData.xml +0 -0
  162. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.MethodXML.xml +0 -0
  163. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.ConfigXML.xml +0 -0
  164. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.MethodMetaData.xml +0 -0
  165. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.MethodXML.xml +0 -0
  166. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.PretreatXML.xml +0 -0
  167. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/DAMETHOD.REG +0 -0
  168. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/FIA.REG +0 -0
  169. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/INFO.MTH +0 -0
  170. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/INJECTOR.MTH +0 -3
  171. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/MassHunterIntegration.ini +0 -0
  172. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/RECALIB.MTH +0 -0
  173. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/RapidControl.InstrumentConfig.xml +0 -65
  174. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/rpthead.txt +0 -63
  175. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/smpl_pur.mth +0 -0
  176. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/Methods.Reg +0 -0
  177. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.B +0 -0
  178. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.LOG +0 -0
  179. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.S +0 -0
  180. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.Start +0 -0
  181. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/ACQRES.REG +0 -0
  182. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/CSlbk.ini +0 -5
  183. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/DAMETHOD.REG +0 -0
  184. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/INFO.MTH +0 -0
  185. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/RECALIB.MTH +0 -0
  186. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/rpthead.txt +0 -63
  187. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1.UV +0 -0
  188. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1A.ch +0 -0
  189. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1A.npz +0 -0
  190. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1B.ch +0 -0
  191. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1B.npz +0 -0
  192. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1C.ch +0 -0
  193. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1C.npz +0 -0
  194. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1D.ch +0 -0
  195. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1D.npz +0 -0
  196. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1E.ch +0 -0
  197. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1E.npz +0 -0
  198. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DiagResults.REG +0 -0
  199. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Limsinf.xml +0 -0
  200. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/PMP1.AnalyticalResults.drvml +0 -15
  201. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT01.CSV +0 -0
  202. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT02.CSV +0 -0
  203. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT03.CSV +0 -0
  204. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT04.CSV +0 -0
  205. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT05.CSV +0 -0
  206. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/RUN.LOG +0 -0
  207. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report.TXT +0 -0
  208. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report00.CSV +0 -0
  209. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report01.xls +0 -0
  210. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/SAMPLE.XML +0 -0
  211. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/SAMPLE.XML.bak +0 -0
  212. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/WLS1.Sampler.scml +0 -22
  213. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq.macaml +0 -921
  214. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq.txt +0 -0
  215. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq_MethHist.txt +0 -0
  216. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq_damethod.reg +0 -0
  217. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/da.macaml +0 -1113
  218. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/hplc_testing 2025-03-27 17-13-47_run seq with new method.PDF +0 -0
  219. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/lcdiag.reg +0 -0
  220. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/sequence.acam_ +0 -4404
  221. pychemstation-0.8.3/tests/hplc_testing 2025-03-27 17-13-47/sequence.acaml +0 -4422
  222. pychemstation-0.8.3/tests/out.txt +0 -14074
  223. pychemstation-0.8.3/tests/test_nightly.py +0 -24
  224. pychemstation-0.8.3/tests/test_runs_stable.py +0 -112
  225. pychemstation-0.8.3/update-lib.sh +0 -6
  226. pychemstation-0.8.3/uv.lock +0 -4113
  227. {pychemstation-0.8.3 → pychemstation-0.10.0}/LICENSE +0 -0
  228. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/__init__.py +0 -0
  229. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/control/controllers/devices/__init__.py +0 -0
  230. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/control/controllers/tables/__init__.py +0 -0
  231. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/control/controllers/tables/ms.py +0 -0
  232. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/generated/__init__.py +0 -0
  233. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/utils/__init__.py +0 -0
  234. /pychemstation-0.8.3/pychemstation/analysis/utils.py → /pychemstation-0.10.0/pychemstation/utils/num_utils.py +0 -0
  235. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/pychemstation/utils/pump_types.py +0 -0
  236. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/table_types.py +0 -0
  237. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation/utils/tray_types.py +0 -0
  238. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation.egg-info/dependency_links.txt +0 -0
  239. {pychemstation-0.8.3 → pychemstation-0.10.0}/pychemstation.egg-info/top_level.txt +0 -0
  240. {pychemstation-0.8.3/build/lib → pychemstation-0.10.0}/tests/__init__.py +0 -0
@@ -1,10 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pychemstation
3
- Version: 0.8.3
4
- Summary: Library to interact with Chemstation software, primarily used in Hein lab.
3
+ Version: 0.10.0
4
+ Summary: Library to interact with Chemstation software, primarily used in Hein lagit branch -mb
5
+ Home-page: https://gitlab.com/heingroup/device-api/pychemstation
6
+ Author: Lucy Hao
5
7
  Author-email: lucyhao <hao.lucyy@gmail.com>
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
6
10
  License-File: LICENSE
7
- Requires-Python: >=3.8
8
11
  Requires-Dist: aghplctools>=4.8.8
9
12
  Requires-Dist: coverage>=7.6.1
10
13
  Requires-Dist: matplotlib>=3.7.5
@@ -19,7 +22,9 @@ Requires-Dist: seabreeze>=2.9.2
19
22
  Requires-Dist: setuptools>=75.3.2
20
23
  Requires-Dist: twine>=6.1.0
21
24
  Requires-Dist: xsdata>=24.9
22
- Description-Content-Type: text/markdown
25
+ Dynamic: author
26
+ Dynamic: home-page
27
+ Dynamic: license-file
23
28
 
24
29
  # Agilent HPLC Macro Control
25
30
 
@@ -27,8 +32,12 @@ Description-Content-Type: text/markdown
27
32
 
28
33
  [![PyPI Latest Release](https://img.shields.io/pypi/v/pychemstation.svg)](https://pypi.org/project/pychemstation/)
29
34
 
35
+ > **_NOTE:_** If you are running Python **3.8**, use versions 0.**8**.x. If you are running Python **>=3.10**, use
36
+ > version 0.**10**.x. You are welcome to use newer pychemstation versions with older Python versions, but functionality
37
+ > is not guaranteed!
38
+
30
39
  Unofficial Python package to control Agilent Chemstation; we are not affiliated with Agilent.
31
- Check out the [docs](https://hein-analytical-control-5e6e85.gitlab.io/) for usage instructions. This project is under
40
+ Check out the [docs](https://pychemstation-e5a086.gitlab.io/pychemstation.html) for usage instructions. This project is under
32
41
  active development, and breaking changes may occur at any moment.
33
42
 
34
43
  ## Getting started
@@ -110,6 +119,8 @@ Lucy Hao, Maria Politi
110
119
 
111
120
  - Adapted from [**AnalyticalLabware**](https://github.com/croningp/analyticallabware), created by members in the Cronin
112
121
  Group. Copyright © Cronin Group, used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
113
- - Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI)
114
- used in [**Operator-free HPLC automated method development guided by Bayesian optimization**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
115
- created by members in the Bourne Group. Copyright © Bourne Group, used under the [MIT](https://opensource.org/license/mit) license.
122
+ - Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI) used in [**Operator-free HPLC
123
+ automated method development guided by Bayesian optimization
124
+ **](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
125
+ created by members in the Bourne Group. Copyright © Bourne Group, used under
126
+ the [MIT](https://opensource.org/license/mit) license.
@@ -4,8 +4,12 @@
4
4
 
5
5
  [![PyPI Latest Release](https://img.shields.io/pypi/v/pychemstation.svg)](https://pypi.org/project/pychemstation/)
6
6
 
7
+ > **_NOTE:_** If you are running Python **3.8**, use versions 0.**8**.x. If you are running Python **>=3.10**, use
8
+ > version 0.**10**.x. You are welcome to use newer pychemstation versions with older Python versions, but functionality
9
+ > is not guaranteed!
10
+
7
11
  Unofficial Python package to control Agilent Chemstation; we are not affiliated with Agilent.
8
- Check out the [docs](https://hein-analytical-control-5e6e85.gitlab.io/) for usage instructions. This project is under
12
+ Check out the [docs](https://pychemstation-e5a086.gitlab.io/pychemstation.html) for usage instructions. This project is under
9
13
  active development, and breaking changes may occur at any moment.
10
14
 
11
15
  ## Getting started
@@ -87,6 +91,8 @@ Lucy Hao, Maria Politi
87
91
 
88
92
  - Adapted from [**AnalyticalLabware**](https://github.com/croningp/analyticallabware), created by members in the Cronin
89
93
  Group. Copyright © Cronin Group, used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
90
- - Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI)
91
- used in [**Operator-free HPLC automated method development guided by Bayesian optimization**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
92
- created by members in the Bourne Group. Copyright © Bourne Group, used under the [MIT](https://opensource.org/license/mit) license.
94
+ - Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI) used in [**Operator-free HPLC
95
+ automated method development guided by Bayesian optimization
96
+ **](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
97
+ created by members in the Bourne Group. Copyright © Bourne Group, used under
98
+ the [MIT](https://opensource.org/license/mit) license.
@@ -1 +1,5 @@
1
1
  from .base_spectrum import AbstractSpectrum
2
+
3
+ __all__ = [
4
+ 'AbstractSpectrum',
5
+ ]
@@ -6,12 +6,12 @@ from abc import ABC, abstractmethod
6
6
  import matplotlib.pyplot as plt
7
7
  import numpy as np
8
8
  from scipy import (
9
- sparse,
10
- signal,
11
9
  integrate,
10
+ signal,
11
+ sparse,
12
12
  )
13
13
 
14
- from .utils import interpolate_to_index, find_nearest_value_index
14
+ from ..utils.num_utils import find_nearest_value_index, interpolate_to_index
15
15
 
16
16
 
17
17
  class AbstractSpectrum(ABC):
@@ -197,10 +197,10 @@ class AbstractSpectrum(ABC):
197
197
  return (self.x.copy()[full_mask], self.y.copy()[full_mask])
198
198
 
199
199
  def show_spectrum(
200
- self,
201
- filename=None,
202
- title=None,
203
- label=None,
200
+ self,
201
+ filename=None,
202
+ title=None,
203
+ label=None,
204
204
  ):
205
205
  """Plots the spectral data using matplotlib.pyplot module.
206
206
 
@@ -385,12 +385,12 @@ class AbstractSpectrum(ABC):
385
385
 
386
386
  if rule == "trapz":
387
387
  return integrate.trapz(
388
- self.y[left_idx : right_idx + 1], self.x[left_idx : right_idx + 1]
388
+ self.y[left_idx: right_idx + 1], self.x[left_idx: right_idx + 1]
389
389
  )
390
390
 
391
391
  elif rule == "simps":
392
392
  return integrate.simps(
393
- self.y[left_idx : right_idx + 1], self.x[left_idx : right_idx + 1]
393
+ self.y[left_idx: right_idx + 1], self.x[left_idx: right_idx + 1]
394
394
  )
395
395
 
396
396
  else:
@@ -4,15 +4,21 @@ import re
4
4
  from abc import abstractmethod
5
5
  from dataclasses import dataclass
6
6
  from enum import Enum
7
- from typing import List, AnyStr, Dict, Optional, Pattern
7
+ from typing import AnyStr, Dict, List, Optional, Pattern
8
8
 
9
9
  import pandas as pd
10
- from aghplctools.ingestion.text import _no_peaks_re, _area_report_re, _header_block_re, _signal_info_re, \
11
- _signal_table_re, chunk_string
12
- from result import Result, Err, Ok
10
+ from aghplctools.ingestion.text import (
11
+ _area_report_re,
12
+ _header_block_re,
13
+ _no_peaks_re,
14
+ _signal_info_re,
15
+ _signal_table_re,
16
+ chunk_string,
17
+ )
18
+ from result import Err, Ok, Result
13
19
 
14
20
  from pychemstation.utils.chromatogram import AgilentHPLCChromatogram
15
- from pychemstation.utils.tray_types import Tray, FiftyFourVialPlate
21
+ from pychemstation.utils.tray_types import FiftyFourVialPlate, Tray
16
22
 
17
23
 
18
24
  @dataclass
@@ -70,7 +76,7 @@ class CSVProcessor(ReportProcessor):
70
76
  :returns: subset of complete report details, specifically the sample location, solvents in pumps,
71
77
  and list of peaks at each wavelength channel.
72
78
  """
73
- labels = os.path.join(self.path, f'REPORT00.CSV')
79
+ labels = os.path.join(self.path, 'REPORT00.CSV')
74
80
  if os.path.exists(labels):
75
81
  df_labels: Dict[int, Dict[int: AnyStr]] = pd.read_csv(labels, encoding="utf-16", header=None).to_dict()
76
82
  vial_location = []
@@ -200,7 +206,7 @@ class TXTProcessor(ReportProcessor):
200
206
  should be able to use the `parse_area_report` method of aghplctools v4.8.8
201
207
  """
202
208
  if re.search(_no_peaks_re, report_text): # There are no peaks in Report.txt
203
- raise ValueError(f'No peaks found in Report.txt')
209
+ raise ValueError('No peaks found in Report.txt')
204
210
  blocks = _header_block_re.split(report_text)
205
211
  signals = {} # output dictionary
206
212
  for ind, block in enumerate(blocks):
@@ -2,3 +2,7 @@
2
2
  .. include:: README.md
3
3
  """
4
4
  from .hplc import HPLCController
5
+
6
+ __all__ = [
7
+ 'HPLCController',
8
+ ]
@@ -3,7 +3,11 @@
3
3
  """
4
4
 
5
5
  from .comm import CommunicationController
6
- from .devices.pump import PumpController
7
- from .devices.column import ColumnController
8
6
  from .tables.method import MethodController
9
7
  from .tables.sequence import SequenceController
8
+
9
+ __all__ = [
10
+ 'CommunicationController',
11
+ 'MethodController',
12
+ 'SequenceController'
13
+ ]
@@ -11,11 +11,18 @@ Authors: Alexander Hammer, Hessam Mehr, Lucy Hao
11
11
  """
12
12
  import os
13
13
  import time
14
- from typing import Optional
14
+ from typing import Optional, Union
15
15
 
16
- from result import Result, Ok, Err
16
+ from result import Err, Ok, Result
17
17
 
18
- from ...utils.macro import *
18
+ from ...utils.macro import (
19
+ str_to_status,
20
+ HPLCAvailStatus,
21
+ HPLCErrorStatus,
22
+ Command,
23
+ Status,
24
+ Response,
25
+ )
19
26
 
20
27
 
21
28
  class CommunicationController:
@@ -193,14 +200,14 @@ class CommunicationController:
193
200
  str_response_prefix = "String Responses:"
194
201
  possible_response = self._receive(self.cmd_no)
195
202
  if possible_response.is_ok():
196
- lines = possible_response.value.splitlines()
203
+ lines = possible_response.ok_value.splitlines()
197
204
  for line in lines:
198
205
  if str_response_prefix in line and num_response_prefix in line:
199
206
  string_responses_dirty, _, numerical_responses = line.partition(num_response_prefix)
200
207
  _, _, string_responses = string_responses_dirty.partition(str_response_prefix)
201
208
  return Ok(Response(string_response=string_responses.strip(),
202
209
  num_response=float(numerical_responses.strip())))
203
- return Err(f"Could not retrieve HPLC response")
210
+ return Err("Could not retrieve HPLC response")
204
211
  else:
205
212
  return Err(f"Could not establish response to HPLC: {possible_response}")
206
213
 
@@ -1,13 +1,13 @@
1
1
  import abc
2
- from typing import Union, List
2
+ from typing import List, Union, Dict, Optional
3
3
 
4
4
  from result import Result
5
5
 
6
- from ....analysis.process_report import ReportType, AgilentReport
6
+ from ....analysis.process_report import AgilentReport, ReportType
7
7
  from ....control.controllers import CommunicationController
8
8
  from ....control.controllers.tables.table import TableController
9
- from ....utils.chromatogram import AgilentChannelChromatogramData
10
- from ....utils.table_types import Table, T
9
+ from ....utils.chromatogram import AgilentChannelChromatogramData, AgilentHPLCChromatogram
10
+ from ....utils.table_types import T, Table
11
11
 
12
12
 
13
13
  class DeviceController(TableController, abc.ABC):
@@ -26,11 +26,14 @@ class DeviceController(TableController, abc.ABC):
26
26
  def retrieve_recent_data_files(self):
27
27
  raise NotImplementedError
28
28
 
29
- def get_data(self) -> Union[List[AgilentChannelChromatogramData], AgilentChannelChromatogramData]:
30
- raise NotImplementedError
31
-
32
29
  def fuzzy_match_most_recent_folder(self, most_recent_folder: T) -> Result[T, str]:
33
30
  raise NotImplementedError
34
31
 
35
32
  def get_report(self, report_type: ReportType = ReportType.TXT) -> List[AgilentReport]:
36
33
  raise NotImplementedError
34
+
35
+ def get_data_uv(self) -> Union[List[Dict[str, AgilentHPLCChromatogram]], Dict[str, AgilentHPLCChromatogram]]:
36
+ raise NotImplementedError
37
+
38
+ def get_data(self, custom_path: Optional[str] = None) -> Union[List[AgilentChannelChromatogramData], AgilentChannelChromatogramData]:
39
+ raise NotImplementedError
@@ -0,0 +1,51 @@
1
+ from __future__ import annotations
2
+
3
+ from .device import DeviceController
4
+ from ....control.controllers import CommunicationController
5
+ from ....utils.injector_types import (
6
+ Draw,
7
+ Inject,
8
+ InjectorTable,
9
+ Mode,
10
+ Remote,
11
+ RemoteCommand,
12
+ SourceType,
13
+ Wait,
14
+ )
15
+ from ....utils.table_types import RegisterFlag, Table
16
+ from ....utils.tray_types import Tray
17
+
18
+
19
+ class InjectorController(DeviceController):
20
+
21
+ def __init__(self, controller: CommunicationController, table: Table, offline: bool):
22
+ super().__init__(controller, table, offline)
23
+
24
+ def get_row(self, row: int) -> None | Remote | Draw | Wait | Inject:
25
+ def return_tray_loc() -> Tray:
26
+ pass
27
+
28
+ function = self.get_text(row, RegisterFlag.FUNCTION)
29
+ if function == "Wait":
30
+ return Wait(duration=self.get_num(row, RegisterFlag.TIME))
31
+ elif function == "Inject":
32
+ return Inject()
33
+ elif function == "Draw":
34
+ # TODO: better error handling
35
+ is_source = SourceType(self.get_text(row, RegisterFlag.DRAW_SOURCE))
36
+ is_volume = Mode(self.get_text(row, RegisterFlag.DRAW_VOLUME))
37
+ vol = self.get_num(row, RegisterFlag.DRAW_VOLUME_VALUE) if is_volume == Mode.SET else None
38
+ if is_source is SourceType.SPECIFIC_LOCATION:
39
+ return Draw(amount=vol, source=return_tray_loc())
40
+ elif is_source is SourceType.LOCATION:
41
+ return Draw(amount=vol, location=self.get_text(row, RegisterFlag.DRAW_LOCATION))
42
+ elif function == "Remote":
43
+ return Remote(command=RemoteCommand(self.get_text(row, RegisterFlag.REMOTE)),
44
+ duration=self.get_num(row, RegisterFlag.REMOTE_DUR))
45
+
46
+ def load(self) -> InjectorTable | None:
47
+ rows = self.get_num_rows()
48
+ if rows.is_ok():
49
+ return InjectorTable(functions=[self.get_row(i) for i in range(int(rows.ok_value.num_response))])
50
+
51
+
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import time
3
- from typing import List
3
+ import warnings
4
+ from typing import Dict, List, Optional, Union
4
5
 
5
6
  from result import Err, Ok, Result
6
7
  from xsdata.formats.dataclass.parsers import XmlParser
@@ -13,9 +14,15 @@ from ....utils.chromatogram import (
13
14
  AgilentChannelChromatogramData,
14
15
  AgilentHPLCChromatogram,
15
16
  )
16
- from ....utils.macro import *
17
- from ....utils.method_types import *
18
- from ....utils.table_types import *
17
+ from ....utils.macro import Command
18
+ from ....utils.method_types import (
19
+ HPLCMethodParams,
20
+ MethodDetails,
21
+ Param,
22
+ PType,
23
+ TimeTableEntry,
24
+ )
25
+ from ....utils.table_types import RegisterFlag, T, Table, TableOperation
19
26
  from ..devices.injector import InjectorController
20
27
  from .table import TableController
21
28
 
@@ -129,6 +136,10 @@ class MethodController(TableController):
129
136
  register=self.table_locator.register,
130
137
  register_flag=RegisterFlag.MAX_TIME))
131
138
 
139
+ def get_total_runtime(self) -> Union[int, float]:
140
+ """Returns total method runtime in minutes."""
141
+ return self.get_post_time() + self.get_stop_time()
142
+
132
143
  def current_method(self, method_name: str):
133
144
  """
134
145
  Checks if a given method is already loaded into Chemstation. Method name does not need the ".M" extension.
@@ -173,6 +184,7 @@ class MethodController(TableController):
173
184
  :raises FileNotFoundError: Method does not exist
174
185
  :return: method details
175
186
  """
187
+ warnings.warn("This method is not actively maintained.")
176
188
  method_folder = f"{method_name}.M"
177
189
  method_path = os.path.join(self.src, method_folder, "AgilentPumpDriver1.RapidControl.MethodXML.xml")
178
190
  dad_path = os.path.join(self.src, method_folder, "Agilent1200erDadDriver1.RapidControl.MethodXML.xml")
@@ -347,29 +359,39 @@ class MethodController(TableController):
347
359
  raise RuntimeError("Method failed to start.")
348
360
 
349
361
  self.data_files.append(os.path.join(self.data_dirs[0], folder_name))
362
+ self.timeout = (self.get_total_runtime()) * 60
350
363
 
351
364
  if stall_while_running:
352
- self.timeout = (self.get_stop_time() + self.get_post_time()) * 60
353
365
  run_completed = self.check_hplc_done_running()
354
366
  if run_completed.is_ok():
355
367
  self.data_files[-1] = run_completed.ok_value
356
368
  else:
357
369
  raise RuntimeError("Run error has occurred.")
358
370
  else:
359
- self.data_files[-1] = self.fuzzy_match_most_recent_folder(folder_name).ok_value
371
+ folder = self.fuzzy_match_most_recent_folder(self.data_files[-1])
372
+ while folder.is_err():
373
+ folder = self.fuzzy_match_most_recent_folder(self.data_files[-1])
374
+ if folder.is_ok():
375
+ self.data_files[-1] = folder.ok_value
376
+ else:
377
+ warning = f"Data folder {self.data_files[-1]} may not exist, returning and will check again after run is done."
378
+ warnings.warn(warning)
379
+
360
380
 
361
381
  def fuzzy_match_most_recent_folder(self, most_recent_folder: T) -> Result[T, str]:
362
382
  if os.path.exists(most_recent_folder):
363
383
  return Ok(most_recent_folder)
364
384
  return Err("Folder not found!")
365
385
 
366
- def get_data(self, custom_path: Optional[str] = None,
367
- read_uv: bool = False) -> AgilentChannelChromatogramData:
368
- if not custom_path:
369
- self.get_spectrum(self.data_files[-1], read_uv)
370
- else:
371
- self.get_spectrum(custom_path, read_uv)
372
- return AgilentChannelChromatogramData(**self.spectra) if not read_uv else self.uv
386
+ def get_data(self, custom_path: Optional[str] = None) -> AgilentChannelChromatogramData:
387
+ custom_path = custom_path if custom_path else self.data_files[-1]
388
+ self.get_spectrum_at_channels(custom_path)
389
+ return AgilentChannelChromatogramData(**self.spectra)
390
+
391
+ def get_data_uv(self, custom_path: Optional[str] = None) -> Dict[str, AgilentHPLCChromatogram]:
392
+ custom_path = custom_path if custom_path else self.data_files[-1]
393
+ self.get_uv_spectrum(custom_path)
394
+ return self.uv
373
395
 
374
396
  def get_report(self, custom_path: Optional[str] = None,
375
397
  report_type: ReportType = ReportType.TXT) -> List[AgilentReport]:
@@ -1,19 +1,29 @@
1
1
  import os
2
2
  import time
3
- from typing import Optional, List, Dict
3
+ from typing import Dict, List, Optional
4
4
 
5
- from result import Result, Ok, Err
5
+ from result import Err, Ok, Result
6
6
  from typing_extensions import override
7
7
 
8
- from .table import TableController
9
- from .. import MethodController
10
- from ....analysis.process_report import ReportType, AgilentReport
8
+ from ....analysis.process_report import AgilentReport, ReportType
11
9
  from ....control.controllers.comm import CommunicationController
12
- from ....utils.chromatogram import SEQUENCE_TIME_FORMAT, AgilentChannelChromatogramData, AgilentHPLCChromatogram
10
+ from ....utils.chromatogram import (
11
+ SEQUENCE_TIME_FORMAT,
12
+ AgilentChannelChromatogramData,
13
+ AgilentHPLCChromatogram,
14
+ )
13
15
  from ....utils.macro import Command
14
- from ....utils.sequence_types import SequenceTable, SequenceEntry, SequenceDataFiles, InjectionSource, SampleType
16
+ from ....utils.sequence_types import (
17
+ InjectionSource,
18
+ SampleType,
19
+ SequenceDataFiles,
20
+ SequenceEntry,
21
+ SequenceTable,
22
+ )
15
23
  from ....utils.table_types import RegisterFlag, Table
16
- from ....utils.tray_types import TenVialColumn, FiftyFourVialPlate
24
+ from ....utils.tray_types import FiftyFourVialPlate, TenVialColumn
25
+ from .. import MethodController
26
+ from .table import TableController
17
27
 
18
28
 
19
29
  class SequenceController(TableController):
@@ -82,7 +92,7 @@ class SequenceController(TableController):
82
92
  time.sleep(2)
83
93
  self.send(Command.GET_SEQUENCE_CMD)
84
94
  time.sleep(2)
85
- parsed_response = self.receive().value.string_response
95
+ parsed_response = self.receive().ok_value.string_response
86
96
 
87
97
  assert parsed_response == f"{seq_name}.S", "Switching sequence failed."
88
98
  self.table_state = None
@@ -97,7 +107,7 @@ class SequenceController(TableController):
97
107
  self.table_state = sequence_table
98
108
  rows = self.get_num_rows()
99
109
  if rows.is_ok():
100
- existing_row_num = rows.value.num_response
110
+ existing_row_num = rows.ok_value.num_response
101
111
  wanted_row_num = len(sequence_table.rows)
102
112
  while existing_row_num != wanted_row_num:
103
113
  if wanted_row_num > existing_row_num:
@@ -127,7 +137,6 @@ class SequenceController(TableController):
127
137
  self.add_row()
128
138
  self.send(Command.SAVE_SEQUENCE_CMD)
129
139
  num_rows = self.get_num_rows()
130
-
131
140
  if row.vial_location:
132
141
  loc = row.vial_location
133
142
  if isinstance(loc, TenVialColumn):
@@ -135,7 +144,6 @@ class SequenceController(TableController):
135
144
  elif isinstance(loc, FiftyFourVialPlate):
136
145
  loc = row.vial_location.value()
137
146
  self._edit_row_num(row=row_num, col_name=RegisterFlag.VIAL_LOCATION, val=loc)
138
-
139
147
  if row.method:
140
148
  method_dir = self.method_controller.src
141
149
  possible_path = os.path.join(method_dir, row.method) + ".M\\"
@@ -143,23 +151,18 @@ class SequenceController(TableController):
143
151
  if os.path.exists(possible_path):
144
152
  method = os.path.join(method_dir, row.method)
145
153
  self._edit_row_text(row=row_num, col_name=RegisterFlag.METHOD, val=method)
146
-
147
154
  if row.num_inj:
148
155
  self._edit_row_num(row=row_num, col_name=RegisterFlag.NUM_INJ, val=row.num_inj)
149
-
150
156
  if row.inj_vol:
151
157
  self._edit_row_text(row=row_num, col_name=RegisterFlag.INJ_VOL, val=row.inj_vol)
152
-
153
158
  if row.inj_source:
154
159
  self._edit_row_text(row=row_num, col_name=RegisterFlag.INJ_SOR, val=row.inj_source.value)
155
-
156
160
  if row.sample_name:
157
161
  self._edit_row_text(row=row_num, col_name=RegisterFlag.NAME, val=row.sample_name)
158
162
  if row.data_file:
159
163
  self._edit_row_text(row=row_num, col_name=RegisterFlag.DATA_FILE, val=row.data_file)
160
164
  else:
161
165
  self._edit_row_text(row=row_num, col_name=RegisterFlag.DATA_FILE, val=row.sample_name)
162
-
163
166
  if row.sample_type:
164
167
  self._edit_row_num(row=row_num, col_name=RegisterFlag.SAMPLE_TYPE, val=row.sample_type.value)
165
168
 
@@ -179,15 +182,15 @@ class SequenceController(TableController):
179
182
 
180
183
  total_runtime = 0
181
184
  for entry in self.table_state.rows:
182
- curr_method_runtime = self.method_controller.get_post_time() + self.method_controller.get_stop_time()
183
- loaded_method = self.method_controller.get_method_name()[:-2]
185
+ curr_method_runtime = self.method_controller.get_total_runtime()
186
+ loaded_method = self.method_controller.get_method_name().removesuffix(".M")
184
187
  method_path = entry.method.split(sep="\\")
185
188
  method_name = method_path[-1]
186
189
  if loaded_method != method_name:
187
- method_dir = os.path.join(*method_path[:-1]) if len(method_path) > 1 else None
190
+ method_dir = "\\".join(method_path[:-1])+"\\" if len(method_path) > 1 else None
188
191
  self.method_controller.switch(method_name=method_name,
189
192
  alt_method_dir=method_dir)
190
- curr_method_runtime = self.method_controller.get_post_time() + self.method_controller.get_stop_time()
193
+ curr_method_runtime = self.method_controller.get_total_runtime()
191
194
  total_runtime += curr_method_runtime
192
195
 
193
196
  timestamp = time.strftime(SEQUENCE_TIME_FORMAT)
@@ -196,8 +199,8 @@ class SequenceController(TableController):
196
199
 
197
200
  if self.check_hplc_is_running():
198
201
  folder_name = f"{self.table_state.name} {timestamp}"
199
- self.data_files.append(SequenceDataFiles(dir=folder_name,
200
- sequence_name=self.table_state.name))
202
+ data_file = SequenceDataFiles(dir=folder_name, sequence_name=self.table_state.name)
203
+ self.data_files.append(data_file)
201
204
 
202
205
  if stall_while_running:
203
206
  run_completed = self.check_hplc_done_running()
@@ -205,10 +208,8 @@ class SequenceController(TableController):
205
208
  self.data_files[-1] = run_completed.ok_value
206
209
  else:
207
210
  raise RuntimeError("Run error has occurred.")
208
- else:
209
- self.data_files[-1] = SequenceDataFiles(dir=folder_name,
210
- child_dirs=[],
211
- sequence_name=self.table_state.name)
211
+ else:
212
+ raise RuntimeError("Sequence run did not start.")
212
213
 
213
214
  @override
214
215
  def fuzzy_match_most_recent_folder(self, most_recent_folder: SequenceDataFiles) -> Result[SequenceDataFiles, str]:
@@ -248,17 +249,25 @@ class SequenceController(TableController):
248
249
  except Exception:
249
250
  return Err("Failed to get sequence folder")
250
251
 
251
- def get_data(self, custom_path: Optional[str] = None,
252
- read_uv: bool = False) -> List[AgilentChannelChromatogramData]:
253
- if len(self.data_files[-1].child_dirs) == 0:
254
- self.data_files[-1] = self.fuzzy_match_most_recent_folder(self.data_files[-1]).ok_value
255
- spectra: list[AgilentChannelChromatogramData] = []
256
- all_w_spectra: list[Dict[str, AgilentHPLCChromatogram]] = []
252
+ def get_data_uv(self,custom_path: Optional[str] = None) -> List[Dict[str, AgilentHPLCChromatogram]]:
253
+ custom_path = SequenceDataFiles(dir=custom_path, child_dirs=[], sequence_name="") if custom_path else self.data_files[-1]
254
+ if len(custom_path.child_dirs) == 0:
255
+ self.data_files[-1] = self.fuzzy_match_most_recent_folder(custom_path).ok_value
256
+ all_w_spectra: List[Dict[str, AgilentHPLCChromatogram]] = []
257
257
  for row in self.data_files[-1].child_dirs:
258
- self.get_spectrum(row, read_uv)
259
- spectra.append(AgilentChannelChromatogramData(**self.spectra))
258
+ self.get_uv_spectrum(row)
260
259
  all_w_spectra.append(self.uv)
261
- return spectra if not read_uv else all_w_spectra
260
+ return all_w_spectra
261
+
262
+ def get_data(self, custom_path: Optional[str] = None) -> List[AgilentChannelChromatogramData]:
263
+ custom_path = SequenceDataFiles(dir=custom_path, child_dirs=[], sequence_name="") if custom_path else self.data_files[-1]
264
+ if len(custom_path.child_dirs) == 0:
265
+ self.data_files[-1] = self.fuzzy_match_most_recent_folder(custom_path).ok_value
266
+ spectra: List[AgilentChannelChromatogramData] = []
267
+ for row in self.data_files[-1].child_dirs:
268
+ self.get_spectrum_at_channels(row)
269
+ spectra.append(AgilentChannelChromatogramData(**self.spectra))
270
+ return spectra
262
271
 
263
272
  def get_report(self, custom_path: Optional[str] = None,
264
273
  report_type: ReportType = ReportType.TXT) -> List[AgilentReport]:
@@ -268,7 +277,7 @@ class SequenceController(TableController):
268
277
  child_dirs=[],
269
278
  sequence_name="NA")).ok_value)
270
279
  parent_dir = self.data_files[-1]
271
- spectra = self.get_data(custom_path=custom_path)
280
+ spectra = self.get_data()
272
281
  reports = []
273
282
  for i, child_dir in enumerate(parent_dir.child_dirs):
274
283
  metd_report = self.get_report_details(child_dir, report_type)