本文整理汇总了Python中SANSUtility.get_unfitted_transmission_workspace_name方法的典型用法代码示例。如果您正苦于以下问题:Python SANSUtility.get_unfitted_transmission_workspace_name方法的具体用法?Python SANSUtility.get_unfitted_transmission_workspace_name怎么用?Python SANSUtility.get_unfitted_transmission_workspace_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SANSUtility
的用法示例。
在下文中一共展示了SANSUtility.get_unfitted_transmission_workspace_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post_process
# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import get_unfitted_transmission_workspace_name [as 别名]
def post_process(self):
# Store the mask file within the final workspace so that it is saved to the CanSAS file
if self.user_settings is None:
user_file = 'None'
else:
user_file = self.user_settings.filename
AddSampleLog(Workspace=self.output_wksp, LogName="UserFile", LogText=user_file)
# get the value of __transmission_sample from the transmission_calculator if it has
if (not self.get_can()) and self.transmission_calculator.output_wksp:
# it updates only if there was not can, because, when there is can, the __transmission_sample
# is already correct and transmission_calculator.output_wksp points to the can transmission
self.__transmission_sample = self.transmission_calculator.output_wksp
# The reducer itself sometimes will be reset, and the users of the singleton
# not always will have access to its settings. So, we will add the transmission workspaces
# to the SampleLog, to be connected to the workspace, and be available outside. These values
# are current being used for saving CanSAS (ticket #6929)
if self.__transmission_sample:
unfitted_transmission_workspace_name = su.get_unfitted_transmission_workspace_name(self.__transmission_sample)
AddSampleLog(Workspace=self.output_wksp, LogName="Transmission",
LogText=unfitted_transmission_workspace_name)
if self.__transmission_can:
unfitted_transmission_workspace_name = su.get_unfitted_transmission_workspace_name(self.__transmission_can)
AddSampleLog(Workspace=self.output_wksp, LogName="TransmissionCan",
LogText=unfitted_transmission_workspace_name)
# clean these values for subsequent executions
self.__transmission_sample = ""
self.__transmission_can = ""
for role in list(self._temporys.keys()):
try:
DeleteWorkspace(Workspace=self._temporys[role])
except (Exception, Warning):
# if cleaning up isn't possible there is probably nothing we can do
pass