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

Refactor: transform submodule; Field storage control; CondSRF optimization #197

Merged
merged 49 commits into from
Aug 7, 2021

Conversation

MuellerSeb
Copy link
Member

@MuellerSeb MuellerSeb commented Aug 1, 2021

Closes #195 #196

  • gstools.transform:
    • add keywords field, store and process keyword to all transformations to control storage and respect normalizer
    • added apply_function transformation
    • added apply as wrapper for all transformations
    • added transform method to all Field (sub)classes as interface to transform.apply
    • added checks for normal fields to work smoothly with recently added normalizer submodule
  • Field:
    • allow naming fields when generating and control storage with store keyword
    • all subclasses now have the post_process keyword (apply mean, normalizer, trend)
    • added subscription to access fields by name (Field["field"])
    • added set_pos method to set position tuple
    • allow reusing of present pos tuple
    • added pos, mesh_type, field_names, field_shape, all_fields properties
  • CondSRF:
    • memory optimization by forwarding pos to underlying krige instance
    • only recalculate kriging field if the pos tuple changed (optimized ensemble generation)
  • performance improvement by using np.asarray instead of np.array where possible
  • updated examples to use new features

@MuellerSeb MuellerSeb added enhancement New feature or request Refactoring Code-Refactoring needed here labels Aug 1, 2021
@MuellerSeb MuellerSeb added this to the 1.3.3 milestone Aug 1, 2021
@MuellerSeb MuellerSeb self-assigned this Aug 1, 2021
@MuellerSeb MuellerSeb requested a review from LSchueler August 2, 2021 16:33
@MuellerSeb MuellerSeb marked this pull request as draft August 2, 2021 16:33
@MuellerSeb MuellerSeb linked an issue Aug 2, 2021 that may be closed by this pull request
@MuellerSeb MuellerSeb changed the title Refactor: transform submodule Refactor: transform submodule; Field storage control; CondSRF optimization Aug 3, 2021
@MuellerSeb MuellerSeb marked this pull request as ready for review August 3, 2021 17:36
@MuellerSeb
Copy link
Member Author

@LSchueler this is ready for review.

Copy link
Member

@LSchueler LSchueler left a comment

Choose a reason for hiding this comment

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

Wow! Awesome!
Just a few minor comments in the code, as usual.

And I fixed a typo and some forgotten "optional" descriptors for the now optional pos argument. So, don't forget to pull.

examples/01_random_field/01_srf_ensemble.py Show resolved Hide resolved
examples/06_conditioned_fields/00_condition_ensemble.py Outdated Show resolved Hide resolved
examples/06_conditioned_fields/01_2D_condition_ensemble.py Outdated Show resolved Hide resolved
gstools/field/base.py Show resolved Hide resolved
gstools/field/base.py Show resolved Hide resolved
gstools/field/base.py Outdated Show resolved Hide resolved
gstools/field/cond_srf.py Outdated Show resolved Hide resolved
gstools/transform/array.py Show resolved Hide resolved
@MuellerSeb MuellerSeb merged commit 3f480a9 into main Aug 7, 2021
@MuellerSeb MuellerSeb deleted the refactor_transform branch August 7, 2021 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Refactoring Code-Refactoring needed here
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Control of field storage in Field class and subscript option Rework field transformations workflow
2 participants