*** test, if M-L detect list is called TTTTTT = EMSRLI
xxx = stringParameter("set")
tttttt = xxx(17:22)
if (tttttt .eq. "EMSRLI") then
else
call error("badInput", "input PPS file is not the EPIC M-L detect list")
return
endif
*** make a copy of the input file with prefix flag
write (outname,'(a,a)') "flag_",trim(stringParameter("set"))
call copyDataset(stringParameter("set"),outname)
*** pointer to file and table
outfile = dataSet(outname,MODIFY)
outtab = table(outfile,"SRCLIST")
*** create new columns
ind_sol = addColumn(outtab,"IND_SOL",INTEGER32,units="I",comment="running number")
ver_flag = addColumn(outtab,"VER_FLAG",String," ",(/10/))
ver_comm = addColumn(outtab,"VER_COMM",String," ",(/20/))
*** pointer to column ind_sol and to entries in column
indsol => int32Data(ind_sol)
*** pointer to column ind_sol and to entries in column
det_ml = column(outtab,"DET_ML",READ)
p_detml => real32Data(det_ml)
*** write column ind_sol
do i = 0, numberOfRows(outtab) - 1
indsol(i) = i + 1
enddo
*** write column ver_flag
pnflag1 = "FFFFFFFFFF"
do i = 0, numberOfRows(outtab) - 1
call setStringCell(ver_flag, i, pnflag1);
enddo
*** write column ver_comm
comment = ". "
do i = 0, numberOfRows(outtab) - 1
call setStringCell(ver_comm, i, comment);
enddo
*** make flag setting for not_checked sources
thresh = realParameter("maxlikthresh")
pnflag3 = "FTFFFFFFFF"
do i = 0, numberOfRows(outtab) - 1
if (p_detml(i) < thresh) then
call setStringCell(ver_flag, i, pnflag3);
endif
enddo