lunapi 1.2.1__cp310-cp310-macosx_11_0_arm64.whl → 1.3.0__cp310-cp310-macosx_11_0_arm64.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 +39 -0
- lunapi/lunapi0.cpython-310-darwin.so +0 -0
- lunapi/lunapi1.py +63 -7
- {lunapi-1.2.1.dist-info → lunapi-1.3.0.dist-info}/METADATA +4 -4
- lunapi-1.3.0.dist-info/RECORD +8 -0
- {lunapi-1.2.1.dist-info → lunapi-1.3.0.dist-info}/WHEEL +1 -1
- lunapi-1.2.1.dist-info/RECORD +0 -8
- {lunapi-1.2.1.dist-info → lunapi-1.3.0.dist-info}/licenses/LICENSE +0 -0
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.
|
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.
|
36
|
+
lp_version = "v1.3.0"
|
37
37
|
|
38
38
|
# C++ singleton class (engine & sample list)
|
39
39
|
# lunapi_t --> luna
|
@@ -304,6 +304,8 @@ class proj:
|
|
304
304
|
# clear all
|
305
305
|
if key is None:
|
306
306
|
proj.eng.clear_all_opts()
|
307
|
+
# and a spectial case: the sig list
|
308
|
+
self.vars( 'sig', '' )
|
307
309
|
return
|
308
310
|
|
309
311
|
# clear some/one
|
@@ -1178,7 +1180,11 @@ class inst:
|
|
1178
1180
|
return
|
1179
1181
|
if all( self.has( ch ) ) is not True:
|
1180
1182
|
return
|
1181
|
-
|
1183
|
+
if minf is None:
|
1184
|
+
minf=0.5
|
1185
|
+
if maxf is None:
|
1186
|
+
maxf=25
|
1187
|
+
res = self.silent_proc( "PSD epoch-spectrum dB sig="+ch+" min="+str(minf)+" max="+str(maxf) )[ 'PSD: CH_E_F' ]
|
1182
1188
|
return spec( res , ch=ch, var='PSD', mine=mine,maxe=maxe,minf=minf,maxf=maxf,w=w)
|
1183
1189
|
|
1184
1190
|
|
@@ -1190,6 +1196,47 @@ class inst:
|
|
1190
1196
|
# --------------------------------------------------------------------------------
|
1191
1197
|
|
1192
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
|
+
|
1193
1240
|
# --------------------------------------------------------------------------------
|
1194
1241
|
def cmdfile( f ):
|
1195
1242
|
"""load and parse a Luna command script from a file"""
|
@@ -1720,6 +1767,14 @@ class segsrv:
|
|
1720
1767
|
def get_annots_yaxes(self,ann):
|
1721
1768
|
return self.segsrv.get_evnts_yaxes( ann )
|
1722
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 )
|
1723
1778
|
|
1724
1779
|
|
1725
1780
|
|
@@ -1807,7 +1862,6 @@ def scope( p,
|
|
1807
1862
|
for key, value in anncols.items(): apalette[ key ] = value
|
1808
1863
|
|
1809
1864
|
|
1810
|
-
|
1811
1865
|
# define widgets
|
1812
1866
|
|
1813
1867
|
wlay1 = widgets.Layout( width='95%' )
|
@@ -2174,8 +2228,8 @@ def scope( p,
|
|
2174
2228
|
g.data[ gidx ].visible = True
|
2175
2229
|
|
2176
2230
|
def rescale(change):
|
2177
|
-
|
2178
|
-
|
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()
|
2179
2233
|
|
2180
2234
|
def update_bandpower(change):
|
2181
2235
|
if pow_sel.value is None: return
|
@@ -2412,7 +2466,7 @@ class moonbeam:
|
|
2412
2466
|
self.pull_file( self.curr_edf )
|
2413
2467
|
|
2414
2468
|
# EDFZ .idx
|
2415
|
-
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):
|
2416
2470
|
self.pull_file( self.curr_edf + '.idx' )
|
2417
2471
|
|
2418
2472
|
# annots (optional)
|
@@ -2481,3 +2535,5 @@ class moonbeam:
|
|
2481
2535
|
df = pd.concat( [ df1 , df2 ] )
|
2482
2536
|
return df
|
2483
2537
|
|
2538
|
+
|
2539
|
+
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: lunapi
|
3
|
-
Version: 1.
|
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>
|
@@ -17,8 +17,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
20
|
-
Project-URL:
|
21
|
-
Project-URL:
|
20
|
+
Project-URL: www, https://zzz.bwh.harvard.edu/luna
|
21
|
+
Project-URL: github, http://github.com/remnrem/luna-api
|
22
22
|
Requires-Python: >=3.9
|
23
23
|
Requires-Dist: pandas<3,>=2
|
24
24
|
Requires-Dist: numpy>=2
|
@@ -0,0 +1,8 @@
|
|
1
|
+
lunapi-1.3.0.dist-info/RECORD,,
|
2
|
+
lunapi-1.3.0.dist-info/WHEEL,sha256=oeaqksGkf-80Owufqv_HTXjJrxDpA_v_U7oZjvUH15Y,114
|
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=LYoeiqxqQm90csHBJWIYFBtdMMgi_2cQajAUidNCHU0,16305232
|
6
|
+
lunapi/__init__.py,sha256=cDep9d2N4KKUt81AzHUyFsuRdGwxCD1rqqFmptsAqsk,352
|
7
|
+
lunapi/lunapi1.py,sha256=5qx6ZIw-aqzTF7C3rwnvRxGuqmI-Qp7lDqqmeDNim6M,93885
|
8
|
+
lunapi/lunapi0.cpp,sha256=fzsbr3q6RFQHmFS-69BRu3sOzrTGU79mrDwxtTtkIlA,14266
|
lunapi-1.2.1.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
lunapi-1.2.1.dist-info/RECORD,,
|
2
|
-
lunapi-1.2.1.dist-info/WHEEL,sha256=rOJaAfyDeYqpyZcvF2uMKwvjCoDaR0tVOjIX1nCiRq8,114
|
3
|
-
lunapi-1.2.1.dist-info/METADATA,sha256=kQ3-SdHdIbgO1Q1ezIdqswJQE71NUuOdYhZ1iggYKPw,1519
|
4
|
-
lunapi-1.2.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
5
|
-
lunapi/lunapi0.cpython-310-darwin.so,sha256=3PmwXSQkdW_SmQA1QCliDOyY8QW0ynzuua34sGRrsBQ,15851024
|
6
|
-
lunapi/__init__.py,sha256=cDep9d2N4KKUt81AzHUyFsuRdGwxCD1rqqFmptsAqsk,352
|
7
|
-
lunapi/lunapi1.py,sha256=phnWVTJ1vbCsNk96Sfz4qk-hHmFqng5zCaxuFDL-M90,92343
|
8
|
-
lunapi/lunapi0.cpp,sha256=nQ5cwNdm4fvZ5TSDSxrgWu8Luw1r6NyDsvDWu9sLv7I,13053
|
File without changes
|