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

Allow unwrapping of wrappers. #2385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thorstenhater
Copy link
Contributor

Fixes #2254

@Helveg
Copy link
Collaborator

Helveg commented Aug 14, 2024

Ok so if I scanned the changes correctly, one could now arbor.membrane_capacitance(...).value and that would be a quantity object, so x.value.value would be the magnitude?

@thorstenhater
Copy link
Contributor Author

Exactly. It's a bit awkward, but there's also the scale, which is a scalar (not a quantity) potentially varying along the dendrite. Thus, we have the split into (value=(magnitude, unit), scale=iexpr).

@thorstenhater
Copy link
Contributor Author

@Helveg you could give the whole affair a review if it does what you need and we'll merge it.

@Helveg
Copy link
Collaborator

Helveg commented Aug 26, 2024

I don't have arbor in my software environment anymore, and no bandwidth really :(

@boeschf
Copy link
Contributor

boeschf commented Sep 18, 2024

x.value.value looks indeed a bit awkward. Wouldn't it be more consistent with the canonical use of units if the magnitude/value can be queried by x.value and the quantity by x.quantity (i.e. x.value == x.quantity.value)? Not sure if quantity can be used as a property here, though.

@thorstenhater
Copy link
Contributor Author

Yes, that seem like a good solution. As we use a base value and a potentially varying scale, how about

base :: double
base_as :: unit -> double
scale :: iexpr
unit :: unit

that should cover all the bases (!!).

@boeschf
Copy link
Contributor

boeschf commented Sep 18, 2024

yes, better still. should it be base or basis?

@thorstenhater
Copy link
Contributor Author

I wonder about that, too, but I tend towards base (as in 'base ten').

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 this pull request may close these issues.

Improve interface of property wrappers like membrane_capacitance.
3 participants