Skip to content
Snippets Groups Projects
Commit 25f33178 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

SpecularInstrumentItem::alignedWith : rm qInfo

parent 096d27a5
No related branches found
No related tags found
1 merge request!1001GUI: show error bars for loaded reflectivity data
...@@ -195,41 +195,29 @@ void SpecularInstrumentItem::updateToRealData(const RealItem* item) ...@@ -195,41 +195,29 @@ void SpecularInstrumentItem::updateToRealData(const RealItem* item)
bool SpecularInstrumentItem::alignedWith(const RealItem* item) const bool SpecularInstrumentItem::alignedWith(const RealItem* item) const
{ {
const QString native_units = item->nativeDataUnits(); const QString native_units = item->nativeDataUnits();
if (native_units == "nbins") { if (native_units == "nbins")
qInfo() << 1 << (beamItem()->inclinationAngleItem()->uniformAlphaAxisSelected()
&& shape() == item->shape());
return beamItem()->inclinationAngleItem()->uniformAlphaAxisSelected() return beamItem()->inclinationAngleItem()->uniformAlphaAxisSelected()
&& shape() == item->shape(); && shape() == item->shape();
}
if (!beamItem()->inclinationAngleItem()->pointwiseAlphaAxisSelected()) { if (!beamItem()->inclinationAngleItem()->pointwiseAlphaAxisSelected())
qInfo() << 2;
return false; return false;
}
const auto* axisItem = const auto* axisItem =
dynamic_cast<const PointwiseAxisItem*>(beamItem()->inclinationAngleItem()->alphaAxis()); dynamic_cast<const PointwiseAxisItem*>(beamItem()->inclinationAngleItem()->alphaAxis());
ASSERT(axisItem); ASSERT(axisItem);
if (axisItem->getUnitsLabel() != native_units) { if (axisItem->getUnitsLabel() != native_units)
qInfo() << 3;
return false; return false;
}
const auto* instrumentAxis = axisItem->axis(); const auto* instrumentAxis = axisItem->axis();
if (!instrumentAxis) { if (!instrumentAxis)
qInfo() << 4;
return false; return false;
}
if (!item->hasNativeData()) { if (!item->hasNativeData())
qInfo() << 5;
return false; return false;
}
// TODO do not compare native axis with main data axis due to different units // TODO do not compare native axis with main data axis due to different units
const auto& native_axis = item->nativeDatafield()->axis(0); // const auto& native_axis = item->nativeDatafield()->axis(0);
qInfo() << 6 << (*instrumentAxis == native_axis);
// return *instrumentAxis == native_axis; // return *instrumentAxis == native_axis;
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment