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",
|
||||
"Topic :: Scientific/Engineering",
|
||||
]
|
||||
dependencies = [
|
||||
"numpy",
|
||||
"scipy",
|
||||
"rich",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://git.linarphy.net/linarphy/backscattering-analyzer"
|
||||
|
|
|
@ -187,29 +187,14 @@ class Analyzer:
|
|||
"""
|
||||
coupling = self.modelisation[self.settings.coupling_name()]
|
||||
|
||||
coupling_1, coupling_2 = (
|
||||
array(
|
||||
[
|
||||
self.modelisation["freq"][0],
|
||||
coupling[0],
|
||||
]
|
||||
),
|
||||
array(
|
||||
[
|
||||
self.modelisation["freq"][0],
|
||||
coupling[1],
|
||||
]
|
||||
),
|
||||
)
|
||||
nperseg = int(len(coupling[0]) * 2) - 1
|
||||
|
||||
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]
|
||||
|
||||
for index in range(
|
||||
len(self.modelisation[self.settings.coupling_name()])
|
||||
):
|
||||
for index in range(len(coupling)):
|
||||
argument = (
|
||||
self.movement[1]
|
||||
* 4
|
||||
|
@ -226,7 +211,7 @@ class Analyzer:
|
|||
psd(
|
||||
sin(argument),
|
||||
fs=rate,
|
||||
nperseg=2999,
|
||||
nperseg=nperseg,
|
||||
)[1]
|
||||
* abs(coupling[0])
|
||||
)
|
||||
|
@ -235,7 +220,7 @@ class Analyzer:
|
|||
psd(
|
||||
cos(argument),
|
||||
fs=rate,
|
||||
nperseg=2999,
|
||||
nperseg=nperseg,
|
||||
)[1]
|
||||
* abs(coupling[1])
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue