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

Gradient layer #71

Merged
merged 15 commits into from
Feb 1, 2024
Merged

Gradient layer #71

merged 15 commits into from
Feb 1, 2024

Conversation

andped10
Copy link
Collaborator

Added gradient layer

Makes a discrete stack of layers where the sld and isld are a lineary interpolation between the initial and final material types.

The thickness of the gradient layer is given by the thickness of layer 0 multiplied by the number of layers

  • Constraints are use to ensure that all layers in the stack is the same as layer 0

MultiLayer

  • changed to be possible to pass type to constructor
  • only one argument per line

pyproject.toml

  • added isort to ensure our imports are sorted and that there only is one import per line.

@andped10 andped10 requested review from arm61 and rozyczko January 22, 2024 14:06
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (e759eff) 97.86% compared to head (d5ec71a) 97.90%.
Report is 17 commits behind head on develop.

❗ Current head d5ec71a differs from pull request most recent head aa35481. Consider uploading reports for the commit aa35481 to get more accurate results

Files Patch % Lines
tests/sample/items/test_gradient_layer.py 97.54% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #71      +/-   ##
===========================================
+ Coverage    97.86%   97.90%   +0.03%     
===========================================
  Files           41       43       +2     
  Lines         3050     3248     +198     
===========================================
+ Hits          2985     3180     +195     
- Misses          65       68       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andped10 andped10 linked an issue Jan 30, 2024 that may be closed by this pull request
Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

Very well written code and exhaustive unit tests.
Minor, optional, issues raised.

EasyReflectometry/sample/items/gradient_layer.py Outdated Show resolved Hide resolved
EasyReflectometry/sample/items/gradient_layer.py Outdated Show resolved Hide resolved
tests/sample/items/test_gradient_layer.py Show resolved Hide resolved
@andped10 andped10 merged commit 4adab93 into develop Feb 1, 2024
23 checks passed
@andped10 andped10 deleted the gradient-layer branch February 1, 2024 14:41
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.

Add a material gradient item type
2 participants