Modeling Quantities - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Modeling Quantities

Description:

quantity combinations (math, units ... boolean greaterThan(q1, q2) Quantity toQuantity(string) e.g. toQuantity( 5 Jy') enables: greaterThan(Flux, 5 Jy' ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 7
Provided by: raymond134
Category:

less

Transcript and Presenter's Notes

Title: Modeling Quantities


1
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.

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

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

4
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltQuantities xmlns"http//www.ivoa.net/xml/prop/VO
    Quantity xmlnsxsi"http//www.w3.org/2001/XMLSch
    ema-instance"gt
  • ltQuantitygt
  • ltValuegt44.2lt/Valuegt
  • ltSigmagt0.1lt/Sigmagt
  • ltUnit prefix"k"gtm/slt/Unitgt
  • lt/Quantitygt
  • ltLengthgt
  • ltValuegt4.5lt/Valuegt
  • ltUnit prefix"M"gtpclt/Unitgt
  • lt/Lengthgt
  • ltFluxgt
  • ltValuegt18.4lt/Valuegt
  • ltErrorRange confidence"67"gt
  • ltminusgt4.1lt/minusgt
  • ltplusgt2.4lt/plusgt

5
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltQuantities xmlns"http//www.ivoa.net/xml/prop/VO
    Quantity" xmlnsxsi"http//www.w3.org/2001/XMLSch
    ema-instance"gt
  • ltQuantitygt
  • ltValuegt44.2lt/Valuegt
  • ltSigmagt0.1lt/Sigmagt
  • ltUnit prefix"k"gtm/slt/Unitgt
  • lt/Quantitygt
  • ltLengthgt
  • ltValuegt4.5lt/Valuegt
  • ltUnit prefix"M"gtpclt/Unitgt
  • lt/Lengthgt
  • ltFluxgt
  • ltValuegt18.4lt/Valuegt
  • ltErrorRange confidence"67"gt
  • ltminusgt4.1lt/minusgt
  • ltplusgt2.4lt/plusgt

Alternatives ltFrequency p"c"
u"m"gt21lt/Frequencygt ltFrequencygt21 cmlt/Frequencygt
ltFrequency value"21 cm"/gt ltFrequency p"c"
u"m" sigma"0.1" minus"0.3"
plus"0.4" conf"99.7"gt21lt/Frequencygt
6
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)
Write a Comment
User Comments (0)
About PowerShow.com