Skip to content

Commit

Permalink
Sync 1D, 2D, 3D binning in Raw data tab view
Browse files Browse the repository at this point in the history
  • Loading branch information
koshchii committed Jun 19, 2024
1 parent 6f1a558 commit 1ec64e9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ Grid {
ComboBox {
id: ttBinning1D
//values for two_theta_bin_width_1D
currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
//currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
currentIndex: Globals.Proxies.main.rawData.twoThetaIndex
model: ["0.5°", ""]
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.twoThetaIndex = currentIndex
print("CURRENT 1D TT INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
Globals.Proxies.main.rawData.slider1DStep = parseFloat(ttBinning1D.textAt(ttBinning1D.currentIndex))
Globals.Proxies.main.rawData.twoThetaSliderValue = 45.5
Expand Down Expand Up @@ -70,9 +72,11 @@ Grid {
//values for gamma_bin_width_1D
// model: ["1°", "2°", "5°", "10°"]// default value should be 1
model: ["", ""]
currentIndex: 0 //Globals.Proxies.main.rawData.gammaIndex
//currentIndex: 0 //Globals.Proxies.main.rawData.gammaIndex
currentIndex: Globals.Proxies.main.rawData.gammaIndex
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.gammaIndex = currentIndex
print("CURRENT 1D GAMMA INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ Grid {
//values for two_theta_bin_width_2D
// currentIndex: 2
// model: ["0.1°", "0.25°", "0.5°", "0.75°", "1°", "2°", "5°", "10°"]
currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
//currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
currentIndex: Globals.Proxies.main.rawData.twoThetaIndex
model: ["0.5°", ""]
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.twoThetaIndex = currentIndex
print("CURRENT 2D TT INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
Globals.Proxies.main.rawData.slider2DStep = parseFloat(ttBinning2D.textAt(ttBinning2D.currentIndex))
Globals.Proxies.main.rawData.twoThetaRingsSliderValue = 45.5
Expand All @@ -69,9 +71,11 @@ Grid {
//values for gamma_bin_width_2D
// model: ["1°", "2°", "5°", "10°"]
model: ["", ""]
currentIndex: 0 // Globals.Proxies.main.rawData.gammaIndex
//currentIndex: 0 // Globals.Proxies.main.rawData.gammaIndex
currentIndex: Globals.Proxies.main.rawData.gammaIndex
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.gammaIndex = currentIndex
print("CURRENT 2D GAMMA INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ Grid {
//values for two_theta_bin_width_3D
// currentIndex: 2
// model: ["0.1°", "0.25°", "0.5°", "0.75°", "1°", "2°", "5°", "10°"]
currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
//currentIndex: 0 //Globals.Proxies.main.rawData.twoThetaIndex
currentIndex: Globals.Proxies.main.rawData.twoThetaIndex
model: ["0.5°", ""]
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.twoThetaIndex = currentIndex
print("CURRENT 3D TT INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
}
}
Expand All @@ -63,9 +65,11 @@ Grid {
//values for gamma_bin_width_3D
// model: ["1°", "2°", "5°", "10°"]
model: ["", ""]
currentIndex: 0 //Globals.Proxies.main.rawData.gammaIndex
//currentIndex: 0 //Globals.Proxies.main.rawData.gammaIndex
currentIndex: Globals.Proxies.main.rawData.gammaIndex
onCurrentIndexChanged: {
Globals.Proxies.main.rawData.gammaIndex = currentIndex
print("CURRENT 3D GAMMA INDX", currentIndex)
Globals.Proxies.main.rawData.updateBinned()
}
}
Expand Down

0 comments on commit 1ec64e9

Please sign in to comment.