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
Commits
b8983523
Commit
b8983523
authored
5 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
copy figs of diff dets in on instr. and new conf
parent
9177a0fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!127
feat/copy Figs of diff DETs in one INST
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reportservice/report_conf.yaml
+137
-8
137 additions, 8 deletions
reportservice/report_conf.yaml
reportservice/report_service.py
+22
-20
22 additions, 20 deletions
reportservice/report_service.py
with
159 additions
and
28 deletions
reportservice/report_conf.yaml
+
137
−
8
View file @
b8983523
...
@@ -3,19 +3,19 @@ GLOBAL:
...
@@ -3,19 +3,19 @@ GLOBAL:
figures-local
:
"
/gpfs/exfel/data/scratch/ahmedk/calibration/DetectorCharacterization/figures"
figures-local
:
"
/gpfs/exfel/data/scratch/ahmedk/calibration/DetectorCharacterization/figures"
repo-local
:
"
/gpfs/exfel/data/scratch/ahmedk/calibration/DetectorCharacterization/"
repo-local
:
"
/gpfs/exfel/data/scratch/ahmedk/calibration/DetectorCharacterization/"
figures-remote
:
"
http://git@git.xfel.eu/gitlab/detectors/DetectorCharacterization.git"
figures-remote
:
"
http://git@git.xfel.eu/gitlab/detectors/DetectorCharacterization.git"
server-port
:
"
tcp://max-exfl015:555
5
"
server-port
:
"
tcp://max-exfl015:555
6
"
run-on
:
run-on
:
-
Fri
day 08:30:00 UTC
-
Mon
day 08:30:00 UTC
-
Friday 10:33:00 UTC
-
Friday 10:33:00 UTC
report-service
:
report-service
:
port
:
555
5
port
:
555
6
bind-to
:
tcp://*
bind-to
:
tcp://*
allowed-ips
:
allowed-ips
:
job-db
:
./
web
service_jobs.sqlite
job-db
:
./
report
service_jobs.sqlite
job-update-interval
:
30
job-update-interval
:
30
job-timeout
:
36
00
job-timeout
:
120
00
SPB
:
SPB
:
AGIPD1M1
:
AGIPD1M1
:
...
@@ -29,7 +29,7 @@ SPB:
...
@@ -29,7 +29,7 @@ SPB:
-
"
SlopesFF"
-
"
SlopesFF"
-
"
SlopesPC"
-
"
SlopesPC"
-
"
Offset"
-
"
Offset"
modules
:
"
0-
15
"
modules
:
"
0-
3
"
bias-voltages
:
bias-voltages
:
-
300
-
300
-
500
-
500
...
@@ -37,7 +37,136 @@ SPB:
...
@@ -37,7 +37,136 @@ SPB:
-
128
-
128
-
176
-
176
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
/gpfs/exfel/data/scratch/karnem/testAGIPD16_21/"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/karnem/testAGIPD16_21/"
out-folder
:
"
/gpfs/exfel/data/scratch/ahmedk/tmp_files/AGIPD1M1_out1/"
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
MID
:
AGIPD1M2
:
det-type
:
-
"
AGIPD"
-
"
STATS_FROM_DB"
db-module
:
"
AGIPD1M2"
start-date
:
"
2019-01-01"
end-date
:
"
2019-12-12"
constants
:
-
"
Noise"
-
"
SlopesFF"
-
"
SlopesPC"
-
"
Offset"
modules
:
"
0-3"
bias-voltages
:
-
300
-
500
mem-cells
:
-
176
photon-energy
:
9.2
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/ahmedk/tmp_files/AGIPD1M2_out1/"
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
range-offset
:
-
800.
-
1500.
-
600
-
900
range-noise
:
-
2.0
-
16.
-
1.0
-
7.0
range-gain
:
-
20
-
30
-
20
-
30
range-noise-e
:
-
100.
-
600.
-
100.
-
600.
range-slopesPC
:
-
0.95
-
1.05
-
0.0
-
0.5
range-slopesFF
:
-
0.8
-
1.2
-
0.8
-
1.2
EPIX01
:
det-type
:
-
"
EPIX"
-
"
STATS_FROM_DB"
db-module
:
"
ePix100_M15"
start-date
:
"
2019-01-01"
end-date
:
"
2019-05-12"
constants
:
-
"
Noise"
-
"
Offset"
bias-voltage
:
-
200
temperature
:
-
288
integration-time
:
-
1
-
50
photon-energy
:
9.2
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/ahmedk/tmp_files/EPIX01_out1/"
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
EPIX02
:
det-type
:
-
"
EPIX"
-
"
STATS_FROM_DB"
db-module
:
"
ePix100_M18"
start-date
:
"
2019-01-01"
end-date
:
"
2019-05-12"
constants
:
-
"
Noise"
-
"
Offset"
bias-voltage
:
-
200
temperature
:
-
288
integration-time
:
-
1
-
50
photon-energy
:
9.2
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/ahmedk/tmp_files/EPIX02_out1/"
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
FXE
:
LPD1M1
:
det-type
:
-
"
LPD"
-
"
STATS_FROM_DB"
db-module
:
"
LPD1M1"
start-date
:
"
2018-01-01"
end-date
:
"
2018-12-12"
constants
:
-
"
Noise"
-
"
SlopesFF"
-
"
SlopesCI"
-
"
Offset"
modules
:
"
0-3"
bias-voltages
:
-
250
-
500
mem-cells
:
-
1
-
128
-
256
-
512
photon-energy
:
9.2
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/ahmedk/tmp_files/LPD1M1_out1/"
cal-db-timeout
:
180000
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
This diff is collapsed.
Click to expand it.
reportservice/report_service.py
+
22
−
20
View file @
b8983523
...
@@ -262,31 +262,33 @@ async def server_runner(conf_file):
...
@@ -262,31 +262,33 @@ async def server_runner(conf_file):
logging
.
error
(
'
Jobs timeout!
'
)
logging
.
error
(
'
Jobs timeout!
'
)
# Copy all plots
# Copy all plots
out_folder
=
det_conf
[
'
out-folder
'
]
for
det_name
,
det_conf
in
instrument
.
items
():
path
=
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
figures-local
'
]
figures
=
glob
.
glob
(
"
{}/*png
"
.
format
(
out_folder
))
out_folder
=
det_conf
[
'
out-folder
'
]
logging
.
info
(
'
Copy figures to: {}
'
.
format
(
path
))
path
=
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
figures-local
'
]
figures
=
glob
.
glob
(
"
{}/*png
"
.
format
(
out_folder
))
logging
.
info
(
'
Copy figures to: {}
'
.
format
(
path
))
det_new_files
=
{}
det_new_files
=
{}
for
f
in
figures
:
for
f
in
figures
:
const
=
f
.
split
(
'
/
'
)[
-
1
].
split
(
'
_
'
)[
0
]
const
=
f
.
split
(
'
/
'
)[
-
1
].
split
(
'
_
'
)[
0
]
fpath
=
'
{}/{}/{}
'
.
format
(
path
,
det_name
,
const
)
fpath
=
'
{}/{}/{}
'
.
format
(
path
,
det_name
,
const
)
os
.
makedirs
(
fpath
,
exist_ok
=
True
)
os
.
makedirs
(
fpath
,
exist_ok
=
True
)
det_new_files
[
f
]
=
fpath
det_new_files
[
f
]
=
fpath
# Set concurrency limitation.
# Set concurrency limitation.
# 50 have been chosen by trial
# 50 have been chosen by trial
# Note: This is not the max limitation.
# Note: This is not the max limitation.
sem
=
asyncio
.
Semaphore
(
50
)
sem
=
asyncio
.
Semaphore
(
50
)
all_new_files
.
append
(
all_new_files
.
append
(
'
{}/{}
'
.
format
(
fpath
,
f
.
split
(
'
/
'
)[
-
1
]))
'
{}/{}
'
.
format
(
fpath
,
f
.
split
(
'
/
'
)[
-
1
]))
await
asyncio
.
gather
(
*
[
copy_files
(
k
,
v
,
sem
)
await
asyncio
.
gather
(
*
[
copy_files
(
k
,
v
,
sem
)
for
k
,
v
in
det_new_files
.
items
()])
for
k
,
v
in
det_new_files
.
items
()])
logging
.
info
(
'
F
igures Copied
'
)
logging
.
info
(
'
{} f
igures Copied
'
.
format
(
det_name
)
)
asyncio
.
ensure_future
(
asyncio
.
ensure_future
(
push_figures
(
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
repo-local
'
],
push_figures
(
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
repo-local
'
],
...
...
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