Skip to content

Commit

Permalink
Addresses review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenNneji committed Oct 5, 2023
1 parent 4e23e09 commit c8e1d2c
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 27 deletions.
6 changes: 1 addition & 5 deletions examples/domains/customXY/customXyTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@
% Finally modify some of the other parameters to be more suitable values
% for a solid / liquid experiment.

% Set the scalefactor...
problem.setScalefactor(1,'Value',1,'min',0.5,'max',2,'fit',true);


% Set the bulk SLD
problem.setBulkIn(1,'name','Air','Value',0,'fit',false);

% and scalefactor...
problem.setScalefactor(1,'min',0.8,'Value',1,'max',1.1);
problem.setScalefactor(1,'min',0.8,'Value',1,'max',1.1,'fit',true);

% Add another bulk-out (and modify the first)
problem.setBulkOut(1,'name','Silicon','value',2.073e-6,'fit',false);
Expand Down
Binary file modified tests/domainsTFReflectivityCalculation/customLayersInputs.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/customLayersOutputs.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/customLayersTFParams.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/customXYInputs.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/customXYOutputs.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/customXYTFParams.mat
Binary file not shown.
4 changes: 0 additions & 4 deletions tests/domainsTFReflectivityCalculation/domainsCustomLayers.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
problem.setModelType('custom layers');
problem.setGeometry('substrate/liquid');

% Make some parameters...
params = {{'Alloy thick', 100, 150, 200, true}
{'Alloy SLD up', 9e-6, 11e-6, 13e-6, true}
{'Alloy SLD dn', 5e-6, 7e-6, 10e-6, true}
Expand All @@ -19,13 +18,10 @@

problem.addParameterGroup(params);

% Set the bulk SLD
problem.setBulkIn(1,'name','Silicon','Value',2.073e-6);

% Add the custom file...
problem.addCustomFile('Alloy domains','domainsAlloyModel.m','matlab',pwd);

% Make a contrast...
problem.addContrast('name', 'D2O Conrast', ...
'Data', 'Simulation',...
'Background', 'Background 1',...
Expand Down
19 changes: 4 additions & 15 deletions tests/domainsTFReflectivityCalculation/domainsCustomXY.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
problem.setModelType('custom XY');
problem.setGeometry('air/substrate');

% Make some parameters...
params = {{'Oxide thick', 10, 20, 50, true}
{'Layer thick', 150, 300, 500, true}
{'Layer SLD', 1e-6, 2e-6, 4e-6, true}
Expand All @@ -17,43 +16,33 @@

problem.setBacksPar(1,'name','Backs par D2O','fit',true,'min',1e-10,'max',1e-5,'val',1e-07);

% Add two new backs parameters for the other two..
problem.addBacksPar('Backs par SMW',1e-10,1e-7,1e-5,true);
problem.addBacksPar('Backs par H2O',1e-10,1e-7,1e-5,true);

% And add the two new constant backgrounds..
problem.addBackground('Background SMW','constant','Backs par SMW');
problem.addBackground('Background H2O','constant','Backs par H2O');

% And edit the other one....
problem.setBackground(1,'name','Background D2O', 'value1','Backs par D2O');

% Finally modify some of the other parameters to be more suitable values
% for a solid / liquid experiment.

% Set the scalefactor...
problem.setScalefactor(1,'Value',1,'min',0.5,'max',2,'fit',true);
problem.setScalefactor(1,'Value',1,'min',0.5,'max',2);


% Set the bulk SLD
problem.setBulkIn(1,'name','Air','Value',0,'fit',false);

% and scalefactor...
problem.setScalefactor(1,'min',0.8,'Value',1,'max',1.1);
problem.setScalefactor(1,'min',0.8,'Value',1,'max',1.1,'fit',true);

% Add another bulk-out (and modify the first)
problem.setBulkOut(1,'name','Silicon','value',2.073e-6,'fit',false);

% Add the custom file...
problem.addCustomFile('DSPC Model','domainsXYModel','matlab',pwd);

% Make a contrast
problem.addContrast('name','Test',...
'background','Background D2O',...
'resolution','Resolution 1',...
'scalefactor', 'Scalefactor 1',...
'nbs', 'silicon',... % This is bulk out ('Nb Subs')
'nba', 'Air',.... % This is bulk in ('Nb Air);
'nbs', 'silicon',...
'nba', 'Air',....
'domainRatio', 'Domain Ratio 1',...
'data', 'Simulation');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
function problem = domainsStandardLayers()

% Domains test...
problem = project(calcType="domains");

% Add some parameters....
Parameters = {
% Name min val max fit?
{'D1 thick', 5, 20, 60, true };
Expand All @@ -18,7 +16,6 @@

problem.addParameterGroup(Parameters);

% Make some layers.....
Layer1 = {'Domain1 Layer',... % Name of the layer
'D1 thick',... % Layer thickness
'D1 SLD',... % Layer SLD
Expand Down
Binary file modified tests/domainsTFReflectivityCalculation/standardLayersInputs.mat
Binary file not shown.
Binary file modified tests/domainsTFReflectivityCalculation/standardLayersOutputs.mat
Binary file not shown.
Binary file not shown.

0 comments on commit c8e1d2c

Please sign in to comment.