parameters: (workspace, radius=None, roi_files=None, mask_files=None)
return_statement: return sorted(set(trans_roi) - set(masked_ids))
docstring: Calculate the various contributions to the "region of interest", used in the
      transmission calculation.
  
      The region of interest can be made up of a circle of detectors (with a given radius)
      around the beam centre, and/or one or more mask files, and/or the main detector bank.
      Note that the mask files wont actually be used for masking, we're just piggy-backing
      on the functionality that they provide. Note that in the case of a radius, we have
      to ensure that we do not use a workspace which already has masked detectors, since
      they would contribute to the ROI.
      :param workspace: the workspace which is used for the transmission calculation
      :param radius: the radius of the region of interest
      :param roi_files: a list of roi files. Spectra in the ROI contribute to the
                        transmission calculation.
      :param mask_files: a list of mask files. Spectra in the Mask explicitly do not
                         contribute to the transmission calculation.
      :return: a list of spectrum numbers
docstring_summary: Calculate the various contributions to the "region of interest", used in the
      transmission calculation.
docstring_tokens: Calculate the various contributions to the region of interest used in the transmission calculation .
function: def get_region_of_interest(workspace, radius=None, roi_files=None, mask_files=None):
      """
      Calculate the various contributions to the "region of interest", used in the
      transmission calculation.
  
      The region of interest can be made up of a circle of detectors (with a given radius)
      around the beam centre, and/or one or more mask files, and/or the main detector bank.
      Note that the mask files wont actually be used for masking, we're just piggy-backing
      on the functionality that they provide. Note that in the case of a radius, we have
      to ensure that we do not use a workspace which already has masked detectors, since
      they would contribute to the ROI.
      :param workspace: the workspace which is used for the transmission calculation
      :param radius: the radius of the region of interest
      :param roi_files: a list of roi files. Spectra in the ROI contribute to the
                        transmission calculation.
      :param mask_files: a list of mask files. Spectra in the Mask explicitly do not
                         contribute to the transmission calculation.
      :return: a list of spectrum numbers
      """
      trans_roi = []
  
      if radius is not None:
          # Mask out a cylinder with the given radius in a copy of the workspace.
          # The centre position of the Cylinder does not require a shift, as all
          # components have been shifted already, when the workspaces were loaded
          clone_name = "CloneWorkspace"
          clone_options = {"InputWorkspace": workspace,
                           "OutputWorkspace": EMPTY_NAME}
          clone_alg = create_unmanaged_algorithm(clone_name, **clone_options)
          clone_alg.execute()
          cloned_workspace = clone_alg.getProperty("OutputWorkspace").value
  
          # Mask the cylinder around a centre of (0, 0)
          mask_with_cylinder(cloned_workspace, radius, 0.0, 0.0, "")
  
          # Extract the masked detector ID's.
          trans_roi += get_masked_det_ids(cloned_workspace)
  
      idf_path = get_idf_path_from_workspace(workspace)
  
      if roi_files is not None and idf_path is not None:
          for roi_file in roi_files:
              trans_roi += get_masked_det_ids_from_mask_file(roi_file, idf_path)
  
      masked_ids = []
      if mask_files is not None and idf_path is not None:
          for mask_file in mask_files:
              masked_ids += get_masked_det_ids_from_mask_file(mask_file, idf_path)
  
      # Detector ids which are not allowed and specified by "masked_ids" need to
      # be removed from the trans_roi list
      # Remove duplicates and sort.
      return sorted(set(trans_roi) - set(masked_ids))
function_tokens: def get_region_of_interest ( workspace , radius = None , roi_files = None , mask_files = None ) : trans_roi = [ ] if radius is not None : # Mask out a cylinder with the given radius in a copy of the workspace. # The centre position of the Cylinder does not require a shift, as all # components have been shifted already, when the workspaces were loaded clone_name = "CloneWorkspace" clone_options = { "InputWorkspace" : workspace , "OutputWorkspace" : EMPTY_NAME } clone_alg = create_unmanaged_algorithm ( clone_name , * * clone_options ) clone_alg . execute ( ) cloned_workspace = clone_alg . getProperty ( "OutputWorkspace" ) . value # Mask the cylinder around a centre of (0, 0) mask_with_cylinder ( cloned_workspace , radius , 0.0 , 0.0 , "" ) # Extract the masked detector ID's. trans_roi += get_masked_det_ids ( cloned_workspace ) idf_path = get_idf_path_from_workspace ( workspace ) if roi_files is not None and idf_path is not None : for roi_file in roi_files : trans_roi += get_masked_det_ids_from_mask_file ( roi_file , idf_path ) masked_ids = [ ] if mask_files is not None and idf_path is not None : for mask_file in mask_files : masked_ids += get_masked_det_ids_from_mask_file ( mask_file , idf_path ) # Detector ids which are not allowed and specified by "masked_ids" need to # be removed from the trans_roi list # Remove duplicates and sort. return sorted ( set ( trans_roi ) - set ( masked_ids ) )