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 grid support to MultipleDistantMeasure
#274
Merged
Merged
Conversation
This file contains 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
leroyvn
force-pushed
the
refactor_mdistant
branch
from
October 21, 2022 15:18
876a254
to
a3625b9
Compare
schunkes
reviewed
Oct 24, 2022
leroyvn
force-pushed
the
refactor_mdistant
branch
from
October 24, 2022 09:20
a3625b9
to
1ba6b34
Compare
schunkes
reviewed
Oct 24, 2022
schunkes
reviewed
Oct 24, 2022
leroyvn
force-pushed
the
refactor_mdistant
branch
2 times, most recently
from
October 25, 2022 16:25
588695a
to
54078d7
Compare
This commit automates 0-snapping for azimuth values close to 0 during normalisation to the [0, 2π[ interval. This prevents unwanted shifts of negative values close to 0 to 2π-ε.
…m_viewing_angles()
leroyvn
force-pushed
the
refactor_mdistant
branch
from
October 25, 2022 16:44
54078d7
to
d7c2526
Compare
I think this is ready to ship. I decided to postpone the tutorials, it's a lot of work and I have other priorities. The usage of the new construction API is however almost the same as the previous (the new |
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.
Description
This PR adds support for gridded viewing angle layouts to
MultipleDistantMeasure
. Changes are as follows:MultipleDistantMeasure
is reworked. Thehplane
anddirections
fields are replaced with a genericdirection_layout
field which holds aLayout
instance. This field is dict-constructible, as always (I didn't use a Dessine-moi factory for this, it would be overkill IMO).Layout
defines an interface to generate a sequence of viewing directions and angles. This has several advantages:MultipleDistantMeasure.from_viewing_angles()
constructor is deprecated and replaced by specialised constructors, all accessible directly or from the dict API using theconstruct
key.hplane
layout.mdistant
measure. For an example, see theunstack_gridded_helper.ipynb
file in that gist.This PR also contains small fixes and changes:
numpy.allclose()
function the way it is supposed to be, i.e. with the first argument as the reference.To do
from_viewing_angles()
Layout
API docsAdd measure guide explaining how all this works (other PR maybe?)Add measure tutorial (other PR maybe?)Checklist
main
branch