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

hgrecco / pint / 1149
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 22 Jul 2019 07:59PM 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
1149

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 1149.1 (UNCERTAINTIES="N" PYTHON="3.3" NUMPY_VERSION=1.9.2 PANDAS=0) 22 Jul 2019 07:59PM UTC 0
85.67
Travis Job 1149.1
2 1149.2 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 07:59PM UTC 0
85.73
Travis Job 1149.2
3 1149.3 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 07:59PM UTC 0
85.73
Travis Job 1149.3
4 1149.4 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 07:59PM UTC 0
87.6
Travis Job 1149.4
5 1149.5 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 PANDAS=0) 22 Jul 2019 07:59PM UTC 0
85.73
Travis Job 1149.5
6 1149.6 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0) 22 Jul 2019 08:01PM UTC 0
77.04
Travis Job 1149.6
7 1149.7 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=0 PANDAS=0) 22 Jul 2019 08:01PM UTC 0
76.86
Travis Job 1149.7
8 1149.8 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:03PM UTC 0
85.67
Travis Job 1149.8
9 1149.9 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:01PM UTC 0
85.4
Travis Job 1149.9
10 1149.10 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:02PM UTC 0
87.27
Travis Job 1149.10
11 1149.11 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=0) 22 Jul 2019 08:03PM UTC 0
85.4
Travis Job 1149.11
Source Files on build 1149
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1149
  • 5ede9629 on github
  • Prev Build on staging (#1147)
  • Next Build on staging (#1151)
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