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

Restructure Radial1DModel #632

Closed
wants to merge 28 commits into from

Conversation

ftsamis
Copy link
Member

@ftsamis ftsamis commented Jul 22, 2016

The purpose of this PR is to rewrite the Radial1DModel class to make it more dynamic and add a proper __init__ method to it, which accepts all the required arguments for the model. Also, attributes and methods that do not belong to the model should be removed from it with this PR.

The main idea is to have some base attributes to the model, and then provide dynamic arguments (i.e. python properties) which are (re)calculated every time they are accessed from the base attributes. This way, if a base attribute is changed, everything that depends on it will reflect the changes.

Additionally, __init__ should now take the actual base attributes that model needs instead of a config object, while we will still have a from_config classmethod which will create a model from a config object.

@ftsamis
Copy link
Member Author

ftsamis commented Aug 14, 2016

I have added an option to provide time_0 for uniform densities as well. Additionally, now time_0 for all specific density types is not a required property, and if it's not provided, time_0 will take the value of time_explosion.

@ftsamis
Copy link
Member Author

ftsamis commented Sep 12, 2016

Closing in favor of #652.

@ftsamis ftsamis closed this Sep 12, 2016
@ftsamis ftsamis deleted the restructure-model branch December 20, 2016 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants