-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GPLv3 declarations to source code and licence text
- Loading branch information
Showing
8 changed files
with
814 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# atom_unit.py | ||
|
||
# Christian Hill, 29/3/13 | ||
# A class for, and attributes used in the parsing of a single "atom unit" | ||
# identified by a base unit, SI-prefix and exponent, such as 'kg', 's-1', | ||
# 'nm3', 'GHz'. | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
import sys | ||
from pyparsing import Word, Group, Literal, Suppress, ParseException, oneOf,\ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Christian Hill | ||
# v0.2 21/11/2012 | ||
# v0.1 28/11/2011 | ||
# base_unit.py | ||
# A class representing a "base unit", identified as a single unit with no | ||
# prefix or exponent, such as 'g', 'hr', 'bar', 's'. | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# The BaseUnit class, representing a "base" unit to a physical quantity. | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
from dimensions import * | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Christian Hill | ||
# v0.2 21/11/2012 | ||
# v0.1 28/11/2011 | ||
# dimensions.py | ||
# A class representing the dimensions of a physical quantity's units, in | ||
# terms of powers of length (L), mass (M), time (T), temperature (Theta), | ||
# amount of substance (Q), current (C) and luminous intensity (I). | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# The Dimensions class, representing the dimensions of a physical quantity. | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
class Dimensions(object): | ||
# these are the abbreviations for Length, Mass, Time, Temperature, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# quantity.py | ||
|
||
# Christian Hill, 29/3/13 | ||
# A class representing physical quantity, with name, units and uncertainty. | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
import re | ||
import math | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Christian Hill | ||
# v0.2 21/11/2012 | ||
# v0.1 28/11/2011 | ||
# si.py | ||
# A class representing the SI prefixes (SIPrefix) and a list of the SI | ||
# base units (si_unit_stems): length (L), mass (M), time (T), temperature | ||
# (Theta), amount of substance (Q), current (C) and luminous intensity (I). | ||
# | ||
# Metadata relating to SI units and their prefixes | ||
|
||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
class SIPrefix(object): | ||
""" A little class describing SI prefixes. """ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# symbol.py | ||
|
||
# Christian Hill, 29/3/13 | ||
# A class representing a symbol (perhaps the label for a physical quantity | ||
# represented as a Quantity object) with a name in text, LaTeX and HTML. | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
class Symbol(object): | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# units.py | ||
|
||
# Christian Hill, 29/3/13 | ||
# A class representing the units of a physical quantity. | ||
# | ||
# Copyright (C) 2012 Christian Hill | ||
# Department of Physics and Astronomy, University College London | ||
# [email protected] | ||
# | ||
# This file is part of PyQn | ||
# | ||
# PyQn is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyQn is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyQn. If not, see <http://www.gnu.org/licenses/> | ||
|
||
import copy | ||
from dimensions import Dimensions | ||
|