#NEWLINE# @ bit_level #NEWLINE# @ pytest . mark . parametrize ( 'tau' , [ 0.1 , 1 , 10 , 100 ] ) #NEWLINE# def test_pascucci( self , tmpdir , tau , generate ) : #NEWLINE# #INDENT# print ( generate ) #NEWLINE# m = AnalyticalYSOModel ( ) #NEWLINE# m . star . radius = 1.0 #NEWLINE# m . star . temperature = 5800.0 #NEWLINE# m . star . luminosity = ( ( ( ( 4.0 * pi ) * ( rsun ** 2 ) ) * sigma ) * ( 5800.0 ** 4 ) ) #NEWLINE# disk = m . add_flared_disk ( ) #NEWLINE# disk . p = 0.125 #NEWLINE# disk . beta = 1.125 #NEWLINE# disk . mass = ( ( 1.113838e-06 * msun ) * tau ) #NEWLINE# disk . rmin = ( 1.0 * au ) #NEWLINE# disk . rmax = ( 1000.0 * au ) #NEWLINE# disk . h_0 = ( ( 125 * au ) * np . sqrt ( ( 2.0 / pi ) ) ) #NEWLINE# disk . r_0 = ( 500 * au ) #NEWLINE# disk . dust = self . dust_file #NEWLINE# theta = np . array ( [ 12.5 , 42.5 , 77.5 ] ) #NEWLINE# phi = np . array ( [ 30.0 , 30.0 , 30.0 ] ) #NEWLINE# image = m . add_peeled_images ( ) #NEWLINE# image . set_viewing_angles ( theta , phi ) #NEWLINE# image . set_image_size ( 1 , 1 ) #NEWLINE# image . set_image_limits ( ( ( - 1500.0 ) * au ) , ( 1500.0 * au ) , ( ( - 1500.0 ) * au ) , ( 1500.0 * au ) ) #NEWLINE# image . set_aperture_radii ( 1 , ( 1500.0 * au ) , ( 1500.0 * au ) ) #NEWLINE# image . set_wavelength_range ( 61 , 1 , 61 ) #NEWLINE# image . set_stokes ( True ) #NEWLINE# m . set_raytracing ( True ) #NEWLINE# m . set_n_initial_iterations ( 5 ) #NEWLINE# m . set_spherical_polar_grid_auto ( 100 , 30 , 1 , rmax = ( 1300.0 * au ) ) #NEWLINE# wavelengths = [ 0.12 , 0.14 , 0.16 , 0.18 , 0.2 , 0.215 , 0.22 , 0.23 , 0.25 , 0.274 , 0.3 , 0.344 , 0.4 , 0.44 , 0.55 , 0.7 , 0.9 , 1.1 , 1.4 , 1.65 , 2 , 2.2 , 2.6 , 3 , 3.2 , 3.6 , 4 , 5 , 6 , 6.28 , 6.3 , 6.32 , 6.5 , 8 , 9.5 , 10 , 11.5 , 11.515016 , 11.524977 , 11.540016 , 12 , 14 , 16 , 18 , 20 , 24 , 27.5 , 32.5 , 37.5 , 45 , 55 , 70 , 90 , 110 , 135 , 175 , 250 , 400 , 700 , 1200 , 2000 ] #NEWLINE# m . set_monochromatic ( True , wavelengths = wavelengths ) #NEWLINE# m . set_n_photons ( initial = 1000 , imaging_sources = 1000 , imaging_dust = 1000 , raytracing_sources = 1000 , raytracing_dust = 1000 ) #NEWLINE# m . set_copy_input ( False ) #NEWLINE# m . write ( tmpdir . join ( random_id ( ) ) . strpath , copy = False , absolute_paths = True ) #NEWLINE# output_file = tmpdir . join ( random_id ( ) ) . strpath #NEWLINE# m . run ( output_file ) #NEWLINE# if generate : #NEWLINE# #INDENT# reference_file = os . path . join ( generate , ( function_name ( ) + '.rtout' ) ) #NEWLINE# shutil . copy ( output_file , reference_file ) #NEWLINE# pytest . skip ( 'Skipping test, since generating data' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# reference_file = os . path . join ( DATA , ( function_name ( ) + '.rtout' ) ) #NEWLINE# assert_identical_results ( output_file , reference_file )