class_docstr: Derive from this abstract Reader class to create your own image reader in Python
  
  You need to implement the methods below in the derived class.
  
  Use this block of text to describe your reader to the user.
class_docstr_tok: ["Derive","from","this","abstract","Reader","class","to","create","your","own","image","reader","in","Python","You","need","to","implement","the","methods","below","in","the","derived","class",".","Use","this","block","of","text","to","describe","your","reader","to","the","user","."]
docstr: When we're rescaling we'll usually want to match the output from BioFormats.
  skimage.exposure.rescale_intensity would normally work beautifully, but
  python-bioformats did things differently. To rescale with that system we
  divide by the max possible value determined by the image format.
  
  This utility function will look at an array and return the correct max value to
  divide the array by.
docstr_tok: ["When","we","'re","rescaling","we","'ll","usually","want","to","match","the","output","from","BioFormats",".","skimage.exposure.rescale_intensity","would","normally","work","beautifully",",","but","python-bioformats","did","things","differently",".","To","rescale","with","that","system","we","divide","by","the","max","possible","value","determined","by","the","image","format",".","This","utility","function","will","look","at","an","array","and","return","the","correct","max","value","to","divide","the","array","by","."]
code: def find_scale_to_match_bioformats(data):
      """
      When we're rescaling we'll usually want to match the output from BioFormats.
      skimage.exposure.rescale_intensity would normally work beautifully, but
      python-bioformats did things differently. To rescale with that system we
      divide by the max possible value determined by the image format.
  
      This utility function will look at an array and return the correct max value to
      divide the array by.
      """
      if data.dtype in (numpy.int8, numpy.uint8):
          return 255
      elif data.dtype in (numpy.int16, numpy.uint16):
          return 65535
      elif data.dtype == numpy.int32:
          return 2**32 - 1
      elif data.dtype == numpy.uint32:
          return 2**32
      else:
          return 1
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/reader/_reader.py
imports: import uuid
  from abc import ABC, abstractmethod
  import numpy
label_desc: Use image node_id 14 for calling the Reader obj's underlying member method code with example usage: obj.find_scale_to_match_bioformats(data) and returns: int, int, unknown, unknown, int