From 980e7a305b27ab1d9e3432b53d1b3de0f497feed Mon Sep 17 00:00:00 2001 From: hiwamoto Date: Wed, 1 Nov 2023 17:38:11 +0900 Subject: [PATCH] Add file --- sample/analytical/limitation/do.sh | 12 +++++++++++- .../limitation/hist2d_limitation_sample.py | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sample/analytical/limitation/do.sh b/sample/analytical/limitation/do.sh index ffbb81e6..8de55d57 100644 --- a/sample/analytical/limitation/do.sh +++ b/sample/analytical/limitation/do.sh @@ -1,3 +1,13 @@ +#!/bin/bash mpiexec -np 10 --oversubscribe python3 ../../../src/py2dmat_main.py input.toml -python3 hist2d_limitation_sample.py -p 10 -i input.toml -b 0.1 +echo diff output/best_result.txt ref.txt +res=0 +diff output/best_result.txt ref.txt || res=$? +if [ $res -eq 0 ]; then + echo TEST PASS + true +else + echo TEST FAILED: best_result.txt and ref.txt differ + false +fi diff --git a/sample/analytical/limitation/hist2d_limitation_sample.py b/sample/analytical/limitation/hist2d_limitation_sample.py index d847c792..0183c8a1 100644 --- a/sample/analytical/limitation/hist2d_limitation_sample.py +++ b/sample/analytical/limitation/hist2d_limitation_sample.py @@ -159,10 +159,10 @@ def soloplot(): cb = fig.colorbar(hst2d[3]) - temp_for_title = decimal.Decimal(Tvalue[l]).quantize( - decimal.Decimal('0.001'), rounding=decimal.ROUND_HALF_UP + temp_for_title = decimal.Decimal(1/Tvalue[l]).quantize( + decimal.Decimal('0.00001'), rounding=decimal.ROUND_HALF_UP ) - figtitlestr = f'τ = {temp_for_title}' + figtitlestr = f'beta = {temp_for_title}' ax.set_title(figtitlestr) @@ -178,7 +178,7 @@ def soloplot(): ax.set_ylim(x2_min,x2_max) ax.set_aspect('equal') #軸サイズ設定と図の保存 - fig.savefig(f'{dirname}/{l}_T_{temp_for_title}_burn_in_{burn_in}.png',dpi=300) + fig.savefig(f'{dirname}/{l}_beta_{temp_for_title}_burn_in_{burn_in}.png',dpi=300) l+= 1