Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hi all, I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. Name Description Value alpha Fine structure constant 7.2973525698 x 10-3 c Speed of light in a vacuum 299792458 m/s e Euler's number 2.7182818284590452 ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m F Faraday constant NAe 96485.3365 C/mol G Gravitation constant 6.67384 x 10-11 m3/kg/s2 gn Earth standard gravity 9.80665 m/s2 h Planck constant 6.62606957 x 10-34 J s hbar h/(2pi) 1.054571726 x 10-34 J s k Boltzmann constant R/NA 1.3806488 x 10-23 J/K me electron mass 9.10938291 x 10-31 kg mn neutron mass 1.674927351 x 10-27 kg mp proton mass 1.672621777 x 10-27 kg mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 Na Avogadro constant NA 6.02214129e23 mol-1 phi golden ratio 1.6180339887498948 pi Pi 3.1415926535897932 R molar gas constant 8.3144621 J/mol/K R_earth Earth radius (spherical) 6370997.0 m re classical electron radius 2.8179403267 x 10-15 m rydberg Rydberg constant Rinf 10973731.568539 m-1 sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 u unified atomic mass unit 1.660538921 x 10-27 kg Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. Thanks! -Chris ExelisVis p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed.
Re: Physical constants in IDL with !CONST
Sounds cool and is a good idea. What if you have four tags: name description value unit so you could have !const={name:'c',description:'speed of light',value:2.99d10,unit:'cm/s'} -Russell On Tuesday, December 18, 2012 5:34:53 PM UTC-5, Chris Torrence wrote: > Hi all, > > > > I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. > > > > Name Description Value > > alpha Fine structure constant 7.2973525698 x 10-3 > > c Speed of light in a vacuum 299792458 m/s > > e Euler's number 2.7182818284590452 > > ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C > > eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m > > F Faraday constant NAe 96485.3365 C/mol > > G Gravitation constant 6.67384 x 10-11 m3/kg/s2 > > gn Earth standard gravity 9.80665 m/s2 > > h Planck constant 6.62606957 x 10-34 J s > > hbar h/(2pi) 1.054571726 x 10-34 J s > > k Boltzmann constant R/NA 1.3806488 x 10-23 J/K > > me electron mass 9.10938291 x 10-31 kg > > mn neutron mass 1.674927351 x 10-27 kg > > mp proton mass 1.672621777 x 10-27 kg > > mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 > > Na Avogadro constant NA 6.02214129e23 mol-1 > > phi golden ratio 1.6180339887498948 > > pi Pi 3.1415926535897932 > > R molar gas constant 8.3144621 J/mol/K > > R_earth Earth radius (spherical) 6370997.0 m > > re classical electron radius 2.8179403267 x 10-15 m > > rydberg Rydberg constant Rinf 10973731.568539 m-1 > > sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 > > u unified atomic mass unit 1.660538921 x 10-27 kg > > > > Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. > > > > Thanks! > > > > -Chris > > ExelisVis > > p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed.
Chris, If you're going to put pi in there, which we already have in !pi, you might also consider putting !dtor and !radeg in as well, otherwise people might be wondering why !pi was put into !const but not the other two. But don't remove the three existing system variables of course :) Jeff
On Wednesday, December 19, 2012 10:36:24 PM UTC-5, Jeff N. wrote: > Chris, > > > > If you're going to put pi in there, which we already have in !pi, you might also consider putting !dtor and !radeg in as well, otherwise people might be wondering why !pi was put into !const but not the other two. But if you do, then put the double precision values! !DTOR is worse than useless for me because it's only single precision. Craig
On Wednesday, December 19, 2012 9:43:16 PM UTC-7, Craig Markwardt wrote: > On Wednesday, December 19, 2012 10:36:24 PM UTC-5, Jeff N. wrote: > >> Chris, > >> > >> > >> > >> If you're going to put pi in there, which we already have in !pi, you might also consider putting !dtor and !radeg in as well, otherwise people might be wondering why !pi was put into !const but not the other two. > > > > But if you do, then put the double precision values! !DTOR is worse than useless for me because it's only single precision. > > > > Craig Hi all, These are great suggestions. Paul, I just added in all of your constants except "c1" and "c2". There seems to be a discrepancy with the definition of c1. NIST gives it as 2.pi.h.c^2, which is a factor of "pi" bigger than your constant. I don't want anyone to get confused and just use the constant blindly, perhaps including an unexpected extra factor of pi. Which one is in "standard" use? Craig, I'll add in the AU, and the mass of the Sun & Earth. And of course "dtor" and "radeg" (double precision!). But don't worry, the older system variables won't go away. Russell, great suggestion on including more info, like the "units". I'd love to do that, but I don't want to make the structure too complicated. What about having a second system variable, say something like !CONST_UNITS, which could contain additional information? -Chris
I wonder if the constants should be !DtoR and !RtoD (or RADEG and DEGRA) to correct the earlier inconsistency in the ancient history of IDL. I'm not sure about this, though. --Wayne On Wednesday, December 19, 2012 10:36:24 PM UTC-5, Jeff N. wrote: > Chris, > > > > If you're going to put pi in there, which we already have in !pi, you might also consider putting !dtor and !radeg in as well, otherwise people might be wondering why !pi was put into !const but not the other two. > > > > But don't remove the three existing system variables of course :) > > > > Jeff
On Thursday, December 20, 2012 12:37:12 AM UTC-5, Chris Torrence wrote: > On Wednesday, December 19, 2012 9:43:16 PM UTC-7, Craig Markwardt wrote: > >> On Wednesday, December 19, 2012 10:36:24 PM UTC-5, Jeff N. wrote: > >> > >>> Chris, > >> > >>> > >> > >>> > >> > >>> > >> > >>> If you're going to put pi in there, which we already have in !pi, you might also consider putting !dtor and !radeg in as well, otherwise people might be wondering why !pi was put into !const but not the other two. > >> > >> > >> > >> But if you do, then put the double precision values! !DTOR is worse than useless for me because it's only single precision. > >> > >> > >> > >> Craig > > > > Hi all, > > > > These are great suggestions. > > > > Paul, I just added in all of your constants except "c1" and "c2". There seems to be a discrepancy with the definition of c1. NIST gives it as 2.pi.h.c^2, which is a factor of "pi" bigger than your constant. I don't want anyone to get confused and just use the constant blindly, perhaps including an unexpected extra factor of pi. Which one is in "standard" use? > > > > Craig, I'll add in the AU, and the mass of the Sun & Earth. And of course "dtor" and "radeg" (double precision!). But don't worry, the older system variables won't go away. > > > > Russell, great suggestion on including more info, like the "units". I'd love to do that, but I don't want to make the structure too complicated. What about having a second system variable, say something like !CONST_UNITS, which could contain additional information? Hi, Great idea1 Would it be a pain to call it something like !K instead of !CONST for all of the keyboard-bumblers out there (like me)? It might be nice to include the reference for each definition if they come from different standards. Have you considered the possibility of using an object in the system variable? mass = 12*!K->get("u", /value) print, "mass = ", mass, !K->Get("u", /unit) It might be nice if it were the possibile to support two kinds of constants - built-in and user defined. The built-in would be read only, but the user defined could be added/modified as the user sees fit at start-up or whenever. At least that would provide a unified interface. Cheers, Ben
Hi Ben, Yes, using some sort of object is a possibility. But, not to throw out a bombshell, but... what if we were to change !C to be the constant? It's currently used for some very old (stupid) purpose like holding the min/max index from the last call to min/max. Does anyone have any code that relies on this?! -Chris
Chris Torrence writes: > Yes, using some sort of object is a possibility. > > But, not to throw out a bombshell, but... what if we were to change !C to be the constant? It's currently used for some very old (stupid) purpose like holding the min/max index from the last call to min/max. > > Does anyone have any code that relies on this?! God help the boys at NASA who are still running IDL 1.0 on some of their machines! But, yes, I'm all in favor of using !C as the constant system variable. :-) Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
On Thu, 20 Dec 2012 06:24:31 -0800 (PST), wlandsman wrote: > I wonder if the constants should be !DtoR and !RtoD (or RADEG and DEGRA) to correct the earlier inconsistency in the ancient history of IDL. I'm not sure about this, though. --Wayne > A lot of discussions for a little thing, that everyone can do her or himself within a startup file. However, I think Wayne is absolutly right. A similar point is, that I wouldn't name the elementary charge "eV". I know, there is a name conflict with the Euler's number. However the Euler's number can simply be calculated by number=exp(1d). Therfore I suggest to simply remove it from the table. Please realize, that most of the "constants" are from physics and chemistry and the Euler's number is a mathematical number which never will change. (You may argue, that pi also is a mathematical constant, however it is needed [even though by definition] for the calculation of the magnetic constant mu0=4d*!dpi*1d-7) The name "ev" for the elementary charge is confusing, because the definition of the elementary charge constant has nothing to do with the energy unit "electron volt". The reason for 1 eV being 1.602... 10^-19 J only reflects, that changing the potential of a charge e about 1 V means an energy change of 1.602... 10^-19 J. Thats what I wanted to say. Cheers, Heinz
On Tuesday, December 18, 2012 5:34:53 PM UTC-5, Chris Torrence wrote: > Hi all, > > > > I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. > > > > Name Description Value > > alpha Fine structure constant 7.2973525698 x 10-3 > > c Speed of light in a vacuum 299792458 m/s > > e Euler's number 2.7182818284590452 > > ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C > > eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m > > F Faraday constant NAe 96485.3365 C/mol > > G Gravitation constant 6.67384 x 10-11 m3/kg/s2 > > gn Earth standard gravity 9.80665 m/s2 > > h Planck constant 6.62606957 x 10-34 J s > > hbar h/(2pi) 1.054571726 x 10-34 J s > > k Boltzmann constant R/NA 1.3806488 x 10-23 J/K > > me electron mass 9.10938291 x 10-31 kg > > mn neutron mass 1.674927351 x 10-27 kg > > mp proton mass 1.672621777 x 10-27 kg > > mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 > > Na Avogadro constant NA 6.02214129e23 mol-1 > > phi golden ratio 1.6180339887498948 > > pi Pi 3.1415926535897932 > > R molar gas constant 8.3144621 J/mol/K > > R_earth Earth radius (spherical) 6370997.0 m > > re classical electron radius 2.8179403267 x 10-15 m > > rydberg Rydberg constant Rinf 10973731.568539 m-1 > > sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 > > u unified atomic mass unit 1.660538921 x 10-27 kg > > > > Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. > > > > Thanks! > > > > -Chris > > ExelisVis > > p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed. Excellent - being in a bunker myself, I understand how sensitive bunkered people are :)
On Thursday, December 20, 2012 10:36:21 AM UTC-7, Heinz Stege wrote: > On Thu, 20 Dec 2012 06:24:31 -0800 (PST), wlandsman wrote: > > > >> I wonder if the constants should be !DtoR and !RtoD (or RADEG and DEGRA) to correct the earlier inconsistency in the ancient history of IDL. I'm not sure about this, though. --Wayne > >> > > A lot of discussions for a little thing, that everyone can do her or > > himself within a startup file. > > > > However, I think Wayne is absolutly right. > > > > A similar point is, that I wouldn't name the elementary charge "eV". I > > know, there is a name conflict with the Euler's number. However the > > Euler's number can simply be calculated by number=exp(1d). Therfore I > > suggest to simply remove it from the table. > > > > Please realize, that most of the "constants" are from physics and > > chemistry and the Euler's number is a mathematical number which never > > will change. (You may argue, that pi also is a mathematical constant, > > however it is needed [even though by definition] for the calculation > > of the magnetic constant mu0=4d*!dpi*1d-7) > > > > The name "ev" for the elementary charge is confusing, because the > > definition of the elementary charge constant has nothing to do with > > the energy unit "electron volt". The reason for 1 eV being 1.602... > > 10^-19 J only reflects, that changing the potential of a charge e > > about 1 V means an energy change of 1.602... 10^-19 J. > > > > Thats what I wanted to say. > > > > Cheers, Heinz On Thursday, December 20, 2012 10:36:21 AM UTC-7, Heinz Stege wrote: > On Thu, 20 Dec 2012 06:24:31 -0800 (PST), wlandsman wrote: > > > >> I wonder if the constants should be !DtoR and !RtoD (or RADEG and DEGRA) to correct the earlier inconsistency in the ancient history of IDL. I'm not sure about this, though. --Wayne > >> > > A lot of discussions for a little thing, that everyone can do her or > > himself within a startup file. > > > > However, I think Wayne is absolutly right. > > > > A similar point is, that I wouldn't name the elementary charge "eV". I > > know, there is a name conflict with the Euler's number. However the > > Euler's number can simply be calculated by number=exp(1d). Therfore I > > suggest to simply remove it from the table. > > > > Please realize, that most of the "constants" are from physics and > > chemistry and the Euler's number is a mathematical number which never > > will change. (You may argue, that pi also is a mathematical constant, > > however it is needed [even though by definition] for the calculation > > of the magnetic constant mu0=4d*!dpi*1d-7) > > > > The name "ev" for the elementary charge is confusing, because the > > definition of the elementary charge constant has nothing to do with > > the energy unit "electron volt". The reason for 1 eV being 1.602... > > 10^-19 J only reflects, that changing the potential of a charge e > > about 1 V means an energy change of 1.602... 10^-19 J. > > > > Thats what I wanted to say. > > > > Cheers, Heinz Hi Heinz, That's a really good point. I had the same dilemma about "eV" when I put it in. I like your idea of getting rid of "e". Also, yes, I'll make the "DtoR" and "RtoD" consistent. Maybe "DegRad" and "RadDeg", so at least they are somewhat human-readable? -Chris
Hello, On 12/20/12 14:10, Chris Torrence wrote: > On Thursday, December 20, 2012 10:36:21 AM UTC-7, Heinz Stege wrote: > > Hi Heinz, > > That's a really good point. I had the same dilemma about "eV" when I > put it in. I like your idea of getting rid of "e". For what it's worth, I agree with Heinz. But for a (slightly) different reason. The symbol for elementary charge on the NIST site is "e". Thus that should be what is used in !C. Consistent adherence to a convention (in this case: all this stuff comes from the NIST/CODATA site) is A Good Thing (tm). > Also, yes, I'll make the "DtoR" and "RtoD" consistent. Maybe "DegRad" > and "RadDeg", so at least they are somewhat human-readable? I prefer the former to the latter simply because of the preposition "to" indicating a direction of conversion. I've never been a big fan of making constant names short because people want to save some keystrokes. In fact, that violates most advice/conventions on naming in the usual texts ("Code Complete", "Clean Code", etc etc) I'm a verbose sort so the following is what I use: REAL(fp), PARAMETER :: PI = 3.141592653589793238462643383279_fp REAL(fp), PARAMETER :: TWOPI = TWO * PI REAL(fp), PARAMETER :: DEGREES_TO_RADIANS = PI / 180.0_fp REAL(fp), PARAMETER :: RADIANS_TO_DEGREES = 180.0_fp / PI (I have similar in IDL code so I'm sure of the precision) So if it's human readability you want, why not DEGREES_TO_RADIANS and RADIANS_TO_DEGREES? I realise just about everyone will disagree with me. And that's o.k. :o) cheers, paulv
Paul van Delst writes: > So if it's human readability you want, why not DEGREES_TO_RADIANS and > RADIANS_TO_DEGREES? > > I realise just about everyone will disagree with me. Not everyone! I'm a BIG fan of yours! ;-) Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
On 12/18/12 5:34 PM, Chris Torrence wrote: > Hi all, > > I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. > > Name Description Value > alpha Fine structure constant 7.2973525698 x 10-3 > c Speed of light in a vacuum 299792458 m/s > e Euler's number 2.7182818284590452 > ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C > eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m > F Faraday constant NAe 96485.3365 C/mol > G Gravitation constant 6.67384 x 10-11 m3/kg/s2 > gn Earth standard gravity 9.80665 m/s2 > h Planck constant 6.62606957 x 10-34 J s > hbar h/(2pi) 1.054571726 x 10-34 J s > k Boltzmann constant R/NA 1.3806488 x 10-23 J/K > me electron mass 9.10938291 x 10-31 kg > mn neutron mass 1.674927351 x 10-27 kg > mp proton mass 1.672621777 x 10-27 kg > mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 > Na Avogadro constant NA 6.02214129e23 mol-1 > phi golden ratio 1.6180339887498948 > pi Pi 3.1415926535897932 > R molar gas constant 8.3144621 J/mol/K > R_earth Earth radius (spherical) 6370997.0 m > re classical electron radius 2.8179403267 x 10-15 m > rydberg Rydberg constant Rinf 10973731.568539 m-1 > sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 > u unified atomic mass unit 1.660538921 x 10-27 kg > > Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. > > Thanks! > > -Chris > ExelisVis > p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed. > Just checking against astroconst (good lord, is it really over 10 years since I updated the public version?????), all of the ones that aren't there or haven't already been mentioned are probably too astronomy-specific. I would much prefer !CONST over !C. I just grepped my code directories and found one case of !C in there, from my first 2 months of using IDL. Think of how many cases of () subscripts you see from time to time, and take pity on people who have code still around from before they learned to be half-decent IDL programmers! -Jeremy.
Den tisdagen den 18:e december 2012 kl. 23:34:53 UTC+1 skrev Chris Torrence: > Hi all, > > > > I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. > > > > Name Description Value > > alpha Fine structure constant 7.2973525698 x 10-3 > > c Speed of light in a vacuum 299792458 m/s > > e Euler's number 2.7182818284590452 > > ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C > > eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m > > F Faraday constant NAe 96485.3365 C/mol > > G Gravitation constant 6.67384 x 10-11 m3/kg/s2 > > gn Earth standard gravity 9.80665 m/s2 > > h Planck constant 6.62606957 x 10-34 J s > > hbar h/(2pi) 1.054571726 x 10-34 J s > > k Boltzmann constant R/NA 1.3806488 x 10-23 J/K > > me electron mass 9.10938291 x 10-31 kg > > mn neutron mass 1.674927351 x 10-27 kg > > mp proton mass 1.672621777 x 10-27 kg > > mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 > > Na Avogadro constant NA 6.02214129e23 mol-1 > > phi golden ratio 1.6180339887498948 > > pi Pi 3.1415926535897932 > > R molar gas constant 8.3144621 J/mol/K > > R_earth Earth radius (spherical) 6370997.0 m > > re classical electron radius 2.8179403267 x 10-15 m > > rydberg Rydberg constant Rinf 10973731.568539 m-1 > > sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 > > u unified atomic mass unit 1.660538921 x 10-27 kg > > > > Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. > > > > Thanks! > > > > -Chris > > ExelisVis > > p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed. I suggest !const.xmase=1224 and !const.xmasd=1225.
Here are some more (excluding the ones already in your list, and excluding some -- like Bode's distances -- which are clearly only of specialized interest) that I have found to be useful from time to time (I have been collecting them in http://hea-www.harvard.edu/PINTofALE/pro/util/inicon.pro ). Some of these are probably too esoteric still (e.g., not many people want to convert from Angstrom to keV), but who knows. ESU 4.8030000e-10 electron charge [ESU] KB 1.3806620e-16 Boltzmann's constant [erg/K] A 7.5656559e-15 Radiation Pressure constant [erg/cm^3/deg^4] WEIN 0.28978000 Wein Displacement Law constant [cm K] ATM 1013250.0 1 Atmosphere [dynes/cm^2] KEVANG 12.398521 keV*Ang (1e8*h*c/(e*1e10)) EVWAV 0.00012379700 1 eV in wave numbers [/cm] DEGEV 8.6173468e-05 1 deg K in eV [eV] (K*degev/1e3->keV) JOULEV 1.6021892e-19 1 eV in Joule = Coulomb*meter [J] ERGEV 1.6021892e-12 1 eV in ergs [erg] THOMPSON 6.65246e-25 Thompson cross-section for electron [cm^2] COMPTON 0.024263026 Compton wavelength for electron, h/mc [Angstrom] RADIAN 206264.81 1 radian [arcsec] ARCSR 2.3504431e-11 1 arcsec^2 in steradians [sr] PI 3.14159265358979323846 PI to 20 decimals GAMMA 0.57721566 Euler's constant, gamma RYD 13.577755 Rydberg Constant for H [eV] RBOHR 5.2922910e-09 Bohr Radius [cm] DAY 86636.6 mean solar day [sec] YEAR 31643326. Equinoctial Year [sec] YR 31644553. Sidereal Year [sec] PC 3.0926963e+18 1 parsec [cm] LY 9.4867984e+17 1 Light Year [cm] AU 1.4959787e+13 Astronomical Unit [cm] MSUN 1.9890000e+33 Mass of Sun [gm] LSUN 3.8260000e+33 Luminosity of Sun [erg/s] RSUN 6.96900e+10 Radius of Sun [cm] TSUN 5770.00 Effective Temperature of Sun [K] PSUN 25.3800 Rotational period of Sun [day] MJUP 1.8986000e+30 Mass of Jupiter [gm] RJUP 6.99110e+09 volumetric radius of Jupiter at 1 bar [cm] MGEO 5.9720000e+27 Mass of Earth [gm] MMOON 7.3429237e+25 Mass of Moon [gm] RMOON 1737.90 Radius of Moon [km] DMOON 384404. mean distance of Moon from Earth [km] Cheers, VLK On Tuesday, December 18, 2012 5:34:53 PM UTC-5, Chris Torrence wrote: > Hi all, > > > > I'm adding a new system variable to IDL, called !CONST. So far, it's an IDL structure containing the following physical constants, in MKS units. All of these values (except for !const.pi, .e, .phi, and .R_earth) are taken from the "2010 CODATA Recommended Values," from NIST. > > > > Name Description Value > > alpha Fine structure constant 7.2973525698 x 10-3 > > c Speed of light in a vacuum 299792458 m/s > > e Euler's number 2.7182818284590452 > > ev elementary charge e, 1 electron volt 1.602176565 x 10-19 C > > eps0 electric vacuum permittivity 8.854187817 x 10-12 F/m > > F Faraday constant NAe 96485.3365 C/mol > > G Gravitation constant 6.67384 x 10-11 m3/kg/s2 > > gn Earth standard gravity 9.80665 m/s2 > > h Planck constant 6.62606957 x 10-34 J s > > hbar h/(2pi) 1.054571726 x 10-34 J s > > k Boltzmann constant R/NA 1.3806488 x 10-23 J/K > > me electron mass 9.10938291 x 10-31 kg > > mn neutron mass 1.674927351 x 10-27 kg > > mp proton mass 1.672621777 x 10-27 kg > > mu0 magnetic vacuum permeability 12.566370614 x 10-7 N/A2 > > Na Avogadro constant NA 6.02214129e23 mol-1 > > phi golden ratio 1.6180339887498948 > > pi Pi 3.1415926535897932 > > R molar gas constant 8.3144621 J/mol/K > > R_earth Earth radius (spherical) 6370997.0 m > > re classical electron radius 2.8179403267 x 10-15 m > > rydberg Rydberg constant Rinf 10973731.568539 m-1 > > sigma Stefan-Boltzmann constant 5.670373 x 10-8 W/m2/K4 > > u unified atomic mass unit 1.660538921 x 10-27 kg > > > > Here's my question: What am I missing? Are there any physical constants that most people would find useful for their day-to-day work. The key is "most" people - nothing too esoteric, or limited to a single scientific discipline, etc. > > > > Thanks! > > > > -Chris > > ExelisVis > > p.s. please limit your comments to !CONST. Our new widget system team is currently hard at work in a secret underground bunker, and cannot be disturbed.