diff --git a/src/slang/physics/kerr_lp_redshift.sl b/src/slang/physics/kerr_lp_redshift.sl new file mode 100644 index 0000000000000000000000000000000000000000..226f8d761a7c055712d91939927d2b2d38ad30ae --- /dev/null +++ b/src/slang/physics/kerr_lp_redshift.sl @@ -0,0 +1,18 @@ +%!%+ +%\function{kerr_lp_redshift} +%\synopsis{calculates the redshift from a Lamp Post source (point-like) +% on the rotational axis of a spining black hole (spin a) to the observer} +%\usage{kerr_lp_redshift(height, a)} +%\description +% z_obs = 1 / ( sqrt( 1 - 2*h/(h^2 + a^2) ) - 1 +%!%- +define kerr_lp_redshift(){ + variable height, a; + + switch(_NARGS) + { case 2: (height, a) = ();} + { help(_function_name()); return; } + + + return 1.0 / sqrt( 1.0 - 2*height / (height^2 + a^2))-1.0; +} diff --git a/test/test_reflection_fraction_relxill.sl b/test/test_reflection_fraction_relxill.sl index 819eba3f907288c9ccecdbcc6bf1a8c2dafaba32..f4f970704ddd2ff1f425d285e20d4ed31d474b21 100644 --- a/test/test_reflection_fraction_relxill.sl +++ b/test/test_reflection_fraction_relxill.sl @@ -1,12 +1,8 @@ require("./share/isisscripts.sl"); -evalfile("src/fitting/relxill/reflection_fraction_relxill.sl"); - - - variable CONST_prec = 1e-2; -putenv("RELXILL_TABLE_PATH",""); %% make sure no env variable is set +putenv("RELXILL_TABLE_PATH="); %% make sure no env variable is set variable path_to_reltable = "/userdata/data/dauser/relline_tables/"; variable table_name = "rel_lp_table_v0.5b.fits"; @@ -34,4 +30,5 @@ if (stat_file(path_to_reltable+table_name)!=NULL){ exit(all(tests_passed) ? 0 : 1); } else { message(" skipping tests of reflection_fraction_relxill(), as table could not be found"); + exit(0); }