Feature: Custom Quantities#384
Merged
Merged
Conversation
This Branch adds the ability for the user to define promote arbitrary slices (both scalar masks and vector masks) into a Custom Quantity. Implementation follows xfong's implementation in the https://github.com/seeder-research/umagnus fork.
Previous was old version (no functional changes, just comments)
mx3 file went to wrong folder on new PR.
JonathanMaes
requested changes
Mar 19, 2026
Contributor
|
I also think this feature is sufficiently useful to rename the file |
Fixes following comments: Relaxes changed to short Runs. Relax was not needed, just a convenience during testing, and Run() finishes the test faster. Renamed to customquantity.go Description clarified that slices can be created using NewScalarMask and NewVectorMask, and that the slices should match the grid size. Remove a superfluous multiplication by 1 that was left over from initial testing
Remind users that custom Quantities are not limited to 256 regions
added Loadfile to description
This was referenced Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch adds the ability for the user to promote arbitrary slices (which can be made using NewScalarMask and NewVectorMask) into a custom Quantity. The implementation is backported from @XuebingZhao 's umagnus fork. Currently, custom fields can only be made from existing Quantities, Const or Constvector , limiting the amount of spatially varying Quantities that are possible.