Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GSRP TDOA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxence Ferrari
GSRP TDOA
Commits
73101651
Commit
73101651
authored
2 years ago
by
ferrari
Browse files
Options
Downloads
Patches
Plain Diff
Auto compile c_corr
parent
ac1857d8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cython_setup.py
+1
-3
1 addition, 3 deletions
cython_setup.py
gsrp_tdoa_hyperres.py
+22
-14
22 additions, 14 deletions
gsrp_tdoa_hyperres.py
with
23 additions
and
17 deletions
cython_setup.py
+
1
−
3
View file @
73101651
from
distutils.core
import
setup
from
distutils.core
import
setup
from
Cython.Build
import
cythonize
from
Cython.Build
import
cythonize
setup
(
setup
(
ext_modules
=
cythonize
(
"
c_corr.pyx
"
,
annotate
=
True
,
compiler_directives
=
{
'
language_level
'
:
"
3
"
}))
ext_modules
=
cythonize
(
"
c_corr.pyx
"
,
annotate
=
True
,
compiler_directives
=
{
'
language_level
'
:
"
3
"
})
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
gsrp_tdoa_hyperres.py
+
22
−
14
View file @
73101651
import
argparse
import
itertools
import
os
import
os
import
sys
import
sys
import
itertools
import
argparse
from
sklearn.pipeline
import
Pipeline
from
sklearn.preprocessing
import
PolynomialFeatures
from
sklearn.linear_model
import
LinearRegression
import
numpy
as
np
from
numpy.fft
import
rfft
,
irfft
import
scipy.signal
as
sg
import
scipy.signal
as
sg
import
soundfile
as
sf
import
soundfile
as
sf
import
c_corr
from
numpy.fft
import
rfft
,
irfft
from
gsrp_smart_util
import
*
from
math
import
ceil
from
scipy.signal.windows
import
tukey
from
scipy.signal.windows
import
tukey
from
sklearn.linear_model
import
LinearRegression
from
sklearn.pipeline
import
Pipeline
from
sklearn.preprocessing
import
PolynomialFeatures
try
:
from
gsrp_smart_util
import
*
from
tqdm
import
trange
except
ImportError
:
trange
=
range
class
BColors
:
class
BColors
:
...
@@ -32,6 +26,20 @@ class BColors:
...
@@ -32,6 +26,20 @@ class BColors:
UNDERLINE
=
'
\033
[4m
'
UNDERLINE
=
'
\033
[4m
'
try
:
import
c_corr
except
ModuleNotFoundError
:
print
(
f
'
{
BColors
.
WARNING
}
Unable to load c_corr. Attempting to recompile...
{
BColors
.
ENDC
}
'
)
from
subprocess
import
run
run
(
'
python cython_setup.py build_ext --inplace
'
.
split
())
import
c_corr
print
(
f
'
{
BColors
.
OKGREEN
}
Done
{
BColors
.
ENDC
}
'
)
try
:
from
tqdm
import
trange
except
ImportError
:
trange
=
range
def
intlist
(
s
):
def
intlist
(
s
):
return
list
(
map
(
int
,
s
.
split
(
'
,
'
)))
return
list
(
map
(
int
,
s
.
split
(
'
,
'
)))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment