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
efe465ea
Commit
efe465ea
authored
5 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
instr. and det. prefix in path through repservice
parent
e20e51b6
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
+5
-5
5 additions, 5 deletions
reportservice/report_conf.yaml
reportservice/report_service.py
+12
-5
12 additions, 5 deletions
reportservice/report_service.py
with
17 additions
and
10 deletions
reportservice/report_conf.yaml
+
5
−
5
View file @
efe465ea
...
@@ -37,7 +37,7 @@ SPB:
...
@@ -37,7 +37,7 @@ SPB:
-
176
-
176
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
''"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
AGIPD1M1_out1
/"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
{instrument}/{detector}
/"
cal-db-timeout
:
180000
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
...
@@ -62,7 +62,7 @@ MID:
...
@@ -62,7 +62,7 @@ MID:
-
176
-
176
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
''"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
AGIPD1M2_out1
/"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
{instrument}/{detector}
/"
cal-db-timeout
:
180000
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
range-offset
:
range-offset
:
...
@@ -115,7 +115,7 @@ MID:
...
@@ -115,7 +115,7 @@ MID:
-
50
-
50
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
''"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
EPIX01_out1
/"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
{instrument}/{detector}
/"
cal-db-timeout
:
180000
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
...
@@ -138,7 +138,7 @@ MID:
...
@@ -138,7 +138,7 @@ MID:
-
50
-
50
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
''"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
EPIX02_out1
/"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
{instrument}/{detector}
/"
cal-db-timeout
:
180000
cal-db-timeout
:
180000
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
cal-db-interface
:
"
tcp://max-exfl016:8015#8025"
...
@@ -166,6 +166,6 @@ FXE:
...
@@ -166,6 +166,6 @@ FXE:
-
512
-
512
photon-energy
:
9.2
photon-energy
:
9.2
use-existing
:
"
''"
use-existing
:
"
''"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
LPD1M1_out1
/"
out-folder
:
"
/gpfs/exfel/data/scratch/xcal/report_service/tmp/
{instrument}/{detector}
/"
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
+
12
−
5
View file @
efe465ea
...
@@ -71,7 +71,7 @@ async def wait_jobs(joblist):
...
@@ -71,7 +71,7 @@ async def wait_jobs(joblist):
counter
+=
10
counter
+=
10
async
def
get_run_base
(
detector
):
async
def
get_run_base
(
instr_name
,
det_name
,
detector
):
run_base
=
[
'
xfel-calibrate
'
]
+
detector
[
'
det-type
'
]
run_base
=
[
'
xfel-calibrate
'
]
+
detector
[
'
det-type
'
]
...
@@ -82,6 +82,9 @@ async def get_run_base(detector):
...
@@ -82,6 +82,9 @@ async def get_run_base(detector):
run_base
+=
[
'
--{}
'
.
format
(
str
(
key
))]
run_base
+=
[
'
--{}
'
.
format
(
str
(
key
))]
if
not
isinstance
(
item
,
list
):
if
not
isinstance
(
item
,
list
):
if
key
==
'
out-folder
'
:
item
=
detector
[
'
out-folder
'
].
format
(
instrument
=
instr_name
,
detector
=
det_name
)
run_base
+=
[
str
(
item
)]
run_base
+=
[
str
(
item
)]
else
:
else
:
for
val
in
item
:
for
val
in
item
:
...
@@ -224,8 +227,9 @@ async def server_runner(conf_file):
...
@@ -224,8 +227,9 @@ async def server_runner(conf_file):
logging
.
info
(
'
Process detector: {}
'
.
format
(
det_name
))
logging
.
info
(
'
Process detector: {}
'
.
format
(
det_name
))
logging
.
debug
(
'
Config information: {}
'
.
format
(
det_conf
))
logging
.
debug
(
'
Config information: {}
'
.
format
(
det_conf
))
run_base
=
await
get_run_base
(
det_conf
)
run_base
=
await
get_run_base
(
instr_name
,
det_name
,
det_conf
)
try
:
try
:
output
=
await
asyncio
.
create_subprocess_shell
(
output
=
await
asyncio
.
create_subprocess_shell
(
"
"
.
join
(
run_base
),
stdout
=
PIPE
,
stderr
=
PIPE
)
"
"
.
join
(
run_base
),
stdout
=
PIPE
,
stderr
=
PIPE
)
...
@@ -264,7 +268,9 @@ async def server_runner(conf_file):
...
@@ -264,7 +268,9 @@ async def server_runner(conf_file):
# Copy all plots
# Copy all plots
for
det_name
,
det_conf
in
instrument
.
items
():
for
det_name
,
det_conf
in
instrument
.
items
():
out_folder
=
det_conf
[
'
out-folder
'
]
out_folder
=
det_conf
[
'
out-folder
'
].
format
(
instrument
=
instr_name
,
detector
=
det_name
)
path
=
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
figures-local
'
]
path
=
cfg
[
'
GLOBAL
'
][
'
git
'
][
'
figures-local
'
]
figures
=
glob
.
glob
(
"
{}/*png
"
.
format
(
out_folder
))
figures
=
glob
.
glob
(
"
{}/*png
"
.
format
(
out_folder
))
...
@@ -272,7 +278,8 @@ async def server_runner(conf_file):
...
@@ -272,7 +278,8 @@ async def server_runner(conf_file):
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
,
instr_name
,
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
...
...
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