-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kitt
committed
Sep 4, 2024
1 parent
902f7d3
commit 9cdf141
Showing
9 changed files
with
263 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us find and fix bugs. | ||
title: '' | ||
labels: bug | ||
|
||
--- | ||
|
||
I am submitting a **bug report**. | ||
|
||
**This bug occurs in:** | ||
make / realizeCascades / CI / specific file / etc. | ||
|
||
**Expected behavior:** | ||
____ should ____. | ||
|
||
**Current behavior:** | ||
____ instead does ____. | ||
|
||
**Steps to reproduce:** | ||
1. Do thing | ||
2. Do thing | ||
3. Result | ||
|
||
**Other Information:** | ||
Anything else you want to say. | ||
|
||
**Relevant Output:** | ||
Provide a log file, text from terminal, "No output", etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Documentation issue | ||
about: Point out issues with documentation. | ||
title: '' | ||
labels: documentation | ||
|
||
--- | ||
|
||
I am submitting a **documentation issue**. | ||
|
||
**The file(s) in question is/are:** | ||
README.md / CONTRIBUTING.md / LICENSE / etc. | ||
|
||
**The problem is in the following category/categories:** | ||
Clarity / Examples / Broken links and images / Typos, spelling, and grammar / Undocumented Information / Out-of-date / Other | ||
|
||
**Description of the problem:** | ||
Describe whatever is wrong with the documentation or could otherwise be improved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for improving or expanding this project. | ||
title: '' | ||
labels: enhancement | ||
|
||
--- | ||
|
||
I am submitting a **feature request**. | ||
|
||
**The feature I am requesting is for:** | ||
make / realizeCascades / CI / specific file / Something new / etc. | ||
|
||
**I am requesting:** | ||
A completely new feature / An improvement on an existing feature / etc. | ||
|
||
**Ideas for implementation:** | ||
(Optional) | ||
|
||
**Other Information:** | ||
Anything else you want to say. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Template | ||
The following template is not required, but if you do not use it, please include the following information in some other way. | ||
|
||
**Does your pull request resolve or partially resolve an issue?** | ||
- [ ] Yes; it fully resolves #(issue number). | ||
- [ ] Yes; it partially resolves #(issue number). | ||
- [ ] No, it does not resolve an issue fully or partially. | ||
|
||
**This pull request implements:** | ||
- [ ] Code improvements | ||
- [ ] Breaking changes (please describe any breaking changes below) | ||
|
||
**Testing:** | ||
This pull request: | ||
- [ ] Alters the existing CI in some way. | ||
- [ ] Adds a new step to the CI. | ||
- [ ] Does not introduce any features that the CI could not already test. | ||
- [ ] Is not accompanied by necessary CI changes due to some limitation described below. (Please also describe how new features can be manually tested.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: pip install test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: print versions | ||
run: | | ||
python --version | ||
pip --version | ||
- name: local install | ||
run: pip install . | ||
- name: local upgrade | ||
run: pip install --upgrade . | ||
- name: local uninstall | ||
run: pip uninstall -y eVee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: create wheel artifact | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: create artifact | ||
run: python setup.py bdist_wheel | ||
- name: save artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel-module | ||
path: dist/eVee-*-py3-none-any.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
# eVee | ||
A small package for yield models. | ||
|
||
Or: eV<sub>ee</sub> (electron-equivalent electron volts) | ||
|
||
A small package for yield models. | ||
Currently includes the following models: | ||
* Lindhard | ||
|
||
## VERSION HISTORY | ||
|
||
(pending) 04.09.2024: Pre-release of [v0.1](https://github.com/villano-lab/eVee/releases/tag/v0.1) | ||
|
||
## AUTHORS AND CONTACT | ||
|
||
The original and primary author of eVee is A.N. Villano. | ||
This repository is currently maintained by Kitty C. Mickelson. | ||
For questions, support, bug reports, or other suggestions, please open an [issue](https://github.com/villano-lab/eVee/issues). | ||
|
||
# LICENSE | ||
|
||
This work is licensed under the MIT License. | ||
See the [LICENSE file](https://github.com/villano-lab/eVee/tree/master/LICENSE) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#this file gives some functions for computation of Lindhard function | ||
import numpy as np | ||
|
||
#get the equivalent charge energy for a recoil of energy E with parameters in the structure par | ||
#def getLindhard(E,par=None): | ||
def getLindhard(par=None,calck=False): | ||
#units of E should be eV | ||
|
||
#if E==None: | ||
# raise ArgumentTypeError('getLindhard: you need an E variable') | ||
|
||
#check that par is right | ||
if not calck: | ||
if not set({'Z', 'k', 'a', 'b', 'c', 'd'}).issubset(par): | ||
raise ArgumentTypeError('getLindhard: one or more parameters (Z,k,a,b,c,d) missing') | ||
else: | ||
if not set({'Z', 'A', 'a', 'b', 'c', 'd'}).issubset(par): | ||
raise ArgumentTypeError('getLindhard: one or more parameters (Z,A,a,b,c,d) missing, set to calculate k by pure Lindhard') | ||
|
||
|
||
#par is a dictionary with Z, A, k, a, b, c, d defined as doubles | ||
#see pg. 89 of Scott Fallows' thesis | ||
#eps = 11.5 ER[keV] Z**(-(7/3)) | ||
#g(eps) = a(eps)**b + c(eps)**d + (eps) | ||
Z = par['Z'] | ||
k = 0.0 | ||
A = 0.0 | ||
if calck: | ||
A = par['A'] | ||
k = 0.133*Z**(2.0/3.0)*A**(-(1.0/2.0)) | ||
else: | ||
k = par['k'] | ||
a = par['a'] | ||
b = par['b'] | ||
c = par['c'] | ||
d = par['d'] | ||
#Ekev = E/1000.0 | ||
#eps = 11.5*Ekev*Z**(-(7.0/3.0)) | ||
eps = lambda x: 11.5*(x/1000.0)*Z**(-(7.0/3.0)) | ||
#g = a*eps**b + c*eps**d + eps | ||
g = lambda x: a*eps(x)**b + c*eps(x)**d + eps(x) | ||
|
||
#return k*g/(1+k*g) | ||
return lambda x: k*g(x)/(1+k*g(x)) | ||
#function to get par lists for various materials | ||
def getLindhardPars(mat='Ge',calck = False): | ||
|
||
#check that the material is supported | ||
if mat not in set({'Ge', 'Si'}): | ||
raise ArgumentTypeError('getLindhardPars: do not have requested material use (Ge,Si)') | ||
|
||
par = {} | ||
if mat=='Ge': | ||
par['Z'] = 32 | ||
par['A'] = 73 | ||
if not calck: | ||
par['k'] = 0.159 | ||
else: | ||
par['k'] = 0.133*par['Z']**(2.0/3.0)*par['A']**(-(1.0/2.0)) | ||
par['a'] = 3.0 | ||
par['b'] = 0.15 | ||
par['c'] = 0.7 | ||
par['d'] = 0.6 | ||
elif mat=='Si': | ||
par['Z'] = 14 | ||
par['A'] = 28 | ||
if not calck: | ||
par['k'] = 0.146 #not sure of this variable, essentially same as calc value | ||
else: | ||
par['k'] = 0.133*par['Z']**(2.0/3.0)*par['A']**(-(1.0/2.0)) | ||
par['a'] = 3.0 | ||
par['b'] = 0.15 | ||
par['c'] = 0.7 | ||
par['d'] = 0.6 | ||
|
||
return par | ||
#shortened function for Ge Lindhard | ||
def getLindhardGe(calck=False): | ||
|
||
pars = getLindhardPars('Ge',calck) | ||
return getLindhard(pars) #only have to specify calck in one place | ||
#shortened function for Ge Lindhard varying k only | ||
def getLindhardGe_k(k): | ||
|
||
pars = getLindhardPars('Ge',False) | ||
pars['k'] = k | ||
return getLindhard(pars) #default of calck is false | ||
#shortened function for Si Lindhard | ||
def getLindhardSi(calck=False): | ||
|
||
pars = getLindhardPars('Si',calck) | ||
return getLindhard(pars) #only have to specify calck in one place | ||
#shortened function for Si Lindhard varying k only | ||
def getLindhardSi_k(k): | ||
|
||
pars = getLindhardPars('Si',False) | ||
pars['k'] = k | ||
return getLindhard(pars) #default of calck is false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from setuptools import setup | ||
|
||
setup( | ||
name = 'eVee', | ||
version = '0.1', | ||
description = 'A package for yield models', | ||
url = 'https://github.com/villano-lab/eVee', | ||
author = 'A.N. Villano; Kitty C. Mickelson', | ||
author_email = 'kathryn.harris@ucdenver.edu', | ||
license = 'MIT', | ||
packages = ['lindhard'], | ||
install_requires = [], | ||
classifiers = [ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: Microsoft :: Windows', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
], | ||
) |