Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when trying to set the non linear model #66

Closed
SamuelBrieden opened this issue Nov 17, 2019 · 0 comments
Closed

Problems when trying to set the non linear model #66

SamuelBrieden opened this issue Nov 17, 2019 · 0 comments

Comments

@SamuelBrieden
Copy link

SamuelBrieden commented Nov 17, 2019

I noticed, that if I want to set the nonlinear model via the class NonLinearModel (instead of directly using the set_params() function) CAMB returns me an error. I had a quick look into model.py and I think the problem can easily be fixed by replacing
self.NonLinear = self.make_class_named(initial_power_model, NonLinearModel)
by
self.NonLinear = self.make_class_named(non_linear_model, NonLinearModel)

The way it is at the moment it seems to be a typo (See the full function below)


`    def set_classes(self, dark_energy_model=None, initial_power_model=None,
                    non_linear_model=None, recombination_model=None):
        """
        Change the classes used to implement parts of the model.
        :param dark_energy_model: 'fluid', 'ppf', or name of a DarkEnergyModel class
        :param initial_power_model: name of an InitialPower class
        :param non_linear_model: name of a NonLinearModel class
        :param recombination_model: name of recombination_model class
        """
        if dark_energy_model:
            self.DarkEnergy = self.make_class_named(dark_energy_model, DarkEnergyModel)
        if initial_power_model:
            self.InitPower = self.make_class_named(initial_power_model, InitialPower)
        if non_linear_model:
            self.NonLinear = self.make_class_named(initial_power_model, NonLinearModel)
        if recombination_model:
            self.Recomb = self.make_class_named(recombination_model, Recombination
```Model)`
cmbant added a commit that referenced this issue Nov 17, 2019
@cmbant cmbant closed this as completed Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants