parameters: (self, sample_mon_ws, empty_mon_ws, first_det,
                             trans_output_workspace, monitor_det_ID=None)
docstring: Compute zero-angle transmission.
  
          Returns the fitted transmission workspace as well as the raw transmission workspace.
  
          @param sample_mon_ws: name of the sample monitor workspace
          @param empty_mon_ws: name of the empty monitor workspace
          @param first_det: ID of the first detector, so we know where to find the summed counts
          @param trans_output_workspace: name of the transmission workspace to create
          @param monitor_det_ID: ID of the monitor spectrum (for HFIR data only)
docstring_summary: Compute zero-angle transmission.
docstring_tokens: Compute zero - angle transmission .
function: def calculate_transmission(self, sample_mon_ws, empty_mon_ws, first_det,
                             trans_output_workspace, monitor_det_ID=None):
      """
          Compute zero-angle transmission.
  
          Returns the fitted transmission workspace as well as the raw transmission workspace.
  
          @param sample_mon_ws: name of the sample monitor workspace
          @param empty_mon_ws: name of the empty monitor workspace
          @param first_det: ID of the first detector, so we know where to find the summed counts
          @param trans_output_workspace: name of the transmission workspace to create
          @param monitor_det_ID: ID of the monitor spectrum (for HFIR data only)
      """
      try:
          if monitor_det_ID is not None:
              alg = _execute("CalculateTransmission",
                             {"DirectRunWorkspace": empty_mon_ws,
                              "SampleRunWorkspace": sample_mon_ws,
                              "OutputWorkspace": trans_output_workspace,
                              "IncidentBeamMonitor": str(monitor_det_ID),
                              "TransmissionMonitor": str(first_det),
                              "OutputUnfittedData": True})
              output_ws = alg.getProperty("OutputWorkspace").value
          else:
              alg = _execute("CalculateTransmission",
                             {"DirectRunWorkspace": empty_mon_ws,
                              "SampleRunWorkspace": sample_mon_ws,
                              "OutputWorkspace": trans_output_workspace,
                              "TransmissionMonitor": str(first_det),
                              "OutputUnfittedData": True})
              output_ws = alg.getProperty("OutputWorkspace").value
  
          ##### HACK START ######
          # Fixing the Fit algorithm to output distribution when the input is a distribution
          # causes the system test EQSANSTransmissionCompatibility to worsen. Currently we
          # don't have enough information to ensure that this is valid. Hence we set the
          # distribution flag back at this point.
          if output_ws.isDistribution():
              output_ws.setDistribution(False)
          ##### HACK END ########
          # Get the unfitted data
          raw_ws = None
          if alg.existsProperty("UnfittedData"):
              raw_ws = alg.getProperty("UnfittedData").value
          if raw_ws is None:
              Logger("TransmissionUtils").warning("Could not retrieve unfitted transmission for %s" % trans_output_workspace)
          return output_ws, raw_ws
      except:
          Logger("TransmissionUtils").error("Couldn't compute transmission. Is the beam center in the right place?\n%s" % sys.exc_info()[1])
          return None, None
function_tokens: def calculate_transmission ( self , sample_mon_ws , empty_mon_ws , first_det , trans_output_workspace , monitor_det_ID = None ) : try : if monitor_det_ID is not None : alg = _execute ( "CalculateTransmission" , { "DirectRunWorkspace" : empty_mon_ws , "SampleRunWorkspace" : sample_mon_ws , "OutputWorkspace" : trans_output_workspace , "IncidentBeamMonitor" : str ( monitor_det_ID ) , "TransmissionMonitor" : str ( first_det ) , "OutputUnfittedData" : True } ) output_ws = alg . getProperty ( "OutputWorkspace" ) . value else : alg = _execute ( "CalculateTransmission" , { "DirectRunWorkspace" : empty_mon_ws , "SampleRunWorkspace" : sample_mon_ws , "OutputWorkspace" : trans_output_workspace , "TransmissionMonitor" : str ( first_det ) , "OutputUnfittedData" : True } ) output_ws = alg . getProperty ( "OutputWorkspace" ) . value ##### HACK START ###### # Fixing the Fit algorithm to output distribution when the input is a distribution # causes the system test EQSANSTransmissionCompatibility to worsen. Currently we # don't have enough information to ensure that this is valid. Hence we set the # distribution flag back at this point. if output_ws . isDistribution ( ) : output_ws . setDistribution ( False ) ##### HACK END ######## # Get the unfitted data raw_ws = None if alg . existsProperty ( "UnfittedData" ) : raw_ws = alg . getProperty ( "UnfittedData" ) . value if raw_ws is None : Logger ( "TransmissionUtils" ) . warning ( "Could not retrieve unfitted transmission for %s" % trans_output_workspace ) return output_ws , raw_ws except : Logger ( "TransmissionUtils" ) . error ( "Couldn't compute transmission. Is the beam center in the right place?\n%s" % sys . exc_info ( ) [ 1 ] ) return None , None