class_docstr: Class for basic analyze header
  
  Implements zoom-only setting of affine transform, and no image
  scaling
class_docstr_tok: ["Class","for","basic","analyze","header","Implements","zoom-only","setting","of","affine","transform",",","and","no","image","scaling"]
docstr: Read scaled data array from `fileobj`
  
  Use this routine to get the scaled image data from an image file
  `fileobj`, given a header `self`.  "Scaled" means, with any header
  scaling factors applied to the raw data in the file.  Use
  `raw_data_from_fileobj` to get the raw data.
  
  Parameters
  ----------
  fileobj : file-like
     Must be open, and implement ``read`` and ``seek`` methods
  
  Returns
  -------
  arr : ndarray
     scaled data array
  
  Notes
  -----
  We use the header to get any scale or intercept values to apply to the
  data.  Raw Analyze files don't have scale factors or intercepts, but
  this routine also works with formats based on Analyze, that do have
  scaling, such as SPM analyze formats and NIfTI.
docstr_tok: ["Read","scaled","data","array","from","`","fileobj","`","Use","this","routine","to","get","the","scaled","image","data","from","an","image","file","`","fileobj","`",",","given","a","header","`","self","`",".","``","Scaled","''","means",",","with","any","header","scaling","factors","applied","to","the","raw","data","in","the","file",".","Use","`","raw_data_from_fileobj","`","to","get","the","raw","data",".","Parameters","--","--","--","--","--","fileobj",":","file-like","Must","be","open",",","and","implement","``","read","``","and","``","seek","``","methods","Returns","--","--","--","-","arr",":","ndarray","scaled","data","array","Notes","--","--","-","We","use","the","header","to","get","any","scale","or","intercept","values","to","apply","to","the","data",".","Raw","Analyze","files","do","n't","have","scale","factors","or","intercepts",",","but","this","routine","also","works","with","formats","based","on","Analyze",",","that","do","have","scaling",",","such","as","SPM","analyze","formats","and","NIfTI","."]
code: def data_from_fileobj(self, fileobj):
      """Read scaled data array from `fileobj`
  
      Use this routine to get the scaled image data from an image file
      `fileobj`, given a header `self`.  "Scaled" means, with any header
      scaling factors applied to the raw data in the file.  Use
      `raw_data_from_fileobj` to get the raw data.
  
      Parameters
      ----------
      fileobj : file-like
         Must be open, and implement ``read`` and ``seek`` methods
  
      Returns
      -------
      arr : ndarray
         scaled data array
  
      Notes
      -----
      We use the header to get any scale or intercept values to apply to the
      data.  Raw Analyze files don't have scale factors or intercepts, but
      this routine also works with formats based on Analyze, that do have
      scaling, such as SPM analyze formats and NIfTI.
      """
      # read unscaled data
      data = self.raw_data_from_fileobj(fileobj)
      # get scalings from header.  Value of None means not present in header
      slope, inter = self.get_slope_inter()
      slope = 1.0 if slope is None else slope
      inter = 0.0 if inter is None else inter
      # Upcast as necessary for big slopes, intercepts
      return apply_read_scaling(data, slope, inter)
  
imports: from __future__ import annotations
  import numpy
  from .arrayproxy import ArrayProxy
  from .arraywriters import ArrayWriter, WriterError, get_slope_inter, make_array_writer
  from .batteryrunners import Report
  from .fileholders import copy_file_map
  from .spatialimages import HeaderDataError, HeaderTypeError, SpatialHeader, SpatialImage
  from .volumeutils import apply_read_scaling, array_from_file, make_dt_codes, native_code, seek_tell, shape_zoom_affine, swapped_code
  from .wrapstruct import LabeledWrapStruct
label_desc: Use image node_id 7 for calling the AnalyzeHeader obj's underlying member method code with example usage: obj.data_from_fileobj(fileobj) and returns: apply_read_scaling