parameters: (workspace)
docstring: Given a workspace, will return a list of all the IDs that correspond to
      detectors that have been masked.
  
      :param workspace : the workspace to extract the det IDs from
      :return: a list of IDs for masked detectors
docstring_summary: Given a workspace, will return a list of all the IDs that correspond to
      detectors that have been masked.
docstring_tokens: Given a workspace will return a list of all the IDs that correspond to detectors that have been masked .
function: def get_masked_det_ids(workspace):
      """
      Given a workspace, will return a list of all the IDs that correspond to
      detectors that have been masked.
  
      :param workspace : the workspace to extract the det IDs from
      :return: a list of IDs for masked detectors
      """
      for ws_index in range(workspace.getNumberHistograms()):
          try:
              detector = workspace.getDetector(ws_index)
          except RuntimeError:
              # Skip the rest after finding the first spectra with no detectors,
              # which is a big speed increase for SANS2D.
              break
          if detector.isMasked():
              yield detector.getID()
function_tokens: def get_masked_det_ids ( workspace ) : for ws_index in range ( workspace . getNumberHistograms ( ) ) : try : detector = workspace . getDetector ( ws_index ) except RuntimeError : # Skip the rest after finding the first spectra with no detectors, # which is a big speed increase for SANS2D. break if detector . isMasked ( ) : yield detector . getID ( )