• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 1150
91%

Build:
DEFAULT BRANCH: master
Ran 22 Jul 2019 08:06PM UTC
Jobs 11
Files 16
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1150

push

travis-ci

bors[bot]
Merge #834

834: Atomic units for intensity and electric field r=hgrecco a=Schoyen

Thanks for a cool project!

When working with atomic systems subject to laser fields it is common to write the intensity of the laser fields in units of `W/cm^2`, but when doing numerical simulations the laser fields are almost always defined in atomic units. I've therefore added the atomic unit for the electric field and the atomic unit for intensity as defined in the book "Atoms in Intense Laser Fields" by Joachain et al. equations (1.1) and (1.2).

```python
>>> import pint
>>> ureg = pint.UnitRegistry()
>>> ureg.Quantity(1, ureg.a_u_electric_field)
<Quantity(1, 'atomic_unit_of_electric_field')>
>>> ureg.Quantity(1, ureg.a_u_electric_field).to(ureg.volt / ureg.cm)
<Quantity(5142206747.6231785, 'volt / centimeter')>
>>> ureg.Quantity(1, ureg.a_u_electric_field).to(ureg.volt / ureg.cm) / 1e9  # Should be ~ 5.1e9 V/cm
<Quantity(5.142206747623178, 'volt / centimeter')>
>>> ureg.Quantity(1, ureg.a_u_intensity)
<Quantity(1, 'atomic_unit_of_intensity')>
>>> ureg.Quantity(1, ureg.a_u_intensity).to(ureg.watt / ureg.cm ** 2)
<Quantity(3.5094455205664776e+16, 'watt / centimeter ** 2')>
>>> ureg.Quantity(1, ureg.a_u_intensity).to(ureg.watt / ureg.cm ** 2) / 1e16  # Should be ~ 3.5e16 W/cm^2
<Quantity(3.5094455205664774, 'watt / centimeter ** 2')>
```

I'd be happy to add tests for these quantities if this is requested, but I was a little unsure as to where they should go.

Co-authored-by: Øyvind Sigmundson Schøyen <oyvindschoyen@gmail.com>

2933 of 3315 relevant lines covered (88.48%)

9.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1150.1 (UNCERTAINTIES="N" PYTHON="3.3" NUMPY_VERSION=1.9.2 PANDAS=0) 22 Jul 2019 08:06PM UTC 0
85.67
Travis Job 1150.1
2 1150.2 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 08:06PM UTC 0
85.73
Travis Job 1150.2
3 1150.3 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 08:06PM UTC 0
85.73
Travis Job 1150.3
4 1150.4 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 08:06PM UTC 0
87.6
Travis Job 1150.4
5 1150.5 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 08:08PM UTC 0
85.73
Travis Job 1150.5
6 1150.6 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0) 22 Jul 2019 08:08PM UTC 0
77.04
Travis Job 1150.6
7 1150.7 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=0 PANDAS=0) 22 Jul 2019 08:08PM UTC 0
76.86
Travis Job 1150.7
8 1150.8 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:10PM UTC 0
85.67
Travis Job 1150.8
9 1150.9 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:08PM UTC 0
85.31
Travis Job 1150.9
10 1150.10 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:10PM UTC 0
87.27
Travis Job 1150.10
11 1150.11 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:11PM UTC 0
85.4
Travis Job 1150.11
Source Files on build 1150
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1150
  • 5ede9629 on github
  • Prev Build on master (#1148)
  • Next Build on master (#1152)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc