Merged
Conversation
Collaborator
|
"this PR means there is no need to add the check to makeSLDProfile that we discussed this morning" - okay thanks.
A
…________________________________
From: Paul Sharp ***@***.***>
Sent: Monday, September 29, 2025 9:13 PM
To: RascalSoftware/RAT ***@***.***>
Cc: Hughes, Arwel (STFC,RAL,ISIS) ***@***.***>; Mention ***@***.***>
Subject: [RascalSoftware/RAT] Fixes empty layers bug (PR #424)
This PR fixes the bug that occurs where a contract containing no layers is viewed as a single layer of zero thickness. This was introduced in the routine groupLayersMod, where it was necessary to ensure outputLayers was defined on all branches of the if statement. By replacing the line of zeros with an appropriately sized empty array, we retain all code functionality, ensuring the following routines, applyHydration and makeSLDProfile, behave as expected when there are no layers. I have also confirmed that the plot looks as we expect with this change.
@arwelHughes<https://github.com/arwelHughes> this PR means there is no need to add the check to makeSLDProfile that we discussed this morning.
________________________________
You can view, comment on, or merge this pull request online at:
#424
Commit Summary
* 7f4cf53<7f4cf53> Fixes empty layers bug
File Changes
(1 file<https://github.com/RascalSoftware/RAT/pull/424/files>)
* M targetFunctions/common/groupLayers/groupLayersMod.m<https://github.com/RascalSoftware/RAT/pull/424/files#diff-0575e52b85ee59718baf6610db5e14712106311b95d01afeda14a0892bc00b98> (2)
Patch Links:
* https://github.com/RascalSoftware/RAT/pull/424.patch
* https://github.com/RascalSoftware/RAT/pull/424.diff
—
Reply to this email directly, view it on GitHub<#424>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGMNVXW5TZY5YRFOK442M2L3VGHIDAVCNFSM6AAAAACH2NTK22VHI2DSMVQWIX3LMV43ASLTON2WKOZTGQ3DMNBWGU2TGOA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
StephenNneji
approved these changes
Sep 30, 2025
Collaborator
StephenNneji
left a comment
There was a problem hiding this comment.
look good, thanks for the simple fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #419
This PR fixes the bug that occurs where a contract containing no layers is viewed as a single layer of zero thickness. This was introduced in the routine
groupLayersMod, where it was necessary to ensureoutputLayerswas defined on all branches of the if statement. By replacing the line of zeros with an appropriately sized empty array, we retain all code functionality, ensuring the following routines,applyHydrationandmakeSLDProfile, behave as expected when there are no layers. I have also confirmed that the plot looks as we expect with this change.@arwelHughes this PR means there is no need to add the check to
makeSLDProfilethat we discussed this morning.