Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
Expand Down
23 changes: 23 additions & 0 deletions hack/add_de_Broglie_wavelength.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 14 11:19:59 2022

@author: xuans
"""

import numpy as np

import astropy.units as u

from astropy.constants.si import k_B, h, m_e

from plasmapy.utils.decorators import validate_quantities

@validate_quantities(
T_e={'can_be_negative': False, 'equivalencies': u.temperature_energy()}
)
def de_Broglie_wavelength(T_e: u.K) -> u.m:
constants = np.sqrt(h**2 / (2 * np.pi * m_e * k_B))
return constants * 1/np.sqrt(T_e)

lambda_e = de_Broglie_wavelength