lunapi 1.2.3__cp310-cp310-macosx_10_9_x86_64.whl → 1.3.0__cp310-cp310-macosx_10_9_x86_64.whl

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.
lunapi/lunapi0.cpp CHANGED
@@ -50,6 +50,39 @@ PYBIND11_MODULE(lunapi0, m) {
50
50
  m.def( "version" ,
51
51
  &lunapi_t::version ,
52
52
  "Version of Luna" );
53
+
54
+ m.def( "fetch_doms" ,
55
+ &lunapi_t::fetch_doms ,
56
+ "Fetch all command domains" );
57
+ m.def( "fetch_cmds" ,
58
+ &lunapi_t::fetch_cmds ,
59
+ "Fetch all commands" );
60
+ m.def( "fetch_params" ,
61
+ &lunapi_t::fetch_params ,
62
+ "Fetch all parameters for a command" );
63
+ m.def( "fetch_tbls" ,
64
+ &lunapi_t::fetch_tbls ,
65
+ "Fetch all tables for a command" );
66
+ m.def( "fetch_vars" ,
67
+ &lunapi_t::fetch_vars ,
68
+ "Fetch all variables for a command/table" );
69
+
70
+ m.def( "fetch_desc_dom" ,
71
+ &lunapi_t::fetch_desc_dom ,
72
+ "Description for a domain" );
73
+ m.def( "fetch_desc_cmd" ,
74
+ &lunapi_t::fetch_desc_cmd ,
75
+ "Description for a command" );
76
+ m.def( "fetch_desc_param" ,
77
+ &lunapi_t::fetch_desc_param ,
78
+ "Description for a command/parameter" );
79
+ m.def( "fetch_desc_tbl" ,
80
+ &lunapi_t::fetch_desc_tbl ,
81
+ "Description for a command/table" );
82
+ m.def( "fetch_desc_var" ,
83
+ &lunapi_t::fetch_desc_var ,
84
+ "Description for a command/table/variable" );
85
+
53
86
 
54
87
  //
55
88
  // lunapi_t engine class
@@ -165,6 +198,9 @@ PYBIND11_MODULE(lunapi0, m) {
165
198
 
166
199
  .def("tables",py::overload_cast<>(&lunapi_t::results,py::const_) ,
167
200
  "Return a result table (defined by a command/strata pair) from a prior eval()" );
201
+
202
+
203
+
168
204
 
169
205
  //
170
206
  // lunapi_inst_t : individual instance (EDF/annotation pair)
@@ -341,6 +377,9 @@ PYBIND11_MODULE(lunapi0, m) {
341
377
  .def( "compile_evts" , &segsrv_t::compile_evts )
342
378
  .def( "get_evnts_xaxes" , &segsrv_t::get_evnts_xaxes )
343
379
  .def( "get_evnts_yaxes" , &segsrv_t::get_evnts_yaxes )
380
+ .def( "set_evnt_format6" , &segsrv_t::set_annot_format6 )
381
+ .def( "get_evnts_xaxes_ends" , &segsrv_t::get_evnts_xaxes_ends )
382
+ .def( "get_evnts_yaxes_ends" , &segsrv_t::get_evnts_yaxes_ends )
344
383
  .def( "fetch_all_annots", &segsrv_t::fetch_all_evts )
345
384
  .def( "fetch_annots" , &segsrv_t::fetch_evts );
346
385
 
Binary file
lunapi/lunapi1.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """lunapi1 module: a high-level wrapper around lunapi0 module functions"""
2
2
 
3
3
  # Luna Python interface (lunapi)
4
- # v1.2.3, 28-May-2025
4
+ # v1.3.0, 05-Sep-2025
5
5
 
6
6
  import lunapi.lunapi0 as _luna
7
7
 
@@ -33,7 +33,7 @@ class resources:
33
33
  POPS_LIB = 's2'
34
34
  MODEL_PATH = '/build/luna-models/'
35
35
 
36
- lp_version = "v1.2.3"
36
+ lp_version = "v1.3.0"
37
37
 
38
38
  # C++ singleton class (engine & sample list)
39
39
  # lunapi_t --> luna
@@ -1196,6 +1196,47 @@ class inst:
1196
1196
  # --------------------------------------------------------------------------------
1197
1197
 
1198
1198
 
1199
+ def fetch_doms():
1200
+ """Fetch all command domains"""
1201
+ return _luna.fetch_doms( True )
1202
+
1203
+ def fetch_cmds( dom ):
1204
+ """Fetch all commands"""
1205
+ return _luna.fetch_cmds( dom, True )
1206
+
1207
+ def fetch_params( cmd ):
1208
+ """Fetch all command parameters"""
1209
+ return _luna.fetch_params( cmd, True )
1210
+
1211
+ def fetch_tbls( cmd ):
1212
+ """Fetch all command tables"""
1213
+ return _luna.fetch_tbls( cmd, True )
1214
+
1215
+ def fetch_vars( cmd, tbl ):
1216
+ """Fetch all command/table variables"""
1217
+ return _luna.fetch_vars( cmd, tbl, True )
1218
+
1219
+ def fetch_desc_dom( dom ):
1220
+ """Description for a domain"""
1221
+ return _luna.fetch_desc_dom( dom )
1222
+
1223
+ def fetch_desc_cmd( cmd ):
1224
+ """Description for a command"""
1225
+ return _luna.fetch_desc_cmd( cmd )
1226
+
1227
+ def fetch_desc_param( cmd , param ):
1228
+ """Description for a command/parameter"""
1229
+ return _luna.fetch_desc_param( cmd, param )
1230
+
1231
+ def fetch_desc_tbl( cmd , tbl ):
1232
+ """Description for a command/table"""
1233
+ return _luna.fetch_desc_tbl( cmd, tbl )
1234
+
1235
+ def fetch_desc_var( cmd, tbl, var ):
1236
+ """Fetch all command/table variable"""
1237
+ return _luna.fetch_desc_var( cmd, tbl, var )
1238
+
1239
+
1199
1240
  # --------------------------------------------------------------------------------
1200
1241
  def cmdfile( f ):
1201
1242
  """load and parse a Luna command script from a file"""
@@ -1726,6 +1767,14 @@ class segsrv:
1726
1767
  def get_annots_yaxes(self,ann):
1727
1768
  return self.segsrv.get_evnts_yaxes( ann )
1728
1769
 
1770
+ def set_annot_format6(self,b):
1771
+ self.segsrv.set_evnt_format6(b)
1772
+
1773
+ def get_annots_xaxes_ends(self,ann):
1774
+ return self.segsrv.get_evnts_xaxes_ends( ann )
1775
+
1776
+ def get_annots_yaxes_ends(self,ann):
1777
+ return self.segsrv.get_evnts_yaxes_ends( ann )
1729
1778
 
1730
1779
 
1731
1780
 
@@ -1813,7 +1862,6 @@ def scope( p,
1813
1862
  for key, value in anncols.items(): apalette[ key ] = value
1814
1863
 
1815
1864
 
1816
-
1817
1865
  # define widgets
1818
1866
 
1819
1867
  wlay1 = widgets.Layout( width='95%' )
@@ -2180,8 +2228,8 @@ def scope( p,
2180
2228
  g.data[ gidx ].visible = True
2181
2229
 
2182
2230
  def rescale(change):
2183
- ss.set_scaling( len(chbox.value) , len( anbox.value) , 2**float(yscale.value) , float(yspace.value) , header_height, footer_height , annot_height )
2184
- redraw()
2231
+ ss.set_scaling( len(chbox.value) , len( anbox.value) , 2**float(yscale.value) , float(yspace.value) , header_height, footer_height , annot_height )
2232
+ redraw()
2185
2233
 
2186
2234
  def update_bandpower(change):
2187
2235
  if pow_sel.value is None: return
@@ -2418,7 +2466,7 @@ class moonbeam:
2418
2466
  self.pull_file( self.curr_edf )
2419
2467
 
2420
2468
  # EDFZ .idx
2421
- if re.search('\.edf\.gz$',self.curr_edf,re.IGNORECASE) or re.search('\.edfz$',self.curr_edf,re.IGNORECASE):
2469
+ if re.search(r'\.edf\.gz$',self.curr_edf,re.IGNORECASE) or re.search(r'\.edfz$',self.curr_edf,re.IGNORECASE):
2422
2470
  self.pull_file( self.curr_edf + '.idx' )
2423
2471
 
2424
2472
  # annots (optional)
@@ -2487,3 +2535,5 @@ class moonbeam:
2487
2535
  df = pd.concat( [ df1 , df2 ] )
2488
2536
  return df
2489
2537
 
2538
+
2539
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: lunapi
3
- Version: 1.2.3
3
+ Version: 1.3.0
4
4
  Summary: Python interface to the Luna toolset for sleep signal analysis
5
5
  Keywords: Sleep,EEG,PSG,Luna,Signal processing
6
6
  Author-Email: Shaun Purcell <smpurcell@bwh.harvard.edu>, Senthil Palanivelu <spalanivelu@mgh.harvard.edu>, Nataliia Kozhemiako <nkozhemiako@bwh.harvard.edu>
@@ -0,0 +1,8 @@
1
+ lunapi-1.3.0.dist-info/RECORD,,
2
+ lunapi-1.3.0.dist-info/WHEEL,sha256=m7GNbUaA4XKdsf9l9r8eHfDfe1XvmCDSA7fLL6ZBzD8,115
3
+ lunapi-1.3.0.dist-info/METADATA,sha256=z6EQtBSHYEuM-ZDJ1Pb8sYOqOpBFBS_A63TbhaIGyio,1519
4
+ lunapi-1.3.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
+ lunapi/lunapi0.cpython-310-darwin.so,sha256=WrdlV8zivcUpnAQrRlweGALF0BQGEjtmtWBOwRfnuI8,19642248
6
+ lunapi/__init__.py,sha256=cDep9d2N4KKUt81AzHUyFsuRdGwxCD1rqqFmptsAqsk,352
7
+ lunapi/lunapi1.py,sha256=5qx6ZIw-aqzTF7C3rwnvRxGuqmI-Qp7lDqqmeDNim6M,93885
8
+ lunapi/lunapi0.cpp,sha256=fzsbr3q6RFQHmFS-69BRu3sOzrTGU79mrDwxtTtkIlA,14266
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: scikit-build-core 0.11.3
2
+ Generator: scikit-build-core 0.11.6
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-macosx_10_9_x86_64
5
5
 
@@ -1,8 +0,0 @@
1
- lunapi/lunapi0.cpython-310-darwin.so,sha256=vRMp0TIqyWwc2ny2sjll0mWHthRSyKNB4kSdsFQZ1k0,19445776
2
- lunapi/__init__.py,sha256=cDep9d2N4KKUt81AzHUyFsuRdGwxCD1rqqFmptsAqsk,352
3
- lunapi/lunapi1.py,sha256=IBGgPsHM_Wlzv7If4_gli1onM6127MWY_A5UapPHAzU,92537
4
- lunapi/lunapi0.cpp,sha256=nQ5cwNdm4fvZ5TSDSxrgWu8Luw1r6NyDsvDWu9sLv7I,13053
5
- lunapi-1.2.3.dist-info/RECORD,,
6
- lunapi-1.2.3.dist-info/WHEEL,sha256=B2MroJbrHmO8jsP9mYEviUDho5uv02y_P3THMydwGQU,115
7
- lunapi-1.2.3.dist-info/METADATA,sha256=CJCsb2ZSt6h8oYb2K_Hx4khWZBrxZQauka_HcDp4O54,1519
8
- lunapi-1.2.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149