Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f624590
initial checkin
rozyczko Oct 15, 2025
f1f5947
ruff
rozyczko Oct 15, 2025
c7f9f76
don't loose experiment names on selection
rozyczko Oct 16, 2025
05f0eb2
remove debug printout. Add app icon
rozyczko Oct 17, 2025
0f59b90
multiple display for analysis as well
rozyczko Oct 23, 2025
eb94f1a
initial version of the complex constraint editor
rozyczko Oct 24, 2025
284ac90
initial impl
rozyczko Oct 25, 2025
eb40191
connect to backend
rozyczko Oct 26, 2025
b080b3f
improved model colour handling
rozyczko Oct 28, 2025
fc324d2
Added "Select All" checkbox for fit params
rozyczko Oct 29, 2025
971e51e
let's try unpinning pyside6
rozyczko Oct 31, 2025
8482049
reference correct ERL branch
rozyczko Oct 31, 2025
7b93e9a
separate experiment plots properly
rozyczko Oct 31, 2025
1f61445
staggered plots with checkbox control
rozyczko Oct 31, 2025
594152b
added staggering distance slider
rozyczko Nov 3, 2025
3b5a655
fix the validator. Add multi-model constraint UI
rozyczko Nov 3, 2025
d2daab4
notify the layers of the name change
rozyczko Nov 5, 2025
aacf1f5
Account for subphase and superphase constraints
rozyczko Nov 7, 2025
edec400
Move SLD underneath the main plot, as requested
rozyczko Nov 7, 2025
7654ffd
add splitters in Sample and Analysis
rozyczko Nov 7, 2025
87e9276
reload the models after orso file load
rozyczko Nov 12, 2025
f8ca2cb
use correct branch name
rozyczko Nov 12, 2025
ed01dd0
reparent ERL dependency.
rozyczko Nov 18, 2025
1b94972
reparent ERL
rozyczko Nov 24, 2025
9bafdcb
minor fixes after ERL update.
rozyczko Nov 28, 2025
74fe330
multiplotting in Analysis
rozyczko Dec 2, 2025
ca8aa53
Merge branch 'sample_file_load' into multiple_plots
rozyczko Dec 2, 2025
3cd81f3
Merge branch 'complex_constraints' into multiple_plots
rozyczko Dec 2, 2025
843aa84
fixes to multiple sample loads
rozyczko Dec 4, 2025
27ff62c
update ERL dependency
rozyczko Dec 5, 2025
944b89f
fix the SLD chart on the Analysis page
rozyczko Jan 5, 2026
6333926
initial version of multiple sample plots (profile + sld)
rozyczko Jan 9, 2026
859d750
fixed SLD display for added sample. Fixed tooltip display
rozyczko Jan 9, 2026
443f685
implement the chart buttons functionality
rozyczko Jan 9, 2026
c962ed1
allow reset on both sld and profile charts
rozyczko Jan 11, 2026
4e2f541
fixed layers property table enablement
rozyczko Jan 12, 2026
e09c793
added Fit status dialog
rozyczko Jan 12, 2026
25678ee
fixes for:
rozyczko Jan 12, 2026
540180e
show the content of the dependent params combobox
rozyczko Jan 13, 2026
6df6e08
added plot control subgroup with log q and reversed SLD x axis
rozyczko Jan 15, 2026
bedebcd
missed file
rozyczko Jan 16, 2026
bbd50da
more forgotten files
rozyczko Jan 16, 2026
f6bc5e7
added logic for single-click multi-model constraints
rozyczko Jan 18, 2026
21625c5
attempt at making layer names consistent
rozyczko Jan 22, 2026
aba180e
ruff check + format. Finally
rozyczko Jan 22, 2026
1a765fb
PR fixes. Set #1
rozyczko Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions EasyReflectometryApp/Backends/Mock/Analysis.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ QtObject {
readonly property string fittingStatus: ''//undefined //'Success'
readonly property bool isFitFinished: true
readonly property bool fittingRunning: false
property bool showFitResultsDialog: false
readonly property bool fitSuccess: true
readonly property string fitErrorMessage: ''
readonly property int fitNumRefinedParams: 3
readonly property real fitChi2: 1.2345

// Parameters
property int currentParameterIndex: 0
Expand Down Expand Up @@ -100,4 +105,8 @@ QtObject {
function fittingStartStop() {
console.debug('fittingStartStop')
}
function setShowFitResultsDialog(value) {
showFitResultsDialog = value
console.debug(`setShowFitResultsDialog ${value}`)
}
}
19 changes: 19 additions & 0 deletions EasyReflectometryApp/Backends/Mock/Plotting.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ QtObject {
property double analysisMinY: -40.
property double analysisMaxY: 40.

property int modelCount: 1

signal samplePageDataChanged()

function setQtChartsSerieRef(value1, value2, value3) {
console.debug(`setQtChartsSerieRef ${value1}, ${value2}, ${value3}`)
}
Expand All @@ -33,4 +37,19 @@ QtObject {
console.debug(`drawCalculatedOnSldChart`)
}

function getSampleDataPointsForModel(index) {
console.debug(`getSampleDataPointsForModel ${index}`)
return []
}

function getSldDataPointsForModel(index) {
console.debug(`getSldDataPointsForModel ${index}`)
return []
}

function getModelColor(index) {
console.debug(`getModelColor ${index}`)
return '#0000FF'
}

}
84 changes: 61 additions & 23 deletions EasyReflectometryApp/Backends/Mock/Sample.qml
Original file line number Diff line number Diff line change
Expand Up @@ -273,48 +273,86 @@ QtObject {
'parameter 2',
'parameter 3'
]
readonly property var relationOperators: ['=', '<', '>']
readonly property var relationOperators: [
{ value: '=', text: '=' },
{ value: '>', text: '≥' },
{ value: '<', text: '≤' }
]
readonly property var arithmicOperators: ['', '*', '/', '+', '-']
readonly property var constraintParametersMetadata: [
{ alias: 'parameter_1', displayName: 'parameter 1', independent: true },
{ alias: 'parameter_2', displayName: 'parameter 2', independent: true },
{ alias: 'parameter_3', displayName: 'parameter 3', independent: true }
]

// Mock constraints data - matches the new simplified format
// Mock constraints data - matches the structured format expected by the UI
property var constraintsList: [
{
dependentName: "Thickness Layer 1",
expression: "2.0 * parameter 2 + 1.5"
dependentName: 'Thickness Layer 1',
expression: 'parameter 2 * 0.5 + 1.5',
rawExpression: 'parameter_2 * 0.5 + 1.5',
relation: '=',
type: 'expression'
},
{
dependentName: "Roughness Layer 2",
expression: "parameter 1 / 3.14"
dependentName: 'Roughness Layer 2',
expression: 'parameter 1 / 3.14',
rawExpression: 'parameter_1 / 3.14',
relation: '=',
type: 'expression'
},
{
dependentName: "SLD Layer 3",
expression: "5.0"
dependentName: 'SLD Layer 3',
expression: '5.0',
rawExpression: '5.0',
relation: '=',
type: 'static'
}
]

function addConstraint(value1, value2, value3, value4, value5) {
console.debug(`addConstraint ${value1} ${value2} ${value3} ${value4} ${value5}`)

// Create constraint object in the new simplified format
let expression = ""
if (value5 >= 0 && value5 < parameterNames.length) {
// Parameter-parameter constraint
expression = `${value3} ${value4} ${parameterNames[value5]}`
} else {
// Numeric constraint
expression = `= ${value3}`
function validateConstraintExpression(dependentIndex, relation, expression) {
if (dependentIndex < 0 || dependentIndex >= parameterNames.length) {
return { valid: false, message: 'Select a dependent parameter first.' }
}
const expr = expression !== undefined && expression !== null ? String(expression).trim() : ''
if (expr.length === 0) {
return { valid: false, message: 'Expression cannot be empty.' }
}
return {
valid: true,
message: '',
preview: expr,
relation: relation,
type: relation === '=' ? 'expression' : (relation === '>' ? 'lower_bound' : 'upper_bound')
}
}

function addConstraint(dependentIndex, relation, expression) {
const validation = validateConstraintExpression(dependentIndex, relation, expression)
if (!validation.valid) {
return { success: false, message: validation.message }
}

const constraint = {
dependentName: parameterNames[value1] || "Unknown",
expression: expression
dependentName: parameterNames[dependentIndex] || 'Unknown parameter',
expression: validation.preview,
rawExpression: expression,
relation: relation,
type: validation.type
}

// Add to constraints list - need to reassign the array to trigger property change
var newConstraints = constraintsList.slice() // Create a copy
var newConstraints = constraintsList.slice()
newConstraints.push(constraint)
constraintsList = newConstraints
constraintsChanged()

return {
success: true,
message: '',
preview: validation.preview,
relation: relation,
type: validation.type
}
}

function removeConstraintByIndex(index) {
Expand Down
2 changes: 1 addition & 1 deletion EasyReflectometryApp/Backends/Py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .py_backend import PyBackend

__all__ = [PyBackend]
__all__ = [PyBackend]
Loading