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_pixdims(hdr, fix=False):
      rep = Report(HeaderDataError)
      pixdims = hdr["pixdim"]
      spat_dims = pixdims[1:4]
      if not np.any(spat_dims <= 0):
          return hdr, rep
      neg_dims = spat_dims < 0
      zero_dims = spat_dims == 0
      pmsgs = []
      fmsgs = []
      if np.any(zero_dims):
          level = 30
          pmsgs.append("pixdim[1,2,3] should be non-zero")
          if fix:
              spat_dims[zero_dims] = 1
              fmsgs.append("setting 0 dims to 1")
      if np.any(neg_dims):
          level = 35
          pmsgs.append("pixdim[1,2,3] should be positive")
          if fix:
              spat_dims = np.abs(spat_dims)
              fmsgs.append("setting to abs of pixdim values")
      rep.problem_level = level
      rep.problem_msg = " and ".join(pmsgs)
      if fix:
          pixdims[1:4] = spat_dims
          rep.fix_msg = " and ".join(fmsgs)
      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 25 for calling the AnalyzeHeader obj's underlying member method code with example usage: obj._chk_pixdims(hdr, fix) and returns: hdr,  rep, hdr,  rep