Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Woolam parser dev #98

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
STY: fix black issues
andyfaff committed Oct 3, 2024
commit ddcfd7d2a7d871ab3b8c36b2e62fb09a343ed8da
1 change: 1 addition & 0 deletions refellips/dataSE.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
A basic representation of a 1D dataset
"""

import copy
import numpy as np
import pandas as pd
from refnx._lib import possibly_open_file
7 changes: 2 additions & 5 deletions refellips/dispersion.py
Original file line number Diff line number Diff line change
@@ -562,9 +562,7 @@ def epsilon(self, energy):
+ Eg**2 * C**2
- Ei**2 * (Ei**2 + 3 * Eg**2)
)
a_atan = (energies**2 - Ei**2) * (
Ei**2 + Eg**2
) + Eg**2 * C**2
a_atan = (energies**2 - Ei**2) * (Ei**2 + Eg**2) + Eg**2 * C**2
alpha = np.sqrt(4 * Ei**2 - C**2)
gamma = np.sqrt(Ei**2 - C**2 / 2)
zeta4 = (energies**2 - gamma**2) ** 2 + 0.25 * alpha**2 * C**2
@@ -579,8 +577,7 @@ def epsilon(self, energy):
/ alpha
/ Ei
* np.log(
(Ei**2 + Eg**2 + alpha * Eg)
/ (Ei**2 + Eg**2 - alpha * Eg)
(Ei**2 + Eg**2 + alpha * Eg) / (Ei**2 + Eg**2 - alpha * Eg)
)
)
e1 -= (
3 changes: 2 additions & 1 deletion refellips/objectiveSE.py
Original file line number Diff line number Diff line change
@@ -379,8 +379,9 @@ def logl(self, pvals=None):
# here just set it to unity
y_err = 1
if self.lnsigma is not None:
_model = np.r_[psi, delta]
var_y = (
y_err * y_err + np.exp(2 * float(self.lnsigma)) * model * model
y_err * y_err + np.exp(2 * float(self.lnsigma)) * _model * _model
)
else:
var_y = y_err**2