Add dependencies and format
This commit is contained in:
parent
5d801b0f3a
commit
e3fea228a7
2 changed files with 10 additions and 20 deletions
|
@ -15,6 +15,11 @@ classifiers = [
|
||||||
"Development Status :: 2 - Pre-Alpha",
|
"Development Status :: 2 - Pre-Alpha",
|
||||||
"Topic :: Scientific/Engineering",
|
"Topic :: Scientific/Engineering",
|
||||||
]
|
]
|
||||||
|
dependencies = [
|
||||||
|
"numpy",
|
||||||
|
"scipy",
|
||||||
|
"rich",
|
||||||
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://git.linarphy.net/linarphy/backscattering-analyzer"
|
Homepage = "https://git.linarphy.net/linarphy/backscattering-analyzer"
|
||||||
|
|
|
@ -187,29 +187,14 @@ class Analyzer:
|
||||||
"""
|
"""
|
||||||
coupling = self.modelisation[self.settings.coupling_name()]
|
coupling = self.modelisation[self.settings.coupling_name()]
|
||||||
|
|
||||||
coupling_1, coupling_2 = (
|
nperseg = int(len(coupling[0]) * 2) - 1
|
||||||
array(
|
|
||||||
[
|
|
||||||
self.modelisation["freq"][0],
|
|
||||||
coupling[0],
|
|
||||||
]
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
[
|
|
||||||
self.modelisation["freq"][0],
|
|
||||||
coupling[1],
|
|
||||||
]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
rate = 1 / (self.movement[0, 1] - self.movement[0, 0])
|
rate = 1 / (self.movement[0, 1] - self.movement[0, 0])
|
||||||
|
|
||||||
result = zeros(self.bench_movement.shape[1])
|
result = zeros(coupling.shape[1])
|
||||||
scattering_factor = [0, 0]
|
scattering_factor = [0, 0]
|
||||||
|
|
||||||
for index in range(
|
for index in range(len(coupling)):
|
||||||
len(self.modelisation[self.settings.coupling_name()])
|
|
||||||
):
|
|
||||||
argument = (
|
argument = (
|
||||||
self.movement[1]
|
self.movement[1]
|
||||||
* 4
|
* 4
|
||||||
|
@ -226,7 +211,7 @@ class Analyzer:
|
||||||
psd(
|
psd(
|
||||||
sin(argument),
|
sin(argument),
|
||||||
fs=rate,
|
fs=rate,
|
||||||
nperseg=2999,
|
nperseg=nperseg,
|
||||||
)[1]
|
)[1]
|
||||||
* abs(coupling[0])
|
* abs(coupling[0])
|
||||||
)
|
)
|
||||||
|
@ -235,7 +220,7 @@ class Analyzer:
|
||||||
psd(
|
psd(
|
||||||
cos(argument),
|
cos(argument),
|
||||||
fs=rate,
|
fs=rate,
|
||||||
nperseg=2999,
|
nperseg=nperseg,
|
||||||
)[1]
|
)[1]
|
||||||
* abs(coupling[1])
|
* abs(coupling[1])
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue