Skip to content

Commit dff65f8

Browse files
authored
Fix TSC test passing criteria (#9)
* Fix TSC test to match original pass/fail method Per E3SM issue 4759 (E3SM-Project/E3SM#4759) The TSC test should fail only if all points between 300s - 600s are below the failure threshold (p_threshold). This also fixes the plotting of P_min so that the variable threshold is plotted rather than a fixed 0.5% * Update copyright date * Bump version number * Fix readme formatting
1 parent 0d2a8cb commit dff65f8

File tree

7 files changed

+18
-10
lines changed

7 files changed

+18
-10
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ report bugs, ask questions, or contact us for any reason, use the
1515

1616
Want to send us a private message?
1717

18+
1819
**Michael Kelleher**
1920
* github: @mkstratos
2021
* email: <a href="mailto:[email protected]">kelleherme [at] ornl.gov</a>
22+
2123
**Joseph H. Kennedy**
2224
* github: @jhkennedy
2325
* email: <a href="mailto:[email protected]">kennedyjh [at] ornl.gov</a>

evv4esm/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# coding=utf-8
2-
# Copyright (c) 2018-2021 UT-BATTELLE, LLC
2+
# Copyright (c) 2018-2022 UT-BATTELLE, LLC
33
# All rights reserved.
44
#
55
# Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
2828
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929

3030

31-
__version_info__ = (0, 3, 0)
31+
__version_info__ = (0, 3, 1)
3232
__version__ = '.'.join(str(vi) for vi in __version_info__)
3333

3434
PASS_COLOR = '#389933'

evv4esm/ensembles/e3sm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3-
# Copyright (c) 2018-2021 UT-BATTELLE, LLC
3+
# Copyright (c) 2018-2022 UT-BATTELLE, LLC
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without

evv4esm/extensions/ks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3-
# Copyright (c) 2018-2021 UT-BATTELLE, LLC
3+
# Copyright (c) 2018-2022 UT-BATTELLE, LLC
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without

evv4esm/extensions/pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3-
# Copyright (c) 2015-2021 UT-BATTELLE, LLC
3+
# Copyright (c) 2015-2022 UT-BATTELLE, LLC
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without

evv4esm/extensions/tsc.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3-
# Copyright (c) 2015-2021 UT-BATTELLE, LLC
3+
# Copyright (c) 2015-2022 UT-BATTELLE, LLC
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -283,8 +283,14 @@ def main(args):
283283
# H0: enemble_mean_ΔRMSD_{t,var} is (statistically) zero and therefore, the simulations are identical
284284
null_hypothesis = ttest.applymap(lambda x: 'Reject' if x[1] < args.p_threshold else 'Accept')
285285

286-
domains = null_hypothesis.applymap(lambda x: x == 'Reject').any().transform(
287-
lambda x: 'Fail' if x is True else 'Pass')
286+
domains = (
287+
null_hypothesis
288+
.query(' seconds >= @args.inspect_times[0] & seconds <= @args.inspect_times[-1]')
289+
.applymap(lambda x: x == 'Reject').all().transform(
290+
lambda x: 'Fail' if x is True else 'Pass'
291+
)
292+
)
293+
288294
overall = 'Fail' if domains.apply(lambda x: x == 'Fail').any() else 'Pass'
289295

290296
ttest.reset_index(inplace=True)
@@ -386,7 +392,7 @@ def plot_bit_for_bit(args):
386392

387393
ax.semilogy(xx, yy + 1.0, linestyle='-', marker='o', color=pf_color_picker.get('pass'))
388394

389-
ax.plot(args.time_slice, [0.5, 0.5], 'k--')
395+
ax.plot(args.time_slice, [args.p_threshold * 100] * 2, 'k--')
390396
ax.text(np.mean(args.time_slice), 10 ** -1, 'Fail', fontsize=15, color=pf_color_picker.get('fail'),
391397
horizontalalignment='center')
392398
ax.text(np.mean(args.time_slice), 0.5 * 10 ** 1, 'Pass', fontsize=15, color=pf_color_picker.get('pass'),

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# coding=utf-8
2-
# Copyright (c) 2018-2021 UT-BATTELLE, LLC
2+
# Copyright (c) 2018-2022 UT-BATTELLE, LLC
33
# All rights reserved.
44
#
55
# Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)