Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
DevHub
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
DevHub
Commits
c5f6e93c
Commit
c5f6e93c
authored
2 years ago
by
Thomas Bock
Browse files
Options
Downloads
Patches
Plain Diff
mks670 pp
parent
1937004e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/devhub/pp.clj
+2
-0
2 additions, 0 deletions
src/devhub/pp.clj
src/devhub/pp_scripts/mks670.clj
+15
-1
15 additions, 1 deletion
src/devhub/pp_scripts/mks670.clj
src/devhub/pp_utils.clj
+4
-3
4 additions, 3 deletions
src/devhub/pp_utils.clj
with
21 additions
and
4 deletions
src/devhub/pp.clj
+
2
−
0
View file @
c5f6e93c
...
@@ -48,6 +48,8 @@
...
@@ -48,6 +48,8 @@
:mks670.saw-tooth
(
mks670/saw-tooth
task
)
:mks670.saw-tooth
(
mks670/saw-tooth
task
)
:mks670.drift
(
mks670/drift
task
)
:mks670.drift
(
mks670/drift
task
)
:mks670.ctrl
(
mks670/ctrl
task
)
:mks670.ctrl
(
mks670/ctrl
task
)
:mks670.pressure-loss
(
mks670/pressure-loss
task
)
:mks670.read-out
(
mks670/read-out
task
)
:mks-srg3.read-out
(
mks-srg3/read-out
task
)
:mks-srg3.read-out
(
mks-srg3/read-out
task
)
:mks-srg3.read-with-slope
(
mks-srg3/read-with-slope
task
)
:mks-srg3.read-with-slope
(
mks-srg3/read-with-slope
task
)
...
...
This diff is collapsed.
Click to expand it.
src/devhub/pp_scripts/mks670.clj
+
15
−
1
View file @
c5f6e93c
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
(
second
(
re-matches
r
s
))))
(
second
(
re-matches
r
s
))))
(
defn
prologix-extract
[
s
]
(
defn
prologix-extract
[
s
]
(
let
[
r
#
"MEASURING\s*([+-]*[0-9]{0,5}\.[0-9]{1,6}[E]*[-+]*[0-9]
{0,3}
)"
]
(
let
[
r
#
"MEASURING\s*([+-]*[0-9]{0,5}\.[0-9]{1,6}[E]*[-+]*[0-9]
*
)"
]
(
second
(
re-matches
r
s
))))
(
second
(
re-matches
r
s
))))
(
defn
test-saw-tooth
[{
x
:_x
t0
:_t_start
t1
:_t_stop
:as
task
}]
(
defn
test-saw-tooth
[{
x
:_x
t0
:_t_start
t1
:_t_stop
:as
task
}]
...
@@ -83,3 +83,17 @@
...
@@ -83,3 +83,17 @@
:Filling_pressure_dev
{
:Value
dp
:Filling_pressure_dev
{
:Value
dp
:Unit
"1"
}
:Unit
"1"
}
:Filling_pressure_ok
{
:Ready
(
<
dp
eps
)}}})))
:Filling_pressure_ok
{
:Ready
(
<
dp
eps
)}}})))
(
defn
pressure-loss
[{
x
:_x
t0
:_t_start
t1
:_t_stop
:as
task
}]
(
let
[
v
(
mapv
prologix-extract
x
)
o
(
ppu/operable
v
)
y
(
ppu/calc-seq
v
o
)
t
(
ppu/t0t1->t
(
ppu/calc-seq
t0
o
)
(
ppu/calc-seq
t1
o
))]
(
assoc
task
:Result
[(
ppu/vl-result
"loss_slope_x"
(
ppu/slope
y
t
)
"Pa/ms"
)])))
(
defn
read-out
[{{
unit
:Unit
token
:Type
}
:PostScriptInput
x
:_x
:as
task
}]
(
let
[
v
(
mapv
prologix-extract
x
)
o
(
ppu/operable
v
)
y
(
ppu/calc-seq
v
o
)]
(
assoc
task
:Result
[(
ppu/vl-result
token
y
unit
)])))
This diff is collapsed.
Click to expand it.
src/devhub/pp_utils.clj
+
4
−
3
View file @
c5f6e93c
...
@@ -135,9 +135,10 @@
...
@@ -135,9 +135,10 @@
(
let
[
mX
(
mean
x
)
(
let
[
mX
(
mean
x
)
mY
(
mean
y
)
mY
(
mean
y
)
x-mX
(
mapv
(
fn
[
a
]
(
-
a
mX
))
x
)
x-mX
(
mapv
(
fn
[
a
]
(
-
a
mX
))
x
)
y-mY
(
mapv
(
fn
[
a
]
(
-
a
mY
))
y
)]
y-mY
(
mapv
(
fn
[
a
]
(
-
a
mY
))
y
)
(
/
(
reduce
+
(
mapv
*
x-mX
y-mY
))
a
(
reduce
+
(
mapv
*
x-mX
y-mY
))
(
reduce
+
(
mapv
square
x-mX
)))))
b
(
reduce
+
(
mapv
square
x-mX
))]
(
if
(
zero?
b
)
0.0
(
/
a
b
))))
(
defn
intercept
[
y
x
]
(
-
(
mean
y
)
(
*
(
slope
y
x
)
(
mean
x
))))
(
defn
intercept
[
y
x
]
(
-
(
mean
y
)
(
*
(
slope
y
x
)
(
mean
x
))))
...
...
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