Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Add invcm2J in convert script
Browse files Browse the repository at this point in the history
  • Loading branch information
Nidin committed Sep 21, 2022
1 parent 483ce33 commit 1dbbc47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmistark/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def J2invcm(val):
"""Joule -> cm^{-1}"""
return val / scipy.constants.Planck / scipy.constants.speed_of_light / 100

def invcm2J(val):
"""cm{-1} -> Joule"""
return val * scipy.constants.Planck * scipy.constants.speed_of_light * 100


def kV_cm2V_m(val):
"""kV/cm -> V/m"""
Expand All @@ -65,3 +69,5 @@ def kV_cm2V_m(val):
def V_m2kV_cm(val):
"""V/m -> kV/cm"""
return np.array(val) * 1e-5


0 comments on commit 1dbbc47

Please sign in to comment.