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

Add easy access to parameter errors #1069

Merged
merged 1 commit into from Jun 21, 2017
Merged

Conversation

joleroi
Copy link
Contributor

@joleroi joleroi commented Jun 20, 2017

At the moment there's no simple possibility to access the errors of model parameters, except via fiddling with the covariance matrix oder the hidden _ufloats parameter.

This PR add a function error to ParameterList to over come this, of course it's just a temporary solution until we have a proper covariance matrix class.

cc @Ozi1Kenobi

@joleroi joleroi self-assigned this Jun 20, 2017
@joleroi joleroi added this to the 0.7 milestone Jun 20, 2017
raise ValueError('Covariance matrix not set.')

for i, parameter in enumerate(self.parameters):
if parameter.name == parname:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lookup of parameter by name could / should be a separate method that takes the name and returns the int index, no? If you don't want to implement that here, OK to merge anyways of course.

@joleroi joleroi merged commit 173458e into gammapy:master Jun 21, 2017
@joleroi joleroi deleted the par_error branch June 21, 2017 12:32
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.

None yet

2 participants