|
Thank you Danny for your comments!
I have now printed out four responses, and perhaps I might
even learn some Python!
It will take me some time to analyze all comments!
I had never heard of Python until I audited two Physics
classes. "Math Methods for Physics," and "Quantum Mechanics." (I am 73
years old, a retired Electronics Engineer).
In my first definition module "pythondef.py" I enter physical
constants and formulas that define these constants, but there can be many
entirely different formulas that will calculate the same physical
parameter.
(I have quit trying to keep track of how many assignment
formulas I have now, but it is over three hundred.)
The main reason for all these different formulas is for
checking my theories. If one or more formulas that calculate the same parameter
do not give the correct precision data value or result, then I know that I have
made a wrong assumption (misake).
I need these defintions to be global, but changeable. That is,
I want to be able to overwrite the parameter when the same assignment (or
another assignment that calculates the same parameter) is executed again. This
can be dangerous, so I must be careful.
I may have 20 to 50 or more assignment satements in a .py
module that must be in the correct computation order ( to be sure that all
variables in each following assignment are all defined before execution). When
these lines are processed by my run module, (or display module), they are not in
a good order for including in a book. What is needed is to separate the
equations into groups, and sometimes alphabetical order.
This can be done after all definition modules
have run once, to get all global variables defined. Then I rearrange the
order of all of the 20 to 50 assignments, to make inspection of results easy, no
longer needing to have a certain execution order to avoid an undefined
variable error.
So, typically I do the assignments twice. Once to get the
variable entered globally, and the second time for presentation purposes. (This
requires careful checking to be sure that all equations are in both lists,
without any errors.)
I have needed to frequently modify the defintition modules.
And, they are not really suitable for compiled .pyc modules. However,
my display function and run module function are
compiled modules.
----------------------------------------------------------------------------------------------------------------------------------
I had thought not to introduce my theory into this
discussion, but to help understand what the programs are supposed to do, I will
tell you a little bit about it.
My theory says that photons can be converted into electrons,
to give the newly created electron intrinsic properties. The photon continues to
exist, and to continue to travel at light speed!
After the at-rest electron "structure" is understood, then we
may extend this model to include electrons in motion. Physicists use Quantum
Mechanics (QM) and Shrodinger's Equation to explain the in-motion electron, its
momentum and energy states, using probabilities and wave functions, but
ignore any electron intrinsic structure. Quantum Electro Dynamics (QED) and the
Dirac Equation further explain electron properites, but likewise ignore any
intrinsic electron structure.
So, why is another electron model needed? ( At another time,
perhaps we can say more. )
We need some notation, which could be explained more fully
later, but here is a short description:
Photon Parameters, Electron Classical Parameters, Electron
Compton Parameters (2 sets), Atomic orbit Parameters, and Arbitrary Motion (not
in any orbit) Parameters.
Photon parameters use the subscript 1.
Classical parameters use subscript 0.
Compton Parameters use subscript 10, and 11.
Orbiting Electron parameters use the subscripts 2, and 3, for
the first two Hydrogen orbits.
deBroglie Wave Parameters use a letter subscript
(sometimes upper case, and somtimes lower case).
For Example: (Seven Parameter groups)
Photon Energy = E1, Electron Classical Energy = E0, Electron
Compton Energy = E10, and E11.
First Orbit Energy = E2, Second Orbit Energy = E3, deBroglie
Energy = Ed
And so on for: Current, Voltage, Period, Frequency,
Inductance, Capacitance, Moments, Electric field, Magnetic Field, Flux Density,
etc. etc.
***********************************************************************************************************
So, we have seven groups of variable names, with
precision data, assignment formulas, and comments arranged in four
vertically aligned columns.
(I use Landscape mode, legal size paper for printing .rtf
files to maintain the 4 column formatting.)
***********************************************************************************************************
So, if I displayed only 20 parameters for each of the seven
groups, I would need additional room for the many redundant(?) calculations of
each parameter using different equations which should calcuate the same result,
but will somtime give different answers! This allows me to check my
theory.
I am tempted to assign many similar descriptive variable
names for equations that calculate the same results, but this is unmanageable.
So, I re-use unscripted variable names for calculating the redundant equations,
like E, or simply use "x"
To display a list of definitions without recalculating them, I
sometimes enter statements like: f0 = f0, or E0 = E0.
--------------------------------------------------------------------------------------------------------------------------------------
Unless someone asks me, I do not plan to further mix physics
with Python. My QM instructor said that my electron model theory was "like a
snake chasing its tail," so perhaps Python is the right language to
use?
Hubert
|
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
