本文整理匯總了Python中mantid.simpleapi.Load.name方法的典型用法代碼示例。如果您正苦於以下問題:Python Load.name方法的具體用法?Python Load.name怎麽用?Python Load.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mantid.simpleapi.Load
的用法示例。
在下文中一共展示了Load.name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _create_experimental_data_workspace
# 需要導入模塊: from mantid.simpleapi import Load [as 別名]
# 或者: from mantid.simpleapi.Load import name [as 別名]
def _create_experimental_data_workspace(self):
"""
Loads experimental data into workspaces.
:returns: workspace with experimental data
"""
experimental_wrk = Load(self._experimental_file)
self._set_workspace_units(wrk=experimental_wrk.name())
return experimental_wrk
示例2: TableWorkspaceDisplayDecoderTest
# 需要導入模塊: from mantid.simpleapi import Load [as 別名]
# 或者: from mantid.simpleapi.Load import name [as 別名]
class TableWorkspaceDisplayDecoderTest(GuiTest):
def setUp(self):
self.ws = Load("SavedTableWorkspace.nxs", OutputWorkspace="ws")
self.decoder = TableWorkspaceDisplayDecoder()
def test_decoder_returns_view(self):
self.assertEqual(self.decoder.decode(TABLEWORKSPACEDISPLAY_DICT).__class__, StatusBarView)
def test_decoder_returns_custom_features(self):
view = self.decoder.decode(TABLEWORKSPACEDISPLAY_DICT)
self.assertEqual(self.ws.name(), view.presenter.model.ws.name())
self.assertEqual(TABLEWORKSPACEDISPLAY_DICT["markedColumns"]["as_y"], view.presenter.model.marked_columns.as_y)
self.assertEqual(TABLEWORKSPACEDISPLAY_DICT["markedColumns"]["as_x"], view.presenter.model.marked_columns.as_x)
self.assertEqual(
TABLEWORKSPACEDISPLAY_DICT["markedColumns"]["as_y_err"][0]["column"],
view.presenter.model.marked_columns.as_y_err[0].column)
self.assertEqual(
TABLEWORKSPACEDISPLAY_DICT["markedColumns"]["as_y_err"][0]["relatedY"],
view.presenter.model.marked_columns.as_y_err[0].related_y_column)
self.assertEqual(
TABLEWORKSPACEDISPLAY_DICT["markedColumns"]["as_y_err"][0]["labelIndex"],
view.presenter.model.marked_columns.as_y_err[0].label_index)
self.assertEqual(1, len(view.presenter.model.marked_columns.as_y_err))