forked from RascalSoftware/python-RAT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalloy_domains.py
More file actions
31 lines (25 loc) · 932 Bytes
/
alloy_domains.py
File metadata and controls
31 lines (25 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Custom model file for the domains custom layers example."""
def alloy_domains(params, bulkIn, bulkOut, contrast, domain):
"""Calculate custom model layers for a permalloy/gold model with domains.
Simple custom model for testing incoherent summing.
Simple two layer of permalloy / gold, with up/down domains.
"""
# Split up the parameters
subRough = params[0]
alloyThick = params[1]
alloySLDup = params[2]
alloySLDdn = params[3]
alloyRough = params[4]
goldThick = params[5]
goldSLD = params[6]
goldRough = params[7]
# Make the layers
alloyUp = [alloyThick, alloySLDup, alloyRough]
alloyDn = [alloyThick, alloySLDdn, alloyRough]
gold = [goldThick, goldSLD, goldRough]
# Make the model depending on which domain we are looking at
if domain == 0:
output = [alloyUp, gold]
else:
output = [alloyDn, gold]
return output, subRough