parameters: (pixel_adjustment_file, component, idf_path)
return_statement: return pixel_adjustment_workspace
docstring: This get the pixel-by-pixel adjustment of the workspace
  
          :param pixel_adjustment_file: full file path to the pixel adjustment file
          :param component: the component which is currently being investigated
          :param idf_path: the idf path
          :return: the pixel adjustment workspace
docstring_summary: This get the pixel-by-pixel adjustment of the workspace
docstring_tokens: This get the pixel - by - pixel adjustment of the workspace
function: def _get_pixel_adjustment_workspace(pixel_adjustment_file, component, idf_path):
          """
          This get the pixel-by-pixel adjustment of the workspace
  
          :param pixel_adjustment_file: full file path to the pixel adjustment file
          :param component: the component which is currently being investigated
          :param idf_path: the idf path
          :return: the pixel adjustment workspace
          """
          if pixel_adjustment_file:
              load_name = "LoadRKH"
              load_options = {"Filename": pixel_adjustment_file,
                              "OutputWorkspace": EMPTY_NAME,
                              "FirstColumnValue": "SpectrumNumber"}
              load_alg = create_unmanaged_algorithm(load_name, **load_options)
              load_alg.execute()
              output_workspace = load_alg.getProperty("OutputWorkspace").value
  
              if not idf_path:
                  raise ValueError("No IDF path was found in the provided state")
  
              # Add an instrument to the workspace
              instrument_name = "LoadInstrument"
              instrument_options = {"Workspace": output_workspace,
                                    "Filename": idf_path,
                                    "RewriteSpectraMap": False}
              instrument_alg = create_unmanaged_algorithm(instrument_name, **instrument_options)
              instrument_alg.execute()
  
              # Crop to the required detector
              crop_name = "CropToComponent"
              component_to_crop = DetectorType(component)
              component_to_crop = get_component_name(output_workspace, component_to_crop)
              crop_options = {"InputWorkspace": output_workspace,
                              "OutputWorkspace": EMPTY_NAME,
                              "ComponentNames": component_to_crop}
  
              crop_alg = create_unmanaged_algorithm(crop_name, **crop_options)
              crop_alg.execute()
              pixel_adjustment_workspace = crop_alg.getProperty("OutputWorkspace").value
          else:
              pixel_adjustment_workspace = None
          return pixel_adjustment_workspace
function_tokens: def _get_pixel_adjustment_workspace ( pixel_adjustment_file , component , idf_path ) : if pixel_adjustment_file : load_name = "LoadRKH" load_options = { "Filename" : pixel_adjustment_file , "OutputWorkspace" : EMPTY_NAME , "FirstColumnValue" : "SpectrumNumber" } load_alg = create_unmanaged_algorithm ( load_name , * * load_options ) load_alg . execute ( ) output_workspace = load_alg . getProperty ( "OutputWorkspace" ) . value if not idf_path : raise ValueError ( "No IDF path was found in the provided state" ) # Add an instrument to the workspace instrument_name = "LoadInstrument" instrument_options = { "Workspace" : output_workspace , "Filename" : idf_path , "RewriteSpectraMap" : False } instrument_alg = create_unmanaged_algorithm ( instrument_name , * * instrument_options ) instrument_alg . execute ( ) # Crop to the required detector crop_name = "CropToComponent" component_to_crop = DetectorType ( component ) component_to_crop = get_component_name ( output_workspace , component_to_crop ) crop_options = { "InputWorkspace" : output_workspace , "OutputWorkspace" : EMPTY_NAME , "ComponentNames" : component_to_crop } crop_alg = create_unmanaged_algorithm ( crop_name , * * crop_options ) crop_alg . execute ( ) pixel_adjustment_workspace = crop_alg . getProperty ( "OutputWorkspace" ) . value else : pixel_adjustment_workspace = None return pixel_adjustment_workspace