Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
57f3023f
Commit
57f3023f
authored
Sep 05, 2014
by
Tim Martin
Committed by
Graeme Stewart
Sep 19, 2014
Browse files
'disable TrigCostIS' (TrigCostPython-00-01-23)
parent
060a0587
Changes
59
Expand all
Hide whitespace changes
Inline
Side-by-side
Trigger/TrigCost/TrigCostPython/README
0 → 100644
View file @
57f3023f
Author: Tae Min Hong
Date: Oct 6, 2011
https://svnweb.cern.ch/trac/atlasoff/browser/Trigger/TrigCost/TrigCostPython/trunk
svn+ssh://svn.cern.ch/reps/atlasoff/Trigger/TrigCost/TrigCostPython/trunk
The TrigCostPython package is a python package (as the name indicates)
that serves as an interface for the various trigger databases
(COOL/TRIGGER DB, TRP ntuples, XML files, IS server).
Although this package is mainly geared towards trigger experts (people
who worry about trigger rates being too high as well as other
problems), it may be useful for those who need to get their hands on
trigger rates NOW. Check out exampleCost.py & makeRoot.py.
Here are the macros & their descriptions:
macros/AddPieChart.py -- Someone please describe
macros/DeadTime.py -- Someone please describe
macros/EBStats.py -- Someone please describe
macros/MultiRatesJobList.py -- Someone please describe
macros/NonlinearityCheck.py -- Someone please describe
macros/PlotTime_vs_Mu.py -- Someone please describe
macros/RTT_steering.py -- Someone please describe
macros/RunMultiRates.py -- Someone please describe
macros/addDataXml.py -- Someone please describe
macros/addPrescales.py -- Someone please describe
macros/calcRateMan.py -- Someone please describe
macros/checkOptPS.py -- Someone please describe
macros/compRates.py -- Someone please describe
macros/compResults.py -- Someone please describe
macros/costxml2html.py -- Someone please describe
macros/draw_rates.py -- Someone please describe
macros/exampleCost.py -- Prints rates to stdout <---- many use this!
macros/fitRoot.py -- In dev. for https://cern.ch/x
macros/histRates.py -- Someone please describe
macros/makeCumuTables.py -- Someone please describe
macros/makeGroupTables.py -- Someone please describe
macros/makeGroupXML.py -- Someone please describe
macros/makePieCharts.py -- Someone please describe
macros/makePrescaleXML.py -- Someone please describe
macros/makeRoot.py -- Makes ROOT files for https://cern.ch/x/#session
macros/makeSuperGroupXML.py -- Someone please describe
macros/makeTable.py -- Someone please describe
macros/plotRoot.py -- In dev. for https://cern.ch/x
macros/prepareForTwiki.py -- Someone please describe
macros/processCoolRates.py -- Someone please describe
macros/rangeCheck.py -- Someone please describe
macros/rateVThrsh.py -- Someone please describe
macros/thresholdlist.sh -- Someone please describe
macros/updateRoot.sh -- Executed ~20 min by acrontab for https://cern.ch/x
That's all!
Trigger/TrigCost/TrigCostPython/asetup.sh
0 → 100644
View file @
57f3023f
###############################################################################
#
# Tae Min Hong, Univ. of Pennsylvania (2011, 2012)
#
# Athena setup for TrigCostPython/makeRoot.py
#
###############################################################################
# 2011: command archived here (previously called ./elliot.sh)
#source $AtlasSetup/scripts/asetup.sh AtlasProduction,17.0.4.2,runtime,opt,32 --testarea=`pwd`
# 2012: command -- expanded
#rel=17.0.4,builds,here # 2012 DataSummary : runs AtlRunQuery
#rel=17.0.4.2 # 2011 xmon : can't run AtlRunQuery
#rel=17.0.5.6 # kunkle recommend : can't run AtlRunQuery
#rel=17.1.X.Y-VAL,rel0,builds,runtime,here # aidan recommend : runs AtlRunQuery
rel
=
17.0.4,builds
# 2012 xmon
AtlasSetup
=
/afs/cern.ch/atlas/software/dist/AtlasSetup
TestArea
=
/afs/cern.ch/user/
$(
echo
$USER
|cut
-c1
)
/
$USER
/public/cmthome
echo
"Source
$AtlasSetup
/scripts/asetup.sh
$rel
--testarea=
$TestArea
"
source
$AtlasSetup
/scripts/asetup.sh
$rel
--testarea
=
$TestArea
echo
"Done asetup"
#eof
Trigger/TrigCost/TrigCostPython/cmt/requirements
0 → 100644
View file @
57f3023f
package
TrigCostPython
author
Rustem
Ospanov
author
Elliot
Lipeles
author
Tae
Min
Hong
use
AtlasPolicy
AtlasPolicy
-*
apply_pattern
declare_python_modules
files
=
"*.py"
apply_pattern
declare_joboptions
files
=
"*.py"
private
apply_pattern
declare_xmls
apply_pattern
install_xmls
apply_pattern
generic_declare_for_link
kind
=
data
files
=
"-s=../data *.html *.js"
prefix
=
share
/
TrigCostPython
apply_pattern
generic_declare_for_link
kind
=
binaries
files
=
"-s=../macros *.py getfile.sh"
prefix
=
share
/
bin
#
apply_pattern
generic_declare_for_link
kind
=
binaries
files
=
"-s=../macros getfile.sh"
prefix
=
share
/
bin
#
macro_append
TrigMonCosts_use_linkopts
" -lprofiler"
#
macro_append
TrigMonCosts_use_linkopts
" -ltcmalloc"
#
macro
cppdebugflags
'$(cppdebugflags_s)'
#
macro_remove
componentshr_linkopts
"-Wl,-s"
end_private
Trigger/TrigCost/TrigCostPython/data/compRates_head.html
0 → 100644
View file @
57f3023f
<style
type=
"text/css"
>
table
,
th
{
border
:
1px
solid
black
;
}
table
{
margin
:
auto
;
}
th
{
padding
:
10px
;
background-color
:
gray
;
color
:
white
;
font-weight
:
normal
;
font-family
:
arial
,
sans-serif
;
}
td
{
padding-left
:
5px
;
padding-right
:
5px
;
font-size
:
10pt
;
}
td
.rate
,
td
.rate_ratio
,
td
.rate_diff
,
td
.chain_name
{
font-size
:
10pt
;
}
/* Colors */
td
.rate
{
background-color
:
#ffeeee
;
}
td
.rate_ratio
{
background-color
:
#eeffee
;
}
td
.rate_diff
{
background-color
:
#eeeeff
;
}
/* Showing/hiding flags for various filter functions */
.white
{
color
:
white
;
}
.black
{
color
:
black
;
}
a
.link
{
text-decoration
:
underline
;
}
tr
.hidden
{
display
:
none
;
}
div
.collapsed
{
display
:
none
;
}
div
.collapsable
,
div
#collapsible_snippet
{
background-color
:
#eeeeee
;
width
:
810px
;
margin
:
auto
;
margin-bottom
:
20px
;
}
table
.filter_wrapper
{
border
:
0px
solid
black
;
width
:
900px
;
margin
:
auto
;
border-collapse
:
collapse
;
}
td
.filter_wrapper
{
padding
:
5px
;
}
table
.filter_12col
,
table
.filter_6col
,
table
.filter_4col
,
table
.filter_3col
{
background-color
:
#ffffdd
;
background-color
:
#ffffff
;
border
:
1px
solid
black
;
}
td
.filter_main_12col
,
td
.filter_main_6col
,
td
.filter_4col
,
td
.filter_3col
,
td
.filter_status
{
padding
:
0px
;
}
table
.filter_12col
{
width
:
890px
;
}
table
.filter_6col
{
width
:
440px
;
}
table
.filter_4col
{
width
:
290px
;
}
table
.filter_3col
{
width
:
215px
;
}
td
.filter_main_12col
{
width
:
860px
;
}
td
.filter_main_6col
{
width
:
410px
;
}
td
.filter_main_4col
{
width
:
260px
;
}
td
.filter_main_3col
{
width
:
185px
;
}
td
.filter_status
{
width
:
30px
;
}
input
.input_filter
{
width
:
50px
;
}
td
.highlight
{
border
:
2px
solid
red
;
}
tr
.regex_hide
,
tr
.isZero_hide
,
tr
._empty_hide
,
tr
._firstempty_hide
,
tr
._cosmic_hide
,
tr
._unpaired_hide
{
display
:
none
;
}
.diff_hide
,
.ratio_hide
,
.ps_hide
,
.pt_hide
,
.isZero_hide
{
display
:
none
;
}
th
.rate_isZero
,
td
.rate_isZero
{
display
:
none
;
}
/* Must override the final column settings. The final column is only used for bookkeeping */
div
.h2_wrapper
{
width
:
600px
;
margin
:
auto
;
}
div
#snippet
{
width
:
600px
;
margin
:
auto
;
}
body
{
background-color
:
white
;
}
</style>
<script
type=
"text/ecmascript"
>
var
difference_threshold
=
1
e6
;
var
ratio_threshold
=
1
e6
;
var
nSigma_threshold
=
1
e6
;
var
percent_threshold
=
1
e6
;
</script>
</head>
<body
onload=
"init()"
>
<div
class=
"h2_wrapper"
><h2
class=
"compRates"
style=
"display:inline"
>
Search and filter settings
</h2>
<input
type=
"submit"
id=
"expandCollapse_filter"
onclick=
"expandCollapse('collapsible_filter', 'expandCollapse_filter')"
value=
"Expand"
/>
<a
href=
""
id=
"url_link_small"
>
URL
</a>
</div>
<div
id=
"collapsible_filter"
class=
"collapsed"
>
<table
class=
"filter_12col"
>
<tbody>
<tr>
<td
style=
"width:100px"
>
URL
</td>
<td
style=
"width:700px"
><a
id=
"url_link"
href=
""
></a></td>
</tr>
<tr>
<td
style=
"width:100px"
>
Clear all
</td>
<td
style=
"width:700px"
><a
id=
"url_link_clear"
href=
""
></a></td>
</tr>
</tbody>
</table>
<table
class=
"filter_wrapper"
>
<tbody>
<tr>
<td
class=
"filter_wrapper"
colspan=
"12"
>
<table
class=
"filter_12col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
<span
id=
"bool_highlight_nSigma_percent"
class=
"white"
>
✓
</span>
</td>
<td
class=
"filter_main_12col"
>
Show only chains where the difference is greater than
<input
class=
"input_filter"
type=
"text"
id=
"nSigma_threshold"
value=
"2"
/>
σ
and the difference is greater than
<input
class=
"input_filter"
type=
"text"
id=
"percent_threshold"
value=
"10"
/>
%
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td
class=
"filter_wrapper"
colspan=
"6"
>
<table
class=
"filter_6col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
<span
id=
"bool_highlight_diffs"
class=
"white"
>
✓
</span>
</td>
<td
class=
"filter_main_6col"
>
Highlight differences greater than
<input
class=
"input_filter"
type=
"text"
value=
"1.0"
id=
"diff_threshold"
/>
Hz
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"6"
>
<table
class=
"filter_6col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
<span
id=
"bool_highlight_ratios"
class=
"white"
>
✓
</span>
</td>
<td
class=
"filter_main_6col"
>
Highlight ratios greater than
<input
class=
"input_filter"
type=
"text"
value=
"2"
id=
"ratio_threshold"
/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
</td>
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show_diff"
onclick=
"toggle_show('diff')"
/>
Show differences
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
</td>
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show_ps"
onclick=
"toggle_show('ps')"
/>
Show prescales
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
</td>
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show_pt"
onclick=
"toggle_show('pt')"
/>
Show passthroughs
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<td
class=
"filter_status"
>
</td>
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show_isZero"
onclick=
"toggle_show('isZero')"
/>
Show zero rates
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<!--<td class="filter_status"></td>-->
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show__empty"
onclick=
"toggle_show_row('_empty')"
/>
Show "_empty" chains
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<!--<td class="filter_status"></td>-->
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show__firstempty"
onclick=
"toggle_show_row('_firstempty')"
/>
Show "_firstempty" chains
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<!--<td class="filter_status"></td>-->
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show__cosmic"
onclick=
"toggle_show_row('_cosmic')"
/>
Show "_cosmic" chains
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
<td
class=
"filter_wrapper"
colspan=
"3"
>
<table
class=
"filter_3col"
>
<tbody>
<tr>
<!--<td class="filter_status"></td>-->
<td
class=
"filter_main_3col"
>
<input
type=
"checkbox"
id=
"checkbox_show__unpaired"
onclick=
"toggle_show_row('_unpaired')"
/>
Show "_unpaired" chains
<br
/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
Trigger/TrigCost/TrigCostPython/data/exampleRanges.xml
0 → 100644
View file @
57f3023f
<?xml version="1.0" encoding="ISO-8859-1"?>
<ranges>
<!-- a "DEFAULT" chain will be compared to all chains that are not otherwise specified -->
<range
chain=
"DEFAULT"
min=
"0"
max=
"10"
/>
<range
chain=
"L1_EM2"
min=
"100"
max=
"200"
/>
<range
chain=
"L2_e5_loose"
min=
"100"
max=
"200"
/>
<range
chain=
"EF_e5_loose"
min=
"100"
max=
"200"
/>
<range
chain=
"EF_RATE:SinglePhoton"
min=
"100"
max=
"200"
/>
<range
chain=
"LVL_L1"
min=
"0"
max=
"1"
/>
</ranges>
Trigger/TrigCost/TrigCostPython/data/highlight.js
0 → 100644
View file @
57f3023f
var
show_flags
=
new
Array
()
;
show_flags
.
push
(
"
ps
"
)
;
show_flags
.
push
(
"
pt
"
)
;
show_flags
.
push
(
"
diff
"
)
;
show_flags
.
push
(
"
isZero
"
)
;
show_flags
.
push
(
"
_empty
"
)
;
show_flags
.
push
(
"
_firstempty
"
)
;
show_flags
.
push
(
"
_cosmic
"
)
;
show_flags
.
push
(
"
_unpaired
"
)
;
function
init
(){
get
(
'
nSigma_threshold
'
).
addEventListener
(
'
keyup
'
,
highlight_nSigma_percent
,
false
)
;
get
(
'
nSigma_threshold
'
).
addEventListener
(
'
focus
'
,
highlight_nSigma_percent
,
false
)
;
get
(
'
percent_threshold
'
).
addEventListener
(
'
keyup
'
,
highlight_nSigma_percent
,
false
)
;
get
(
'
percent_threshold
'
).
addEventListener
(
'
focus
'
,
highlight_nSigma_percent
,
false
)
;
get
(
'
diff_threshold
'
)
.
addEventListener
(
'
keyup
'
,
highlight_diffs
,
false
)
;
get
(
'
diff_threshold
'
)
.
addEventListener
(
'
focus
'
,
highlight_diffs
,
false
)
;
get
(
'
ratio_threshold
'
).
addEventListener
(
'
keyup
'
,
highlight_ratios
,
false
)
;
get
(
'
ratio_threshold
'
).
addEventListener
(
'
focus
'
,
highlight_ratios
,
false
)
;
parseAndExecuteArguments
()
;
for
(
var
i
=
0
;
i
<
show_flags
.
length
;
i
++
){
if
(
get_value
(
"
show_
"
+
show_flags
[
i
])
==
true
){
var
elements
=
getElementsByClass
(
"
rate_
"
+
show_flags
[
i
])
;
var
className
=
show_flags
[
i
]
+
'
_hide
'
;
for
(
var
j
=
0
;
j
<
elements
.
length
;
j
++
){
removeClassName
(
elements
[
j
],
className
)
;
}
}
}
}
// Functions used for getting values and setting values
function
get_value
(
name
){
if
(
name
==
"
show_ps
"
)
return
show_ps
;
if
(
name
==
"
show_pt
"
)
return
show_pt
;
if
(
name
==
"
show_diff
"
)
return
show_diff
;
if
(
name
==
"
show_isZero
"
)
return
show_isZero
;
if
(
name
==
"
show__empty
"
)
return
show_empty
;
if
(
name
==
"
show__firstempty
"
)
return
show_firstempty
;
if
(
name
==
"
show__cosmic
"
)
return
show_cosmic
;
if
(
name
==
"
show__unpaired
"
)
return
show_unpaired
;
}
function
set_value
(
name
,
value
){
if
(
name
==
"
show_ps
"
)
show_ps
=
value
;
if
(
name
==
"
show_pt
"
)
show_pt
=
value
;
if
(
name
==
"
show_diff
"
)
show_diff
=
value
;
if
(
name
==
"
show_isZero
"
)
show_isZero
=
value
;
if
(
name
==
"
show__empty
"
)
show_empty
=
value
;
if
(
name
==
"
show__firstempty
"
)
show_firstempty
=
value
;
if
(
name
==
"
show__cosmic
"
)
show_cosmic
=
value
;
if
(
name
==
"
show__unpaired
"
)
show_unpaired
=
value
;
}
// Helper functions to get elements
function
get
(
id
){
return
document
.
getElementById
(
id
)
;
}
function
get_all_elements
(){
var
all_elements
=
new
Array
()
;
all_elements
=
document
.
getElementsByTagName
(
"
*
"
)
;
return
all_elements
;
}
function
getElementsByClass
(
theClass
){
var
classElements
=
new
Array
()
;
var
all_elements
=
get_all_elements
()
;
var
j
=
0
;
for
(
i
=
0
;
i
<
all_elements
.
length
;
i
++
){
if
(
all_elements
[
i
].
className
.
match
(
theClass
)){
classElements
[
j
]
=
all_elements
[
i
]
;
j
++
;
}
}
return
classElements
;
}
// Trim functions taken from http://www.webtoolkit.info/javascript-trim.html
function
trim
(
str
,
chars
)
{
return
ltrim
(
rtrim
(
str
,
chars
),
chars
);
}
function
ltrim
(
str
,
chars
)
{
chars
=
chars
||
"
\\
s
"
;
return
str
.
replace
(
new
RegExp
(
"
^[
"
+
chars
+
"
]+
"
,
"
g
"
),
""
);
}
function
rtrim
(
str
,
chars
)
{
chars
=
chars
||
"
\\
s
"
;
return
str
.
replace
(
new
RegExp
(
"
[
"
+
chars
+
"
]+$
"
,
"
g
"
),
""
);
}
// Add and remove className
function
addClassName
(
element
,
name
){
var
classes
=
element
.
className
.
split
(
'
'
)
;
for
(
var
i
=
0
;
i
<
classes
.
length
;
i
++
){
if
(
classes
[
i
]
==
name
)
return
;
// Don't change anything if class name matches
}
var
finalClassName
=
element
.
className
+
'
'
+
name
;
finalClassName
=
trim
(
finalClassName
)
;
element
.
className
=
finalClassName
;
}
function
removeClassName
(
element
,
name
){
var
finalClassName
=
''
;
var
classes
=
element
.
className
.
split
(
'
'
)
;
for
(
var
i
=
0
;
i
<
classes
.
length
;
i
++
){
if
(
classes
[
i
]
!=
name
)
finalClassName
=
finalClassName
+
'
'
+
classes
[
i
]
;
}
finalClassName
=
trim
(
finalClassName
)
;
element
.
className
=
finalClassName
;
}
// Show or hide different columns (or rows) when the user clicks on the checkboxes
function
toggle_show
(
name
){
var
className
=
name
+
'
_hide
'
;
var
varName
=
"
show_
"
+
name
;
// Toggle value
var
flag
=
(
get_value
(
varName
))
?
false
:
true
;
set_value
(
varName
,
flag
)
;
// show/hide columns
var
elements
=
getElementsByClass
(
"
rate_
"
+
name
)
;
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
){
if
(
get_value
(
varName
)
==
false
){
addClassName
(
elements
[
i
],
className
)
;
}
else
{
removeClassName
(
elements
[
i
],
className
)
;
}
}
// Change the checkbox last to show the change has been applied
get
(
'
checkbox_show_
'
+
name
).
checked
=
flag
;
updateURLField
()
;
}
// Show or hide different rows when the user clicks on the checkboxes
function
toggle_show_row
(
name
){
var
className
=
name
+
'
_hide
'
;
var
varName
=
"
show_
"
+
name
;
// Toggle value
var
flag
=
(
get_value
(
varName
))
?
false
:
true
;
set_value
(
varName
,
flag
)
;
// show/hide columns
var
elements
=
getElementsByClass
(
"
chain_name
"
)
;
var
nHide
=
0
;
var
nShow
=
0
;
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
){
var
inner
=
elements
[
i
].
innerHTML
.
toLowerCase
()
if
(
inner
.
match
(
name
)
!=
null
){
if
(
get_value
(
varName
)
==
false
){
nHide
++
;
addClassName
(
elements
[
i
].
parentNode
,
className
)
;
}
else
{
removeClassName
(
elements
[
i
].
parentNode
,
className
)
;
nShow
++
;
}
}
}
// Change the checkbox last to show the change has been applied
get
(
'
checkbox_show_
'
+
name
).
checked
=
flag
;
updateURLField
()
;
}
function
highlight_diffs
(){
reset_highlights
(
'
rate_diff
'
)
;
var
threshold
=
get
(
'
diff_threshold
'
).
value
var
elements
=
getElementsByClass
(
'
rate_diff
'
)
;
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
){
var
element
=
elements
[
i
]
;
var
difference
=
parseFloat
(
element
.
innerHTML
)
;
if
(
Math
.
abs
(
difference
)
>
threshold
){
element
.
className
=
element
.
className
+
'
highlight
'
;
}
}
get
(
'
bool_highlight_diffs
'
).
className
=
'
black
'
;
updateURLField
()
;
}
function
highlight_ratios
(){
reset_highlights
(
'
rate_ratio
'
)
;
var
threshold
=
get
(
'
ratio_threshold
'
).
value
var
elements
=
getElementsByClass
(
'
rate_ratio
'
)
;
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
){
var
element
=
elements
[
i
]
;
var
text
=
element
.
innerHTML
;
var
value
=
parseFloat
(
text
)
;
if
(
Math
.
abs
(
value
)
>
threshold
||
Math
.
abs
(
value
)
<
1
/
threshold
){
if
(
value
!=
0