# Modeling Quantities Goal –to establish a consistent method for representing physical quantities Why? –easier for newcomers to understand –common software.

## Presentation on theme: "Modeling Quantities Goal –to establish a consistent method for representing physical quantities Why? –easier for newcomers to understand –common software."— Presentation transcript:

Modeling Quantities Goal –to establish a consistent method for representing physical quantities Why? –easier for newcomers to understand –common software solution for handling common problems units transformations quantity combinations (math, units propagation, error prop….) –establish a base data model component that can be used to build up more complex objects.

Modeling Quantities 3 components: Value Error Unit Error is abstract: 2 subtypes (substitutes): Sigma ErrorRange –confidence attribute Unit –prefix attribute

Modeling Quantities Specific Quantities –substitutable for Quantity –restrict the unit Flux: Jy Length: m, pc, lt-yr Frequency: Hz, cm, eV

44.2 0.1 m/s 4.5 pc 18.4 4.1 2.4 Jy 21 m

44.2 0.1 m/s 4.5 pc 18.4 4.1 2.4 Jy 21 m Alternatives: 21 21 cm <Frequency p="c" u="m" sigma="0.1" minus="0.3" plus="0.4" conf="99.7">21

Modeling Quantities: Challenges Quantity transformations –unit conversions * metric scaling * base unit (e.g. m Hz eV) –parsing from human readable form 5 Jy is more compact and convenient but harder to parse Comparisons & Processing Useful Functions: boolean near(q1, q2, tolerance) boolean withinError(q1, q2) boolean lessThan(q1, q2) boolean greaterThan(q1, q2) Quantity toQuantity(string) e.g. toQuantity(5 Jy) enables: greaterThan(Flux, 5 Jy)

Similar presentations