-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from pheuer/prms_edits
New features to support PRMs (new PR)
- Loading branch information
Showing
16 changed files
with
1,122 additions
and
449 deletions.
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
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,4 +1,5 @@ | ||
from cr39py.filtration.stack import Layer, Stack | ||
from cr39py.filtration.layer import Layer | ||
from cr39py.filtration.stack import Stack | ||
from cr39py.scan.base_scan import Scan | ||
from cr39py.scan.cut import Cut | ||
from cr39py.scan.subset import Subset |
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 @@ | ||
"""The `~cr39py.etch` module contains functionality relating to the process of etching CR-39.""" |
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,41 @@ | ||
"""The `~cr39py.etch.tools` module contains tools for calculating etch times.""" | ||
|
||
import numpy as np | ||
|
||
|
||
def goal_diameter(fluence, desired_F2=0.05, max_goal=10): | ||
"""Calculates the ideal track diameter in um to achieve a given overlap parameter F2. | ||
Parameters | ||
---------- | ||
fluence : float | ||
The fluence on the CR-39 in 1/cm^2 | ||
desired_F2 : float, optional | ||
The desired track overlap parameter F2. The default | ||
value is 0.05, meaning that ~5% of tracks will suffer overlap with | ||
a neighbor. | ||
max_goal : float, optional | ||
A maximum at which the goal track diameter will be clipped, in um. | ||
Prevents extremely large goal diameters being suggested at low fluences. | ||
Returns | ||
------- | ||
goal_diameter: float | ||
The goal track diameter in um. | ||
""" | ||
|
||
def chi(F2): | ||
""" | ||
Zylstra Eq. 9 inverted to solve for chi given F2 | ||
Works up to F2=0.375, then the sqrt becomes imaginary. | ||
""" | ||
return 3 / 4 * (1 - np.sqrt(1 - 8 / 3 * F2)) | ||
|
||
if desired_F2 > 0.3: | ||
raise ValueError(f"Model breaks down for F2~>0.3, provided F2={desired_F2}") | ||
|
||
goal_chi = chi(desired_F2) | ||
goal_d = np.sqrt(goal_chi / np.pi / (fluence * 1e-8)) | ||
return np.clip(goal_d, a_min=0, a_max=max_goal) |
Oops, something went wrong.