-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
[scope] enhancementAdds/improves features (major.MINOR.patch)Adds/improves features (major.MINOR.patch)featurePR labelPR label
Milestone
Description
Discussed in #27
Originally posted by damskii9992 July 15, 2024
General
Adding capability to do arithmetic operations on Parameters
and DescriptorNumbers
allow users to use fitted parameters to do quick and easy calculations with uncertainties and units to calculate items of interest, as well as quickly and easily create new parameters/descriptors from previous ones.
Current implementation
This is not currently implemented
Proposed implementation
Add the following methods to Parameter
and DescriptorNumber
:
__add__
__sub__
__mul__
__truediv__
__pow__
__neg__
__abs__
The output should be a Parameter
with automatically calculated min/max if any of the elements of the arithmetic operation is a Parameter, otherwise the output should be a DescriptorNumber
. In either case the unit and variance is also automatically propagated.
Metadata
Metadata
Assignees
Labels
[scope] enhancementAdds/improves features (major.MINOR.patch)Adds/improves features (major.MINOR.patch)featurePR labelPR label