From d4f6db13ec60b51d0aa56bcbbd60e8bf9fdb6ede Mon Sep 17 00:00:00 2001 From: Thomas Dauser Date: Mon, 21 Dec 2020 09:11:29 +0100 Subject: [PATCH 1/2] minor fixes to refl_frac testing --- test/test_reflection_fraction_relxill.sl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/test_reflection_fraction_relxill.sl b/test/test_reflection_fraction_relxill.sl index 819eba3f..f4f97070 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); } -- GitLab From ea109c49acfcb0c2402e7b5658692eed6c09c895 Mon Sep 17 00:00:00 2001 From: Thomas Dauser Date: Mon, 21 Dec 2020 09:12:58 +0100 Subject: [PATCH 2/2] new function [kerr_lp_redshift] calculates the redshift from the LP source to the observer --- src/slang/physics/kerr_lp_redshift.sl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/slang/physics/kerr_lp_redshift.sl diff --git a/src/slang/physics/kerr_lp_redshift.sl b/src/slang/physics/kerr_lp_redshift.sl new file mode 100644 index 00000000..226f8d76 --- /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; +} -- GitLab