Skip to content

Commit ffc53ca

Browse files
committed
Addresses review comments
1 parent ad2ac56 commit ffc53ca

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.github/workflows/run_ruff.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ jobs:
88
steps:
99
- uses: actions/checkout@v4
1010
- uses: astral-sh/ruff-action@v3
11-
with:
12-
version: "0.12.x"
1311
- run: ruff format --check
1412

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ mark-parentheses = false
3838
[tool.ruff.lint.pydocstyle]
3939
convention = "numpy"
4040

41-
41+
[tool.ruff.lint.isort]
42+
known-first-party = ["ratapi.rat_core"]

ratapi/examples/normal_reflectivity/custom_XY_DSPC.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""A custom XY model for a supported DSPC bilayer."""
22

3+
from math import sqrt
4+
35
import numpy as np
46
from scipy.special import erf
57

@@ -128,12 +130,9 @@ def layer(z, prevLaySurf, thickness, height, Sigma_L, Sigma_R):
128130
right = prevLaySurf + thickness
129131

130132
# Make our heaviside
131-
a = (z - left) / ((2**0.5) * Sigma_L)
132-
b = (z - right) / ((2**0.5) * Sigma_R)
133-
134-
erf_a = erf(a)
135-
erf_b = erf(b)
133+
erf_left = erf((z - left) / (sqrt(2) * Sigma_L))
134+
erf_right = erf((z - right) / (sqrt(2) * Sigma_R))
136135

137-
VF = np.array((height / 2) * (erf_a - erf_b))
136+
VF = np.array((0.5 * height) * (erf_left - erf_right))
138137

139138
return VF, right

ratapi/utils/plotting.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,9 @@ def plot_corner(
677677
hist2d_kwargs : dict
678678
Extra keyword arguments to pass to the 2d histograms.
679679
Default is {'density': True, 'bins': 25}
680+
progress_callback: Union[Callable[[int, int], None], None]
681+
Callback function for providing progress during plot creation
682+
First argument is current completed sub plot and second is total number of sub plots
680683
681684
Returns
682685
-------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BuildExt(build_ext):
6161
"""A custom build extension for adding compiler-specific options."""
6262

6363
c_opts = {
64-
"msvc": ["/O3", "/EHsc", "/openmp"],
64+
"msvc": ["/O2", "/EHsc", "/openmp"],
6565
"unix": ["-O2", "-fopenmp", "-std=c++11"],
6666
}
6767
l_opts = {

0 commit comments

Comments
 (0)