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

Get the mean Raw, Unfolded and Primary from Ensemble #180

Open
tellefs opened this issue Feb 22, 2021 · 2 comments
Open

Get the mean Raw, Unfolded and Primary from Ensemble #180

tellefs opened this issue Feb 22, 2021 · 2 comments
Labels
feature_request Requestion this feature question Further information is requested

Comments

@tellefs
Copy link

tellefs commented Feb 22, 2021

Right now, one can extract e.g. the first generation matrix from the ensemble
ensemble.get_firstgen(0)
Here one has to specify which ensemble member to choose. If one could get mean of these matrices, e.g. like
ensemble.get_firstgen_mean()
This could be nice for different plotting purposes. It might be excess, but I'll put it here and see what you think.

Right now I have done something like:

primary_plot=ensemble.get_firstgen(0)

for i in range(1, ensemble_members):
    primary_plot += ensemble.get_firstgen(i)

primary_plot /= ensemble_members
@fzeiser fzeiser added feature_request Requestion this feature question Further information is requested labels Feb 22, 2021
@fzeiser
Copy link
Collaborator

fzeiser commented Feb 22, 2021

For the article we created a function like this:
https://github.com/fzeiser/ompy_article_data/blob/aa303b769c92777cc7046dedef1d8fbc8e82efa1/myplots.py#L10-L79

This could be implemented as a method of ensemble / as a part of the plot method.

@tellefs
Copy link
Author

tellefs commented Feb 22, 2021

But that still plots the original raw matrix, and its unfolded and primary, right? Or du you mean to include the lines that are removed by comment:

    # # mean values
    # raw = om.Matrix(np.mean(ensemble.raw_ensemble, axis=0),
    #                 Ex=ensemble.raw.Ex, Eg=ensemble.raw.Eg)
    # unfolded = om.Matrix(np.mean(ensemble.unfolded_ensemble, axis=0),
    #                      Ex=ensemble.raw.Ex,
    #                      Eg=ensemble.raw.Eg)
    # firstgen = om.Matrix(np.mean(ensemble.firstgen_ensemble, axis=0),
    #                      Ex=ensemble.firstgen.Ex,
    #                      Eg=ensemble.firstgen.Eg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature_request Requestion this feature question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants