API Reference - Post-processing Modules¶
Post-processing Modules
The Post-processing modules provide analysis and reporting functions that are automatically executed after a simulation run. Please select a specific module of interest from the tabs below.
This module provides functions for plotting simulation results.
baseline_analysis(results_file_path, output_dir, **kwargs)
¶
Generates baseline analysis plots and reports from a unified HDF5 results file.
Source code in tricys/postprocess/baseline_analysis.py
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 | |
generate_academic_report(output_dir, ai_model, **kwargs)
¶
Generates a professional academic analysis summary by sending the existing report and a glossary of terms to an LLM.
Source code in tricys/postprocess/baseline_analysis.py
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | |
load_glossary(glossary_path)
¶
Loads glossary data from the specified CSV path into global dictionaries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
glossary_path
|
str
|
Path to the glossary CSV file. |
required |
Note
Expected columns: "ๆจกๅๅๆฐ (Model Parameter)", "่ฑๆๆฏ่ฏญ (English Term)", "ไธญๆ็ฟป่ฏ (Chinese Translation)". Clears existing glossaries on error. Updates global _english_glossary_map and _chinese_glossary_map.
Source code in tricys/postprocess/baseline_analysis.py
set_plot_language(lang='en')
¶
Sets the preferred language for plot labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lang
|
str
|
'en' for English (default), 'cn' for Chinese. |
'en'
|
Note
For Chinese, sets font to SimHei and adjusts unicode_minus. For English, restores matplotlib defaults. Changes apply globally to all subsequent plots.
Source code in tricys/postprocess/baseline_analysis.py
analyze_rise_dip(results_file_path, output_dir, **kwargs)
¶
Analyzes HDF5 simulation results to identify curves that fail to exhibit 'dip and rise' feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results_file_path
|
str
|
Path to the HDF5 file containing 'results' and 'jobs' tables. |
required |
output_dir
|
str
|
The directory to save the analysis report. |
required |
**kwargs
|
Additional parameters. |
{}
|
Source code in tricys/postprocess/rise_analysis.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
check_thresholds(results_file_path, output_dir, rules, **kwargs)
¶
Analyzes HDF5 simulation results to check if specified columns fall within threshold ranges.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results_file_path
|
str
|
Path to HDF5 results. |
required |
output_dir
|
str
|
Directory for saving alert reports. |
required |
rules
|
List[Dict[str, Any]]
|
List of rules. |
required |
**kwargs
|
Additional parameters. |
{}
|
Source code in tricys/postprocess/static_alarm.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |