Skip to content
Merged
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
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include README.md
recursive-include cpp/RAT *
recursive-include cpp *
prune tests
prune */__pycache__
global-exclude .git
3 changes: 1 addition & 2 deletions RATapi/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ def plot_ref_sld_helper(
layers[-1, 1], # Bulk Out
data.subRoughs[i], # roughness
layer,
len(layer),
1.0,
1,
)

sld_plot.plot(
Expand Down
9 changes: 7 additions & 2 deletions RATapi/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ def handle(*args):
)
return np.array(output, "float").tolist()
else:
output, sub_rough = getattr(self.engine, self.function_name)(
matlab_args = [
np.array(args[0], "float"), # params
np.array(args[1], "float"), # bulk in
np.array(args[2], "float"), # bulk out
float(args[3] + 1), # contrast
float(-1 if len(args) < 5 else args[4] + 1), # domain
]
if len(args) > 4:
matlab_args.append(float(args[4] + 1)) # domain number

output, sub_rough = getattr(self.engine, self.function_name)(
*matlab_args,
nargout=2,
)
return np.array(output, "float").tolist(), float(sub_rough)
Expand Down
Loading