Commit 6547ae73 by Médéric Boquien

### Given the current formula, an AGN fraction of 1 would yield an infinite...

`Given the current formula, an AGN fraction of 1 would yield an infinite luminosity. We are clearly out of the accepted bounds for the model. So rather than ruining the fits, we rather raise an Exception and terminate.`
parent 40c43f29
 ... @@ -77,7 +77,11 @@ class Dale2014(CreationModule): ... @@ -77,7 +77,11 @@ class Dale2014(CreationModule): frac_agn = self.parameters["fracAGN"] frac_agn = self.parameters["fracAGN"] L_AGN = luminosity * (1./(1.-frac_agn) - 1.) if frac_agn < 1.: L_AGN = luminosity * (1./(1.-frac_agn) - 1.) else: raise Exception("AGN fraction is exactly 1. Behaviour " "undefined.") sed.add_module(self.name, self.parameters) sed.add_module(self.name, self.parameters) sed.add_info("agn.fracAGN", self.parameters["fracAGN"]) sed.add_info("agn.fracAGN", self.parameters["fracAGN"]) ... ...
 ... @@ -125,7 +125,11 @@ class Fritz2006(CreationModule): ... @@ -125,7 +125,11 @@ class Fritz2006(CreationModule): sed.add_info('fracAGN', self.parameters["fracAGN"]) sed.add_info('fracAGN', self.parameters["fracAGN"]) # Compute the AGN luminosity # Compute the AGN luminosity L_AGN = luminosity * (1./(1.-fracAGN) - 1.) if fracAGN < 1.: L_AGN = luminosity * (1./(1.-fracAGN) - 1.) else: raise Exception("AGN fraction is exactly 1. Behaviour " "undefined.") sed.add_contribution('agn_fritz2006_therm', self.fritz2006.wave, sed.add_contribution('agn_fritz2006_therm', self.fritz2006.wave, L_AGN * self.fritz2006.lumin_therm) L_AGN * self.fritz2006.lumin_therm) ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!