Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ArchiveExtractor
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
ArchiveExtractor
Commits
42ee9b21
Commit
42ee9b21
authored
1 year ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
feat: Add a test on boolean extraction, add one example
parent
04a74bb7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/RechercheBruitFSync.py
+53
-0
53 additions, 0 deletions
examples/RechercheBruitFSync.py
test/test_01.py
+5
-0
5 additions, 0 deletions
test/test_01.py
with
58 additions
and
0 deletions
examples/RechercheBruitFSync.py
0 → 100644
+
53
−
0
View file @
42ee9b21
import
ArchiveExtractor
as
AE
import
matplotlib.pyplot
as
plt
import
matplotlib.ticker
as
mtk
import
matplotlib.dates
as
mdates
# %% Extraction depuis la HDB
data
=
AE
.
extract
({
"
current
"
:
"
ans/dg/dcct-ctrl/current
"
,
"
xint_1kHz
"
:
'
ANS-C07/DG/MESURESPECTRE/X_1kHz
'
,
"
xint_10kHz
"
:
'
ANS-C07/DG/MESURESPECTRE/X_10kHz
'
,
"
zint_1kHz
"
:
'
ANS-C07/DG/MESURESPECTRE/z_1kHz
'
,
"
zint_10kHz
"
:
'
ANS-C07/DG/MESURESPECTRE/z_10kHz
'
,
"
fofb
"
:
'
ANS/DG/FOFB-WATCHER/FOFBRunning_x
'
,
"
fofb_old
"
:
'
ANS/DG/FOFB-MANAGER/xFofbRunning
'
,
"
temperature
"
:
'
T7/GTC/Circuit_30C/temperature_retour
'
,
},
"
2024-01-24-20:00
"
,
"
2024-01-29
"
,
method
=
"
between
"
,
db
=
"
H
"
)
#%% Affichage via Matplotlib
fig
,
axes
=
plt
.
subplots
(
3
,
1
,
sharex
=
True
,
figsize
=
(
12
,
8
))
axes
[
0
].
set_title
(
"
Courant et FOFB running
"
)
axes
[
0
].
plot
(
data
[
"
current
"
],
label
=
"
courant (mA)
"
)
axes
[
0
].
plot
(
data
[
"
fofb
"
]
*
400
,
drawstyle
=
"
steps-post
"
,
label
=
"
fofb (new)
"
)
axes
[
0
].
plot
(
data
[
"
fofb_old
"
]
*
400
,
drawstyle
=
"
steps-post
"
,
label
=
"
fofb (old)
"
)
axes
[
1
].
set_title
(
"
Bruit integré
"
)
axes
[
1
].
plot
(
data
[
"
xint_1kHz
"
],
label
=
"
X 1kHz
"
)
axes
[
1
].
plot
(
data
[
"
xint_10kHz
"
],
label
=
"
X 10kHz
"
)
axes
[
1
].
plot
(
data
[
"
zint_1kHz
"
],
label
=
"
Y 1kHz
"
)
axes
[
1
].
plot
(
data
[
"
zint_10kHz
"
],
label
=
"
Y 10kHz
"
)
axes
[
1
].
set_ylabel
(
"
µm
"
)
axes
[
2
].
set_title
(
"
Température
"
)
axes
[
2
].
plot
(
data
[
"
temperature
"
],
label
=
"
retour 30°
"
)
for
ax
in
axes
:
ax
.
legend
()
ax
.
grid
(
alpha
=
.
3
)
locator
=
mdates
.
AutoDateLocator
()
ax
.
xaxis
.
set_major_locator
(
locator
)
ax
.
xaxis
.
set_major_formatter
(
mdates
.
ConciseDateFormatter
(
locator
))
fig
.
tight_layout
()
This diff is collapsed.
Click to expand it.
test/test_01.py
+
5
−
0
View file @
42ee9b21
...
...
@@ -103,5 +103,10 @@ logger.debug(val)
if
val
is
None
:
raise
RuntimeError
(
"
Could not perform extraction
"
)
logger
.
info
(
"
Testing extract() ; scalar boolean, between, precise date
"
)
val
=
ArchiveExtractor
.
extract
(
"
ans/dg/fofb-watcher/fofbrunning_x
"
,
"
2024-01-29-00:30
"
,
"
2024-01-29-15:30
"
,
method
=
'
between
'
)
logger
.
debug
(
val
)
if
val
is
None
:
raise
RuntimeError
(
"
Could not perform extraction
"
)
logger
.
info
(
"
Test success !
"
)
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