Skip to content

Commit 19381cc

Browse files
committed
fixed wrong energy weighting in ISRF
1 parent daed4ad commit 19381cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![bibcode](https://img.shields.io/badge/bibcode-2016A%26A...593A..87R-1c459b)](https://ui.adsabs.harvard.edu/abs/2016A&A...593A..87R)
88
[![doi](https://img.shields.io/badge/doi-10.1051%2F0004--6361%2F201424930-fab70c)](https://doi.org/10.1051/0004-6361/201424930)
99
[![License](https://img.shields.io/badge/License-GPLv3-blue)](https://www.gnu.org/licenses/gpl-3.0)
10-
[![Version](https://img.shields.io/badge/Version-4.13.01-bf0040)](https://img.shields.io/badge/Version-4.13.01-bf0040)
10+
[![Version](https://img.shields.io/badge/Version-4.13.02-bf0040)](https://img.shields.io/badge/Version-4.13.02-bf0040)
1111

1212
is a 3D Monte Carlo radiative transfer code that
1313

src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required (VERSION 3.13.4)
22
PROJECT (POLARIS
3-
VERSION 4.13.01
3+
VERSION 4.13.02
44
DESCRIPTION "POLARIS: POLArized RadIation Simulator, Copyright (C) 2018 Stefan Reissl"
55
HOMEPAGE_URL "https://portia.astrophysik.uni-kiel.de/polaris/"
66
LANGUAGES CXX

src/SourceISRF.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void CSourceISRF::createNextRay(photon_package * pp, CRandomGenerator * rand_gen
209209
pp->updateCoordSystem(phi_direction, theta_direction);
210210

211211
// weight photon energy accordingly
212-
double exp_weight = pow(cos(theta_direction), 1.0 - bias_exp);
212+
double exp_weight = 2.0 / (bias_exp + 1.0) * pow(cos(theta_direction), 1.0 - bias_exp);
213213
pp->setStokesVector(tmp_stokes_vector * exp_weight);
214214
}
215215

0 commit comments

Comments
 (0)