is frame a hit - take from dap, do not recalculate it on ap level

This commit is contained in:
Dmitry Ozerov
2023-08-28 11:51:55 +02:00
parent 0b5cb2745a
commit 1e86996ccc
4 changed files with 11 additions and 5 deletions

View File

@ -13,7 +13,6 @@ parser.add_argument("--beamline", default="alvra", help="beamline")
parser.add_argument("--pgroup", default="p18674", help="pgroup")
parser.add_argument("--detector", default="JF06T08V02", help="detector")
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")
args = parser.parse_args()
@ -21,7 +20,6 @@ args = parser.parse_args()
beamline = args.beamline
pgroup = args.pgroup
detector = args.detector
online_hits_threshold = args.online_hits_threshold
logbook_url = args.logbook
dir_ap = args.dir_ap
@ -172,17 +170,17 @@ for run in range(1, last_run+1):
all_lines = hits_file.read().splitlines()
for line in all_lines:
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)
if pulseid < start_pulse_id or pulseid > stop_pulse_id:
continue
is_frame_hit = True if is_frame_hit == "True" else False
laser_on = True if laser_on == "True" else False
n_peaks_online = int(n_peaks_online)
if laser_on:
all_light.append(pulseid)
else:
all_dark.append(pulseid)
if n_peaks_online >= online_hits_threshold:
if is_frame_hit:
if laser_on:
hits_light.append(pulseid)
else:

View File

@ -11,6 +11,14 @@ fi
while true
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`
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
View File

0
scripts/re-insert-spearsheet.base.sh Normal file → Executable file
View File