Skip to content

Commit 13e021e

Browse files
Merge pull request #278 from Magritte-code/277-move-model-from-ci-pipeline-to-somewhere-else-than-github
Found the original CI model again. Moved it to owncloud.
2 parents 3160c7e + 38ee91e commit 13e021e

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

tests/benchmarks/numeric/import_phantom_3D_model.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ def import_phantom():
2828
model_file = os.path.join(modeldir, 'model_Phantom_3D.hdf5') # Resulting Magritte model
2929
lamda_file = os.path.join(datadir, 'co.txt' ) # Line data file
3030

31-
dump_link = "https://github.com/Ensor-code/phantom-models/raw/main/Malfait+2021/v05e50/wind_v05e50?download="
32-
setup_link = "https://raw.githubusercontent.com/Ensor-code/phantom-models/main/Malfait%2B2021/v05e50/wind.setup"
33-
input_link = "https://raw.githubusercontent.com/Ensor-code/phantom-models/main/Malfait%2B2021/v05e50/wind.in"
3431
lamda_link = "https://home.strw.leidenuniv.nl/~moldata/datafiles/co.dat"
32+
# dump_link = "https://owncloud.ster.kuleuven.be/index.php/s/qgxytfnqW7dSiLo/download/wind_00574"
33+
dump_link = "https://owncloud.ster.kuleuven.be/index.php/s/Et6CXYpZwjBXsJe/download/wind_00350"
34+
input_link = "https://owncloud.ster.kuleuven.be/index.php/s/w9tgWmC2CfkPm7p/download/wind.in"
35+
setup_link = "https://owncloud.ster.kuleuven.be/index.php/s/ZP6KwiASYgAayaK/download/wind.setup"
3536

3637
# %%capture
3738
subprocess.run(['wget', dump_link, '--output-document', dump_file ])
@@ -44,6 +45,8 @@ def import_phantom():
4445
# !wget $lamda_link --output-document $lamda_file
4546

4647
# Loading the data with plons
48+
print("datadir: ", datadir)
49+
print("dump_file: ", dump_file)
4750
setupData = plons.LoadSetup(datadir, "wind")
4851
dumpData = plons.LoadFullDump(dump_file, setupData)
4952

tests/benchmarks/numeric/run_phantom_3D_model_reduced.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import magritte.core as magritte
1515
import magritte.plot as plot
1616

17-
VERSION = "0.9.0"#reference version of Magritte to compare against; should correspond to a commited intensity file
17+
VERSION = "0.9.5"#reference version of Magritte to compare against; should correspond to a commited intensity file
1818
#starting from 0.9.0, we compute the intensity for 4 lines at the same time, instead of just a single line. This is still not a realistic usecase, but suffices for regression testing.
1919

2020
path = os.path.dirname(os.path.realpath(__file__))
@@ -71,6 +71,15 @@ def run_model (nosave=True):
7171

7272
reference_intensity = np.load(f'{datadir}{modelName}_NLTE_intensity_magritte_{VERSION}.npy')
7373
reldiff = tools.relative_error(reference_intensity, np.array(model.images[0].I))
74+
# For debugging, plot the intensity and reference intensity
75+
# plt.figure()
76+
# plt.imshow(np.log10(np.array(model.images[0].I).reshape(256, 256, -1))[:, :, 10], origin='lower')
77+
# plt.colorbar()
78+
# plt.title('log10(intensity)')
79+
# plt.figure()
80+
# plt.imshow(np.log10(reference_intensity).reshape(256, 256, -1)[:, :, 10], origin='lower')
81+
# plt.colorbar()
82+
# plt.show()
7483

7584
print(result)
7685
print("maximum relative difference: ", np.max(reldiff))#only for a few points a significant difference can be seen
Binary file not shown.

0 commit comments

Comments
 (0)