Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor 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
calibration
pycalibration
Merge requests
!116
Feat: Optimace CalDB requests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat: Optimace CalDB requests
feat/update_plotCalDB
into
master
Overview
26
Commits
7
Pipelines
0
Changes
4
Merged
Mikhail Karnevskiy
requested to merge
feat/update_plotCalDB
into
master
5 years ago
Overview
21
Commits
7
Pipelines
0
Changes
4
Expand
@ahmedk
@haufs
Number of requests to the calibration DB is significantly reduced.
0
0
Merge request reports
Compare
master
version 9
98fb3e7b
5 years ago
version 8
22dab485
5 years ago
version 7
cf4f5d01
5 years ago
version 6
a7228c3d
5 years ago
version 5
ea1e7dbd
5 years ago
version 4
5f794d5c
5 years ago
version 3
bee0d0bb
5 years ago
version 2
0e8b2185
5 years ago
version 1
b3dfa906
5 years ago
master (base)
and
version 4
latest version
47791596
7 commits,
5 years ago
version 9
98fb3e7b
6 commits,
5 years ago
version 8
22dab485
5 commits,
5 years ago
version 7
cf4f5d01
4 commits,
5 years ago
version 6
a7228c3d
3 commits,
5 years ago
version 5
ea1e7dbd
3 commits,
5 years ago
version 4
5f794d5c
3 commits,
5 years ago
version 3
bee0d0bb
2 commits,
5 years ago
version 2
0e8b2185
2 commits,
5 years ago
version 1
b3dfa906
1 commit,
5 years ago
4 files
+
897
−
356
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
cal_tools/cal_tools/ana_tools.py
+
44
−
0
Options
@@ -135,6 +135,50 @@ def recursively_save_dict_contents_to_group(h5file, path, dic):
raise
ValueError
(
'
Cannot save %s type.
'
%
type
(
item
))
def
combine_lists
(
*
args
,
names
=
None
):
"""
Combine several lists to a list of dictionary or a list of lists
Each dictionary contain a set of elements, one from each list
:param args: several lists to be combined
:param names: list of names (the length equal to the number of args)
:return: list of dictionary of list of lists
Example:
.. code-block:: python
# define input lists
a = [100,200]
b = [0,1,2]
c = [25]
comb = combine_lists(a,b,c)
# comb: [[100, 0, 25], [100, 1, 25], [100, 2, 25],
# [200, 0, 25], [200, 1, 25], [200, 2, 25]]
comb = combine_lists(a,b,c, names=[
'
Voltage
'
,
'
Gain
'
,
'
Temperature
'
])
# comb: [{
'
Voltage
'
: 100,
'
Gain
'
: 0,
'
Temperature
'
: 25},
# {
'
Voltage
'
: 100,
'
Gain
'
: 1,
'
Temperature
'
: 25},
# {
'
Voltage
'
: 100,
'
Gain
'
: 2,
'
Temperature
'
: 25},
# {
'
Voltage
'
: 200,
'
Gain
'
: 0,
'
Temperature
'
: 25},
# {
'
Voltage
'
: 200,
'
Gain
'
: 1,
'
Temperature
'
: 25},
# {
'
Voltage
'
: 200,
'
Gain
'
: 2,
'
Temperature
'
: 25}]
"""
params
=
list
(
map
(
tuple
,
args
))
possible_params
=
[[]]
for
param
in
params
:
possible_params
=
[
x
+
[
y
]
for
x
in
possible_params
for
y
in
param
]
if
isinstance
(
names
,
(
list
,
tuple
)):
assert
len
(
names
)
==
len
(
args
)
d_possible_params
=
[]
for
par
in
possible_params
:
d_possible_params
.
append
(
dict
(
zip
(
names
,
par
)))
return
d_possible_params
return
possible_params
def
combine_constants
(
ctimes_a
,
ctimes_b
):
"""
Combine two numpy arrays of timestamp
Loading