Skip to content
Snippets Groups Projects
Commit b8983523 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

copy figs of diff dets in on instr. and new conf

parent 9177a0fc
No related branches found
No related tags found
1 merge request!127feat/copy Figs of diff DETs in one INST
...@@ -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:5555" server-port: "tcp://max-exfl015:5556"
run-on: run-on:
- Friday 08:30:00 UTC - Monday 08:30:00 UTC
- Friday 10:33:00 UTC - Friday 10:33:00 UTC
report-service: report-service:
port: 5555 port: 5556
bind-to: tcp://* bind-to: tcp://*
allowed-ips: allowed-ips:
job-db: ./webservice_jobs.sqlite job-db: ./reportservice_jobs.sqlite
job-update-interval: 30 job-update-interval: 30
job-timeout: 3600 job-timeout: 12000
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"
...@@ -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('Figures Copied') logging.info('{} figures Copied'.format(det_name))
asyncio.ensure_future( asyncio.ensure_future(
push_figures(cfg['GLOBAL']['git']['repo-local'], push_figures(cfg['GLOBAL']['git']['repo-local'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment