Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jason Milhone
brb_piscope
Commits
f3b35a0b
Commit
f3b35a0b
authored
Apr 03, 2019
by
Jason Milhone
Browse files
Pretty sure this has the pcx fixes
parent
3b52886c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Configs/pcx_dischage.ini
View file @
f3b35a0b
...
...
@@ -120,24 +120,25 @@
y
=
disch_curr.anode5
color
=
"#9467bd"
[03]
ylabel
=
A
ylabel
=
m
A
legend
=
True
[[MP1A]
]
x
=
dim_of(mach_curr.mp1)
y
=
DATA(mach_curr.mp1[*,
0])
y
=
"1e3*
DATA(mach_curr.mp1[*,0])
"
color
=
"#1f77b4"
[[MP1B]
]
x
=
dim_of(mach_curr.mp1)
y
=
data(mach_curr.mp1[*,
1])
y
=
"1e3*
data(mach_curr.mp1[*,1])
"
color
=
"#ff7f0e"
[13]
ylabel
=
kW
legend
=
True
xlabel
=
""
[[BAPS1]
]
x
=
dim_of(disch_curr.cathode0)
y
=
-disch_volt.cathode0 * disch_curr.cathode0 * 0.001
color
=
"#1f77b4"
[[BAPS2]
]
x
=
dim_of(aux_lem.aux_lem_2)
y
=
aux_lem.aux_lem_2*(data(disch_curr.cathode1)+data(disch_curr.cathode2)+data(disch_curr.cathode3)+data(disch_curr.cathode4)+data(aux_lem.aux_lem_4))*0.001
y
=
aux_lem.aux_lem_2*(data(disch_curr.cathode1)+data(disch_curr.cathode2)+data(disch_curr.cathode3)+data(disch_curr.cathode4)+data(aux_lem.aux_lem_4))*0.001
*-1
color
=
"#ff7f0e"
source/config/parser.py
View file @
f3b35a0b
...
...
@@ -8,9 +8,11 @@ default_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728',
def
config_parser
(
filename
):
config
=
ConfigObj
(
filename
)
print
(
filename
)
config
=
ConfigObj
(
filename
,
raise_errors
=
True
)
config
=
config
.
dict
()
col_setup
=
config
[
'setup'
][
'col'
]
col_setup
=
[
int
(
x
)
for
x
in
col_setup
]
...
...
@@ -42,6 +44,7 @@ def get_data_locs(config):
for
key
in
config
.
keys
():
if
key
.
lower
()
!=
'setup'
:
data_locs
[
key
]
=
config
[
key
]
#print(config[key])
parse_data_colors
(
config
,
key
)
return
data_locs
...
...
@@ -60,6 +63,7 @@ def parse_data_colors(config, key):
keys
.
sort
()
top_ignore
=
[
'xlabel'
,
'ylabel'
,
'xlim'
,
'ylim'
,
'legend'
,
'noresample'
,
'xshare'
]
j
=
0
#print(keys)
for
k
in
keys
:
if
k
not
in
top_ignore
:
# this is a signal
...
...
@@ -67,4 +71,7 @@ def parse_data_colors(config, key):
if
'color'
not
in
local_config
[
k
].
keys
():
config
[
key
][
k
][
'color'
]
=
default_colors
[
j
%
10
]
j
+=
1
if
isinstance
(
config
[
key
][
k
].
get
(
'y'
,
None
),
list
):
print
(
"I found you!"
)
config
[
key
][
k
][
'y'
]
=
','
.
join
(
config
[
key
][
k
][
'y'
])
print
(
config
[
key
][
k
][
'y'
])
source/gui/piscope.py
View file @
f3b35a0b
...
...
@@ -120,6 +120,7 @@ class PiScope(QtWidgets.QMainWindow):
self
.
acquiring_data
=
False
if
config_file
is
not
None
:
print
(
config_file
)
self
.
load_configuration
(
config_file
)
if
shot_number
is
None
:
...
...
wippl_piscope.py
View file @
f3b35a0b
...
...
@@ -5,7 +5,7 @@ import argparse
import
source.gui.piscope
as
MyApp
#import logging
from
source.logging.piscope_logging
import
create_logger
,
log
import
os.path
as
path
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
(
description
=
"Run a PiScope for the Big Red Ball."
)
...
...
@@ -39,5 +39,8 @@ if __name__ == "__main__":
myapp
=
QApplication
([])
myapp
.
setWindowIcon
(
QIcon
(
"Icons/application-wave.png"
))
print
(
args
.
config
,
type
(
args
.
config
))
import
os
print
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
window
=
MyApp
.
PiScope
(
args
.
config
,
args
.
shot_number
)
myapp
.
exec_
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment