Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenQlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
las-nq
OpenQlab
Commits
35ccb25a
Commit
35ccb25a
authored
5 years ago
by
Luis Dekant
Browse files
Options
Downloads
Patches
Plain Diff
some description changes
parent
cb942282
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/openqlab/analysis/servo_design.py
+8
-2
8 additions, 2 deletions
src/openqlab/analysis/servo_design.py
src/tests/test_analysis/test_servo_design/test_servo_design.py
+7
-7
7 additions, 7 deletions
...ests/test_analysis/test_servo_design/test_servo_design.py
with
15 additions
and
9 deletions
src/openqlab/analysis/servo_design.py
+
8
−
2
View file @
35ccb25a
...
...
@@ -199,7 +199,10 @@ class Integrator(Filter):
@property
def
description
(
self
):
return
"
Int {0}
"
.
format
(
human_readable
(
self
.
corner_frequency
,
"
Hz
"
))
return
"
Int {0}, Slope {1}
"
.
format
(
human_readable
(
self
.
corner_frequency
,
"
Hz
"
),
human_readable
(
self
.
second_parameter
,
"
Hz
"
),
)
@property
def
sF
(
self
):
...
...
@@ -234,7 +237,10 @@ class Differentiator(Filter):
@property
def
description
(
self
):
return
"
Diff {0}
"
.
format
(
human_readable
(
self
.
corner_frequency
,
"
Hz
"
))
return
"
Diff {0}, Slope {1}
"
.
format
(
human_readable
(
self
.
corner_frequency
,
"
Hz
"
),
human_readable
(
self
.
second_parameter
,
"
Hz
"
),
)
@property
def
sF
(
self
):
...
...
This diff is collapsed.
Click to expand it.
src/tests/test_analysis/test_servo_design/test_servo_design.py
+
7
−
7
View file @
35ccb25a
...
...
@@ -293,14 +293,14 @@ class TestServoDesign(unittest.TestCase):
def
test_description
(
self
):
self
.
sd
.
integrator
(
438
)
self
.
assertEqual
(
self
.
sd
.
filters
[
0
].
description
,
"
Int 438 Hz
"
)
self
.
assertEqual
(
self
.
sd
.
filters
[
0
].
description
,
"
Int 438 Hz
, Slope 438 mHz
"
)
self
.
sd
.
filters
[
0
].
corner_frequency
=
1200
self
.
assertEqual
(
self
.
sd
.
filters
[
0
].
description
,
"
Int 1.2 kHz
"
)
self
.
assertEqual
(
self
.
sd
.
filters
[
0
].
description
,
"
Int 1.2 kHz
, Slope 438 mHz
"
)
self
.
sd
.
differentiator
(
438
)
self
.
assertEqual
(
self
.
sd
.
filters
[
1
].
description
,
"
Diff 438 Hz
"
)
self
.
assertEqual
(
self
.
sd
.
filters
[
1
].
description
,
"
Diff 438 Hz
, Slope 4.38 kHz
"
)
self
.
sd
.
filters
[
1
].
corner_frequency
=
1200
self
.
assertEqual
(
self
.
sd
.
filters
[
1
].
description
,
"
Diff 1.2 kHz
"
)
self
.
assertEqual
(
self
.
sd
.
filters
[
1
].
description
,
"
Diff 1.2
kHz, Slope 4.38
kHz
"
)
self
.
sd
.
lowpass
(
438
)
self
.
assertEqual
(
self
.
sd
.
filters
[
2
].
description
,
"
LP2 438 Hz, Q=0.707
"
)
...
...
@@ -322,7 +322,7 @@ class TestServoDesign(unittest.TestCase):
"
gain
"
:
1.0
,
"
filters
"
:
[
{
"
description
"
:
"
Int 500 Hz
"
,
"
description
"
:
"
Int 500 Hz
, Slope 500 mHz
"
,
"
sos
"
:
np
.
array
(
[
1.0156933
,
-
0.98427528
,
0.0
,
1.0
,
-
0.99996858
,
0.0
]
),
...
...
@@ -392,7 +392,7 @@ class TestServoDesign(unittest.TestCase):
"
gain
"
:
1.0
,
"
filters
"
:
[
{
"
description
"
:
"
Int 500 Hz
"
,
"
description
"
:
"
Int 500 Hz
, Slope 500 mHz
"
,
"
sos
"
:
np
.
array
(
[
1.0156933
,
-
0.98427528
,
0.0
,
1.0
,
-
0.99996858
,
0.0
]
),
...
...
@@ -408,7 +408,7 @@ class TestServoDesign(unittest.TestCase):
"
index
"
:
1
,
},
{
"
description
"
:
"
Int 500 Hz
"
,
"
description
"
:
"
Int 500 Hz
, Slope 500 mHz
"
,
"
sos
"
:
np
.
array
(
[
1.0156933
,
-
0.98427528
,
0.0
,
1.0
,
-
0.99996858
,
0.0
]
),
...
...
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