is frame a hit - take from dap, do not recalculate it on ap level
This commit is contained in:
8
ap/ap.py
8
ap/ap.py
@ -13,7 +13,6 @@ parser.add_argument("--beamline", default="alvra", help="beamline")
|
|||||||
parser.add_argument("--pgroup", default="p18674", help="pgroup")
|
parser.add_argument("--pgroup", default="p18674", help="pgroup")
|
||||||
parser.add_argument("--detector", default="JF06T08V02", help="detector")
|
parser.add_argument("--detector", default="JF06T08V02", help="detector")
|
||||||
parser.add_argument("--logbook", default=None, help="url to logbook")
|
parser.add_argument("--logbook", default=None, help="url to logbook")
|
||||||
parser.add_argument("--online_hits_threshold", default = 15, type=int, help="number of peaks to consider frame a hit")
|
|
||||||
parser.add_argument("--dir_ap", default=None, help="path to ap code")
|
parser.add_argument("--dir_ap", default=None, help="path to ap code")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@ -21,7 +20,6 @@ args = parser.parse_args()
|
|||||||
beamline = args.beamline
|
beamline = args.beamline
|
||||||
pgroup = args.pgroup
|
pgroup = args.pgroup
|
||||||
detector = args.detector
|
detector = args.detector
|
||||||
online_hits_threshold = args.online_hits_threshold
|
|
||||||
logbook_url = args.logbook
|
logbook_url = args.logbook
|
||||||
dir_ap = args.dir_ap
|
dir_ap = args.dir_ap
|
||||||
|
|
||||||
@ -172,17 +170,17 @@ for run in range(1, last_run+1):
|
|||||||
all_lines = hits_file.read().splitlines()
|
all_lines = hits_file.read().splitlines()
|
||||||
for line in all_lines:
|
for line in all_lines:
|
||||||
lp = line.split()
|
lp = line.split()
|
||||||
pulseid, frame_good, n_peaks_online, laser_on = lp[0], lp[1], lp[2], lp[3]
|
pulseid, frame_good, is_frame_hit, laser_on = lp[0], lp[1], lp[2], lp[4]
|
||||||
pulseid = int(pulseid)
|
pulseid = int(pulseid)
|
||||||
if pulseid < start_pulse_id or pulseid > stop_pulse_id:
|
if pulseid < start_pulse_id or pulseid > stop_pulse_id:
|
||||||
continue
|
continue
|
||||||
|
is_frame_hit = True if is_frame_hit == "True" else False
|
||||||
laser_on = True if laser_on == "True" else False
|
laser_on = True if laser_on == "True" else False
|
||||||
n_peaks_online = int(n_peaks_online)
|
|
||||||
if laser_on:
|
if laser_on:
|
||||||
all_light.append(pulseid)
|
all_light.append(pulseid)
|
||||||
else:
|
else:
|
||||||
all_dark.append(pulseid)
|
all_dark.append(pulseid)
|
||||||
if n_peaks_online >= online_hits_threshold:
|
if is_frame_hit:
|
||||||
if laser_on:
|
if laser_on:
|
||||||
hits_light.append(pulseid)
|
hits_light.append(pulseid)
|
||||||
else:
|
else:
|
||||||
|
@ -11,6 +11,14 @@ fi
|
|||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
|
if [ -e STOP ]
|
||||||
|
then
|
||||||
|
echo "STOP file present - exiting AP now"
|
||||||
|
echo "to run AP, remove STOP file with rm STOP"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Running "`date`
|
echo "Running "`date`
|
||||||
python ${DIR_AP}/ap/ap.py --pgroup ${PGROUP} --beamline ${BEAMLINE} --detector ${DETECTOR_NAME} --logbook ${LOGBOOK} --dir_ap ${DIR_AP}
|
python ${DIR_AP}/ap/ap.py --pgroup ${PGROUP} --beamline ${BEAMLINE} --detector ${DETECTOR_NAME} --logbook ${LOGBOOK} --dir_ap ${DIR_AP}
|
||||||
|
|
||||||
|
0
scripts/jobs_overview.sh
Normal file → Executable file
0
scripts/jobs_overview.sh
Normal file → Executable file
0
scripts/re-insert-spearsheet.base.sh
Normal file → Executable file
0
scripts/re-insert-spearsheet.base.sh
Normal file → Executable file
Reference in New Issue
Block a user