当前位置: 首页>>代码示例>>Python>>正文


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怎么用?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
开发者ID:mantidproject,项目名称:mantid,代码行数:39,代码来源:isis_reducer.py


注:本文中的SANSUtility.get_unfitted_transmission_workspace_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。