nikolasibalic / ARC-Alkali-Rydberg-Calculator

Object-oriented Python library for computation of properties of highly-excited Rydbeg states of alkali and divalent atoms.
https://atomcalc.org
BSD 3-Clause "New" or "Revised" License
90 stars 78 forks source link

energy unit options in figures #65

Closed petermao closed 3 years ago

petermao commented 3 years ago

on my own copy (installed via pip), I tweaked LevelPlot's and StarkMap's plotting routines to plot in 'GHz', '1/cm' or 'eV'. I wanted to be able to see those figures in the same units.

If desired, I can contribute it to you code via a branch or fork. The mods to your code were pretty minor.

nikolasibalic commented 3 years ago

Hello @petermao . That is very useful addition. I opened branch energyunits to which you can submit a pull request. I will do just a quick review and merge with master then. Many thanks for taking time to contribute!

petermao commented 3 years ago

Hi @nikolasibalic, I need permission to push to that branch.

In case my comments were insufficient, 'eV' and 'GHz' are specified by those strings, without case-sensitivity. for 1/cm, I just check that 'cm' is in the units string (also not case sensitive). The Y-axis label for energy is hard-coded after unit-type detection.

nikolasibalic commented 3 years ago

@petermao Access for direct commit to that branch should work now, I sent invitation. Alternatively you can also submit a pull request to that branch.

petermao commented 3 years ago

pushed! I didn't realize I could make a pull request from a local branch.

nikolasibalic commented 3 years ago

Many thanks! It looks great. I will add to main branch and release new version with the updates later today.

petermao commented 3 years ago

@nikolasibalic: I'm glad to be of help. It's a great package you've put together here.

btw -- the python notebooks will crash in some places. they'll need global replace of "units=2" with "units='ghz'" at a minimum.

nikolasibalic commented 3 years ago

This implementation is available now via pip as version 3.0.12.