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

hgrecco / pint / 1150 / 4
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 22 Jul 2019 08:06PM UTC
Files 16
Run time 1s
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

22 Jul 2019 07:56PM UTC coverage: 87.602%. Remained the same
UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0

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>

2904 of 3315 relevant lines covered (87.6%)

0.88 hits per line

Source Files on job 1150.4 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1080
  • Travis Job 1150.4
  • 5ede9629 on github
  • Prev Job for UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0 on master (#1148.4)
  • Next Job for UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0 on master (#1152.4)
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