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

Circular rings are scaled wrong if no max distance is provided #98

Closed
laufhannes opened this issue Mar 30, 2022 · 1 comment · Fixed by #101
Closed

Circular rings are scaled wrong if no max distance is provided #98

laufhannes opened this issue Mar 30, 2022 · 1 comment · Fixed by #101

Comments

@laufhannes
Copy link
Contributor

I guess this issue exists since 3e297b8 / #82.

I'm not sure how the unit handling in python works, but in this part max_length is in km if provided as cli argument and in m otherwise. In my example, the division distance / max_length gives 0.00028... kilometer / meter, but it's 0.28... dimensionless when using distance.to_base_units() / max_length.to_base_units().

        min_length = length_range.lower()
        max_length = length_range.upper()
        if self._max_distance:
            max_length = self._max_distance
        assert min_length is not None
        assert max_length is not None
        ring_distance = self._determine_ring_distance(max_length)
        if ring_distance is None:
            return
        distance = ring_distance
        while distance < max_length:
            radius = radius_range.interpolate((distance / max_length).magnitude)

Not sure if there are more lines where this fails (or did I somehow misconfigured my units?).

@lowtower
Copy link
Contributor

@laufhannes: should be fixed with #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants