1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 <2004> 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 <2004> 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Index of highest value |
From: | Tim Mooney <[email protected]> |
Cc: | "Lawrence T. Hoff" <[email protected]>, [email protected] |
Date: | Mon, 20 Dec 2004 14:22:09 -0600 |
I don't have any suggestion for doing this with only the records in base, but you could do everything you've described with one transform record, which I'll call 'T'. Here are the field definitions:
T.A ... T.L are the goodness factors T.CMTA ... T.CMTL are per-foil descriptions/comments, if needed T.CLCM is 'max(a,b,c,d,e,f,g,h,i,j,k,l)' T.CLCN is 'a==m?1:b==m?2:c==m?3:d==m?4:e==m?5:0' T.CLCO is 'f==m?6:g==m?7:h==m?8:i==m?9:j==m?10:0' T.CLCP is '(k==m?11:l==m?12:n+o)-1'
After the record processes: T.M is the max goodness factor T.P is the index of the best foil T.OUTP is the PV to which you want to write the foil index.
Oops. I ignored the possibility that two foils might have the same goodness factor, which is also the highest goodness factor. In this case, we could just take the first:
-- Tim Mooney ([email protected]) (630)252-5417 Beamline Controls & Data Acquisition Group Advanced Photon Source, Argonne National Lab