Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
4988d2b0
Commit
4988d2b0
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
uniform arg name dfileItem
parent
88995864
No related branches found
No related tags found
1 merge request
!2321
rm DataPropertyWidget, axis/axes panels w/o inheritance
Pipeline
#127881
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Device/InstrumentItems.cpp
+15
-15
15 additions, 15 deletions
GUI/Model/Device/InstrumentItems.cpp
GUI/Model/Device/InstrumentItems.h
+7
-7
7 additions, 7 deletions
GUI/Model/Device/InstrumentItems.h
with
22 additions
and
22 deletions
GUI/Model/Device/InstrumentItems.cpp
+
15
−
15
View file @
4988d2b0
...
@@ -114,9 +114,9 @@ InstrumentItem* InstrumentItem::createItemCopy() const
...
@@ -114,9 +114,9 @@ InstrumentItem* InstrumentItem::createItemCopy() const
return
copy
;
return
copy
;
}
}
bool
InstrumentItem
::
alignedWith
(
const
DatafileItem
*
i
tem
)
const
bool
InstrumentItem
::
alignedWith
(
const
DatafileItem
*
dfileI
tem
)
const
{
{
return
axdims
()
==
i
tem
->
axdims
();
return
axdims
()
==
dfileI
tem
->
axdims
();
}
}
void
InstrumentItem
::
writeTo
(
QXmlStreamWriter
*
w
)
const
void
InstrumentItem
::
writeTo
(
QXmlStreamWriter
*
w
)
const
...
@@ -367,21 +367,21 @@ std::vector<int> SpecularInstrumentItem::axdims() const
...
@@ -367,21 +367,21 @@ std::vector<int> SpecularInstrumentItem::axdims() const
return
{
scanItem
()
->
inclinationAxisItem
()
->
size
()};
return
{
scanItem
()
->
inclinationAxisItem
()
->
size
()};
}
}
void
SpecularInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
i
tem
)
void
SpecularInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
{
{
if
(
axdims
().
size
()
!=
i
tem
->
axdims
().
size
())
if
(
axdims
().
size
()
!=
dfileI
tem
->
axdims
().
size
())
throw
std
::
runtime_error
(
"Specular instrument type is incompatible with passed data shape"
);
throw
std
::
runtime_error
(
"Specular instrument type is incompatible with passed data shape"
);
const
auto
&
dataAxis
=
i
tem
->
dataItem
()
->
c_field
()
->
axis
(
0
);
const
auto
&
dataAxis
=
dfileI
tem
->
dataItem
()
->
c_field
()
->
axis
(
0
);
scanItem
()
->
updateToData
(
dataAxis
);
scanItem
()
->
updateToData
(
dataAxis
);
scanItem
()
->
grazingScanItem
()
->
updateAxIndicators
(
makeFrame
());
scanItem
()
->
grazingScanItem
()
->
updateAxIndicators
(
makeFrame
());
}
}
bool
SpecularInstrumentItem
::
alignedWith
(
const
DatafileItem
*
i
tem
)
const
bool
SpecularInstrumentItem
::
alignedWith
(
const
DatafileItem
*
dfileI
tem
)
const
{
{
if
(
!
i
tem
->
holdsDimensionalData
())
if
(
!
dfileI
tem
->
holdsDimensionalData
())
return
scanItem
()
->
grazingScanItem
()
->
uniformAlphaAxisSelected
()
return
scanItem
()
->
grazingScanItem
()
->
uniformAlphaAxisSelected
()
&&
axdims
()
==
i
tem
->
axdims
();
&&
axdims
()
==
dfileI
tem
->
axdims
();
if
(
!
scanItem
()
->
grazingScanItem
()
->
pointwiseAlphaAxisSelected
())
if
(
!
scanItem
()
->
grazingScanItem
()
->
pointwiseAlphaAxisSelected
())
return
false
;
return
false
;
...
@@ -394,7 +394,7 @@ bool SpecularInstrumentItem::alignedWith(const DatafileItem* item) const
...
@@ -394,7 +394,7 @@ bool SpecularInstrumentItem::alignedWith(const DatafileItem* item) const
if
(
!
instrumentAxis
)
if
(
!
instrumentAxis
)
return
false
;
return
false
;
const
auto
&
native_axis
=
i
tem
->
dataItem
()
->
c_field
()
->
axis
(
0
);
const
auto
&
native_axis
=
dfileI
tem
->
dataItem
()
->
c_field
()
->
axis
(
0
);
return
*
instrumentAxis
==
native_axis
;
return
*
instrumentAxis
==
native_axis
;
}
}
...
@@ -586,12 +586,12 @@ std::vector<int> OffspecInstrumentItem::axdims() const
...
@@ -586,12 +586,12 @@ std::vector<int> OffspecInstrumentItem::axdims() const
return
{
scanItem
()
->
grazingScanItem
()
->
nBins
(),
detectorItem
()
->
ySize
()};
return
{
scanItem
()
->
grazingScanItem
()
->
nBins
(),
detectorItem
()
->
ySize
()};
}
}
void
OffspecInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
d
ata
Item
)
void
OffspecInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
d
file
Item
)
{
{
if
(
!
d
ata
Item
)
if
(
!
d
file
Item
)
return
;
return
;
const
auto
data_shape
=
d
ata
Item
->
axdims
();
const
auto
data_shape
=
d
file
Item
->
axdims
();
if
(
axdims
().
size
()
!=
data_shape
.
size
())
if
(
axdims
().
size
()
!=
data_shape
.
size
())
throw
std
::
runtime_error
(
"Offspec instrument type is incompatible with passed data shape"
);
throw
std
::
runtime_error
(
"Offspec instrument type is incompatible with passed data shape"
);
...
@@ -689,12 +689,12 @@ std::vector<int> GISASInstrumentItem::axdims() const
...
@@ -689,12 +689,12 @@ std::vector<int> GISASInstrumentItem::axdims() const
return
{(
int
)
detectorItem
()
->
phiAxis
().
nbins
(),
(
int
)
detectorItem
()
->
alphaAxis
().
nbins
()};
return
{(
int
)
detectorItem
()
->
phiAxis
().
nbins
(),
(
int
)
detectorItem
()
->
alphaAxis
().
nbins
()};
}
}
void
GISASInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
i
tem
)
void
GISASInstrumentItem
::
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
{
{
if
(
!
i
tem
)
if
(
!
dfileI
tem
)
return
;
return
;
const
auto
data_shape
=
i
tem
->
axdims
();
const
auto
data_shape
=
dfileI
tem
->
axdims
();
if
(
axdims
().
size
()
!=
data_shape
.
size
())
if
(
axdims
().
size
()
!=
data_shape
.
size
())
throw
std
::
runtime_error
(
"GISAS instrument type is incompatible with passed data shape."
);
throw
std
::
runtime_error
(
"GISAS instrument type is incompatible with passed data shape."
);
ASSERT
(
detectorItem
());
ASSERT
(
detectorItem
());
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Device/InstrumentItems.h
+
7
−
7
View file @
4988d2b0
...
@@ -46,9 +46,9 @@ public:
...
@@ -46,9 +46,9 @@ public:
virtual
std
::
vector
<
int
>
axdims
()
const
=
0
;
virtual
std
::
vector
<
int
>
axdims
()
const
=
0
;
virtual
void
updateToRealData
(
const
DatafileItem
*
i
tem
)
=
0
;
virtual
void
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
=
0
;
virtual
bool
alignedWith
(
const
DatafileItem
*
i
tem
)
const
;
virtual
bool
alignedWith
(
const
DatafileItem
*
dfileI
tem
)
const
;
virtual
Frame
makeFrame
()
const
=
0
;
virtual
Frame
makeFrame
()
const
=
0
;
...
@@ -131,8 +131,8 @@ public:
...
@@ -131,8 +131,8 @@ public:
QString
instrumentType
()
const
override
{
return
"Specular"
;
}
QString
instrumentType
()
const
override
{
return
"Specular"
;
}
std
::
vector
<
int
>
axdims
()
const
override
;
std
::
vector
<
int
>
axdims
()
const
override
;
void
updateToRealData
(
const
DatafileItem
*
i
tem
)
override
;
void
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
override
;
bool
alignedWith
(
const
DatafileItem
*
i
tem
)
const
override
;
bool
alignedWith
(
const
DatafileItem
*
dfileI
tem
)
const
override
;
Frame
makeFrame
()
const
override
;
Frame
makeFrame
()
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
QString
instrumentType
()
const
override
{
return
"Depth probe"
;
}
QString
instrumentType
()
const
override
{
return
"Depth probe"
;
}
std
::
vector
<
int
>
axdims
()
const
override
;
std
::
vector
<
int
>
axdims
()
const
override
;
void
updateToRealData
(
const
DatafileItem
*
i
tem
)
override
;
void
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
override
;
Frame
makeFrame
()
const
override
;
Frame
makeFrame
()
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
...
@@ -166,7 +166,7 @@ public:
...
@@ -166,7 +166,7 @@ public:
QString
instrumentType
()
const
override
{
return
"Off specular"
;
}
QString
instrumentType
()
const
override
{
return
"Off specular"
;
}
std
::
vector
<
int
>
axdims
()
const
override
;
std
::
vector
<
int
>
axdims
()
const
override
;
void
updateToRealData
(
const
DatafileItem
*
i
tem
)
override
;
void
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
override
;
Frame
makeFrame
()
const
override
;
Frame
makeFrame
()
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
...
@@ -185,7 +185,7 @@ public:
...
@@ -185,7 +185,7 @@ public:
QString
instrumentType
()
const
override
{
return
"GISAS"
;
}
QString
instrumentType
()
const
override
{
return
"GISAS"
;
}
std
::
vector
<
int
>
axdims
()
const
override
;
std
::
vector
<
int
>
axdims
()
const
override
;
void
updateToRealData
(
const
DatafileItem
*
i
tem
)
override
;
void
updateToRealData
(
const
DatafileItem
*
dfileI
tem
)
override
;
Frame
makeFrame
()
const
override
;
Frame
makeFrame
()
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
ISimulation
*
createSimulation
(
const
MultiLayer
&
sample
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
void
writeTo
(
QXmlStreamWriter
*
w
)
const
override
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment