Context
In AGN_DUST, the AGN emission spectrum is attenuated by the diffuse dust curve using the following line:
!attenuate the AGN emission by the diffuse dust
agnspeci = agnspeci*EXP(-attn_curve(spec_lambda,dust_type,pset))
The function attn_curve returns the shape of the attenuation curve (i.e., the optical depth per unit dust parameter), but it does not appear to be scaled by the actual diffuse dust optical depth parameter, dust2 (stored in pset%dust2).
Since attn_curve does not internally multiply its result by pset%dust2, the code above effectively attenuates AGN emission by a fixed optical depth corresponding to dust2=1.0, regardless of the user's actual dust2 setting.
Impact
This decouples the AGN obscuration from the host galaxy's diffuse dust properties. A user might set dust2=0.0 (a dust-free galaxy) or dust2=5.0 (a heavily obscured galaxy), but the AGN emission will always be attenuated by the same constant factor.
Proposed Fix
The attenuation should be scaled by the diffuse dust parameter dust2:
!attenuate the AGN emission by the diffuse dust
! Scale by pset%dust2 to apply the correct optical depth
agnspeci = agnspeci*EXP(-pset%dust2 * attn_curve(spec_lambda,dust_type,pset))
Context
In
AGN_DUST, the AGN emission spectrum is attenuated by the diffuse dust curve using the following line:The function
attn_curvereturns the shape of the attenuation curve (i.e., the optical depth per unit dust parameter), but it does not appear to be scaled by the actual diffuse dust optical depth parameter,dust2(stored inpset%dust2).Since
attn_curvedoes not internally multiply its result bypset%dust2, the code above effectively attenuates AGN emission by a fixed optical depth corresponding todust2=1.0, regardless of the user's actualdust2setting.Impact
This decouples the AGN obscuration from the host galaxy's diffuse dust properties. A user might set
dust2=0.0(a dust-free galaxy) ordust2=5.0(a heavily obscured galaxy), but the AGN emission will always be attenuated by the same constant factor.Proposed Fix
The attenuation should be scaled by the diffuse dust parameter
dust2: