Skip to content

Commit

Permalink
Updating phantom test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpinte committed Oct 27, 2023
1 parent d2ac225 commit 936dab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 1 addition & 12 deletions test_suite/test_data/discF_00500/discF_00500.para
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2.20 mcfost version
3.00 mcfost version

#Number of photon packages
1e7 nbr_photons_eq_th : T computation
Expand All @@ -17,7 +17,6 @@

#Maps
301 301 900. grid (nx,ny), size [AU]
10 10 MC : N_bin_incl, N_bin_az
0 90. 2 F RT: imin, imax, n_incl, centered ?
0 180. 2 RT: az_min, az_max, n_az angles
140.0 distance (pc)
Expand Down Expand Up @@ -50,11 +49,6 @@
1.125 flaring exponent, unused for envelope
-0.5 0.0 surface density exponent (or -gamma for tappered-edge disk or volume density for envelope), usually < 0, -gamma_exp (or alpha_in & alpha_out for debris disk)

#Cavity : everything is empty above the surface
F cavity ?
15. 50. height, reference radius (AU)
1.5 flaring exponent

#Grain properties
1 Number of species
Mie 1 2 0.0 1.0 0.9 Grain type (Mie or DHS), N_components, mixing rule (1 = EMT or 2 = coating), porosity, mass fraction, Vmax (for DHS)
Expand Down Expand Up @@ -87,8 +81,3 @@
3360.0 2.31 0.3 1.875252612114377E+01 -1.635726683116375E+01 -1.433567792771137E+00 T Temp, radius (solar radius),M (solar mass),x,y,z (AU), is a blackbody?
lte4000-3.5.NextGen.fits.gz
0.0 2.2 fUV, slope_fUV

Executed command line : ./mcfost disc_00130.para -phantom /Users/cpinte/disc_00130 -max_mem 0
Fri Jun 17 15:27:32 AEST 2016
Darwin MacBook-Pro-de-Christophe.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
sha = 6b533cb7ad9d31eeec10691e4f065e7c1c285b47
8 changes: 6 additions & 2 deletions test_suite/test_mcfost.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def mcfost(filename,opt=""):
result = subprocess.call(cmd.split())

def clean_results(model_name):
#cmd = ["rm","-rf"]+glob.glob("data_*")
cmd = ["rm","-rf",model_name]
cmd = ["rm","-rf",model_name," *.tmp"]
result = subprocess.call(cmd)

def all_almost_equal(x,y,threshold=0.01):
Expand Down Expand Up @@ -77,6 +76,11 @@ def test_Temperature(model_name):
print("Maximum T difference", (abs(T-T_ref)/(T_ref+1e-30)).max())
print("Mean T difference ", (abs(T-T_ref)/(T_ref+1e-30)).mean())

if (model_name == "discF_00500"):
threshold = 0.1
else:
threshold=0.05

assert MC_similar(T_ref,T,threshold=0.05)

@pytest.mark.parametrize("model_name", model_list)
Expand Down

0 comments on commit 936dab4

Please sign in to comment.