Skip to content

Conversation

@abuts
Copy link
Collaborator

@abuts abuts commented Aug 20, 2025

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • What is the current behaviour (You can also link to an open issue here)?
    Solves Re Make ORSO test use the full project stack #398. Current orso validation test validates abelsSingle function only.

  • What kind of change does this PR introduce, does this PR introduce a breaking change?
    The test re-implements orso valudation tests using full RAT workflow which incudes project creation, definition of project parameters and setting all appropriate properties.

  • Other information:

@abuts abuts requested a review from DrPaulSharp August 20, 2025 16:29
Copy link
Collaborator

@DrPaulSharp DrPaulSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There are a few small jobs, and I strongly recommend using complex sld values in the internal test as described, and in line with the original test.

% set up test data (used as reference data)
problem.addData([proj_name,' Data'], orso_info.Data);
% define theoretical contrast
problem.addContrast('name', [proj_name,' Data'],...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? How does the contract name come from the data? Note that the name is a fixed "ORSO Contrast" for each of the python tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so the name for the contrast is the same as that of the dataset. I think it'd be better to change to something else to remove any ambiguity.

Copy link
Collaborator Author

@abuts abuts Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed project name to ORSO contrast

else
controls.display = 'off';
end
[out_proj,results] = RAT(problem,controls);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of controls.display shouldn't make a difference for plotting - it's just for output to the console. This can be set to a preferred value in all circumstances - I'd recommend using "off"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was if you want to see plots you probably want to see a print-out. But I indeed have not used printouts for anything useful.

bulk_in = orso_info.BulkInSLD;
sld = orso_info.SLD_real;
bulk_out = orso_info.BulkOutSLD;
end
Copy link
Collaborator

@DrPaulSharp DrPaulSharp Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abelesSingle routine is designed to always have complex input for the sld array. Whilst I think using absorption as true or false accordingly is a good idea for the workflow test, I would rewrite this one to always use the complex sld values. This requires filling in empty SLD_img values with zeros, and regenerating the .mat file. The use_absorption check can reduce to use_absorption = any(orso_info.SLD_img>0);

Copy link
Collaborator Author

@abuts abuts Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didi it a bit differently but made input for abeles always complex.

@abuts abuts requested a review from DrPaulSharp August 22, 2025 13:45
Copy link
Collaborator

@DrPaulSharp DrPaulSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One quick job and we're there!


% run model simulation
controls = controlsClass();
controls.display = 'off';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the tab here please.

@abuts abuts merged commit 57d5202 into master Aug 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants