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"]
code: def _chk_bitpix(klass, hdr, fix=False):
      rep = Report(HeaderDataError)
      code = int(hdr["datatype"])
      try:
          dt = klass._data_type_codes.dtype[code]
      except KeyError:
          rep.problem_level = 10
          rep.problem_msg = "no valid datatype to fix bitpix"
          if fix:
              rep.fix_msg = "no way to fix bitpix"
          return hdr, rep
      bitpix = dt.itemsize * 8
      if bitpix == hdr["bitpix"]:
          return hdr, rep
      rep.problem_level = 10
      rep.problem_msg = "bitpix does not match datatype"
      if fix:
          hdr["bitpix"] = bitpix  # inplace modification
          rep.fix_msg = "setting bitpix to match datatype"
      return hdr, rep
  
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 24 for calling the AnalyzeHeader obj's underlying member method code with example usage: obj._chk_bitpix(klass, hdr, fix) and returns: hdr,  rep, hdr,  rep, hdr,  rep