From e44d4c672e009aeefa2ed7885adad51c8f6e2978 Mon Sep 17 00:00:00 2001 From: Ed Schofield Date: Wed, 4 Feb 2015 18:39:56 +1100 Subject: [PATCH 1/5] Add "hectare" as a supported unit of area The usual "hecto" prefix for 100* (hectopascal, hectometre, etc.) is shortened to "hect" for "hectares". This seems to be a unique case: https://en.wikipedia.org/wiki/Hecto-. Adding "hectare" as an explicit unit of area therefore seems to be cleaner than adding "hect" as a supported prefix for all units. Adding "hect" instead would cause Pint to recognize many strange new Quantities such as ureg.hectsecond. --- pint/default_en.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pint/default_en.txt b/pint/default_en.txt index d8cb3cc..6753b05 100644 --- a/pint/default_en.txt +++ b/pint/default_en.txt @@ -66,6 +66,7 @@ barn = 1e-28 * m ** 2 = b cmil = 5.067075e-10 * m ** 2 = circular_mils darcy = 9.869233e-13 * m ** 2 acre = 4046.8564224 * m ** 2 = international_acre +hectare = 100 * are US_survey_acre = 160 * rod ** 2 # EM From 6e4cae36c9f5e791304d8a6024f578e43c57a634 Mon Sep 17 00:00:00 2001 From: Ed Schofield Date: Thu, 5 Feb 2015 00:13:11 +1100 Subject: [PATCH 2/5] Add units of irradiance: "peak sun hour" (kWh / m^2 / day) and Langley "Peak sun hour" is commonly used in calculations of solar irradiance. Langley is a related unit. --- pint/default_en.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pint/default_en.txt b/pint/default_en.txt index 6753b05..c29ad96 100644 --- a/pint/default_en.txt +++ b/pint/default_en.txt @@ -138,6 +138,10 @@ counts_per_second = count / second = cps byte = 8 * bit = Bo = octet baud = bit / second = Bd = bps +# Irradiance +peak_sun_hour = 1000 * watt_hour / meter**2 = PSH +langley = thermochemical_calorie / centimeter**2 = Langley + # Length angstrom = 1e-10 * meter = ångström = Å inch = 2.54 * centimeter = in = international_inch = inches = international_inches From 78c51f4dc32401efe1be77dd535407bfca86299d Mon Sep 17 00:00:00 2001 From: Jan Pipek Date: Thu, 5 Feb 2015 11:17:26 +0100 Subject: [PATCH 3/5] Add photometric units : lumen & lux --- pint/default_en.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pint/default_en.txt b/pint/default_en.txt index d8cb3cc..aef9776 100644 --- a/pint/default_en.txt +++ b/pint/default_en.txt @@ -186,6 +186,10 @@ denier = gram / (9000 * meter) tex = gram/ (1000 * meter) dtex = decitex +# Photometry +lumen = candela * steradian = lm +lux = lumen / meter ** 2 = lx + # Power [power] = [energy] / [time] watt = joule / second = W = volt_ampere = VA From be632e7a894ecc6a9d006ab1a4a8920c792488db Mon Sep 17 00:00:00 2001 From: Hernan Grecco Date: Fri, 6 Feb 2015 17:44:16 -0300 Subject: [PATCH 4/5] Updated CHANGES --- CHANGES | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index db760d2..240a3bc 100644 --- a/CHANGES +++ b/CHANGES @@ -5,7 +5,13 @@ Pint Changelog 0.7 (unreleased) ---------------- -- Nothing changed yet. +- Added photometric units : lumen & lux. + (Issue #230, thanks janpipek) +- Added hectare and peak sun hour. + (Issue #229, thanks edschofield) +- +- Improved docs. + (thanks Ryan Dwyer) 0.6 (2014-11-07) From 6db0712c692747bf73154f90ad2c7b0815d3afa9 Mon Sep 17 00:00:00 2001 From: Eli Date: Tue, 24 Mar 2015 09:56:18 -0700 Subject: [PATCH 5/5] fixed troy ounce to 480 'grains' --- pint/default_en.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pint/default_en.txt b/pint/default_en.txt index 1a47639..482c039 100644 --- a/pint/default_en.txt +++ b/pint/default_en.txt @@ -144,7 +144,7 @@ langley = thermochemical_calorie / centimeter**2 = Langley # Length angstrom = 1e-10 * meter = ångström = Å -inch = 2.54 * centimeter = in = international_inch = inches = international_inches +inch = 2.54 * centimeter = in = international_inch = inches = international_inches foot = 12 * inch = ft = international_foot = feet = international_feet mile = 5280 * foot = mi = international_mile yard = 3 * feet = yd = international_yard @@ -178,7 +178,7 @@ short_hundredweight = 100 * lb metric_ton = 1000 * kilogram = t = tonne pennyweight = 24 * gram = dwt slug = 14.59390 * kilogram -troy_ounce = 480 * gram = toz = apounce = apothecary_ounce +troy_ounce = 480 * grain = toz = apounce = apothecary_ounce troy_pound = 12 * toz = tlb = appound = apothecary_pound drachm = 60 * gram = apdram = apothecary_dram atomic_mass_unit = 1.660538782e-27 * kilogram = u = amu = dalton = Da @@ -332,12 +332,12 @@ firkin = barrel / 4 # mw is the molecular weight of the species # volume is the volume of the solution # solvent_mass is the mass of solvent in the solution - + # moles -> mass require the molecular weight [substance] -> [mass]: value * mw [mass] -> [substance]: value / mw - # moles/volume -> mass/volume and moles/mass -> mass / mass + # moles/volume -> mass/volume and moles/mass -> mass / mass # require the molecular weight [substance] / [volume] -> [mass] / [volume]: value * mw [mass] / [volume] -> [substance] / [volume]: value / mw