# Source

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65``` ```ipython-physics --------------- This is an extension for IPython 0.11+ that at the moment mainly enables easy input of physical quantities (i.e. numbers with units). Quick usage examples: In: 1 m // cm # convert between units Out: 100 cm # (syntax inspired by Mathematica) In: (1 m)/(1 s) # sugar for inline quantity input Out: 1 m/s # in arbitrary expressions In: Quantity('1 m')/Qantity('1 s') # this is the desugared form Out: 1 m/s In: // furlong/fortnight # convert units in last result Out: 6012.8848 furlong/fortnight In: alpha = 90 deg # more sugar for assignment: no # parentheses needed In: sin(alpha) # angle units work with NumPy Out: 1.0 # trigonometric functions In: %tbl sqrt(?x**2 + ?y**2) // cm # quickly tabulate a formula: x = 1 m # provide some values y = 2 m Out: 223.6068 cm # and get the result x = 3 m # ... this continues as long as you y = 4 m # enter new values Out: 500 cm In: c0 # important physical constants Out: 2.9979246e+08 m/s In: setprec(4) # set the display precision In: c0 Out: 2.998e+08 m/s The predefined constants are: pi e c0 -- vacuum speed of light mu0 -- magnetic constant eps0 -- electric constant Grav -- Newton's constant hpl -- Planck's constant hbar -- Planck's constant / 2pi e0 -- elementary charge me -- electron mass mp -- proton mass mn -- neutron mass NA -- Avogadro's number kb -- Boltzmann constant g0 -- Standard earth gravity R -- Universal gas constant alpha -- fine structure constant Ry -- Rydberg constant mu_n -- Magnetic moment of the neutron gamma -- Gyromagnetic ratio of the neutron h0 -- dimensionless Hubble parameter Please let me know if anything is missing. ```
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.