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: Return header as mapping for conversion to Analyze types
  
  Collect data from custom header type to fill in fields for Analyze and
  derived header types (such as Nifti1 and Nifti2).
  
  When Analyze types convert another header type to their own type, they
  call this this method to check if there are other Analyze / Nifti
  fields that the source header would like to set.
  
  Returns
  -------
  analyze_map : mapping
      Object that can be used as a mapping thus::
  
          for key in analyze_map:
              value = analyze_map[key]
  
      where ``key`` is the name of a field that can be set in an Analyze
      header type, such as Nifti1, and ``value`` is a value for the
      field.  For example, `analyze_map` might be a something like
      ``dict(regular='y', slice_duration=0.3)`` where ``regular`` is a
      field present in both Analyze and Nifti1, and ``slice_duration`` is
      a field restricted to Nifti1 and Nifti2.  If a particular Analyze
      header type does not recognize the field name, it will throw away
      the value without error.  See :meth:`Analyze.from_header`.
  
  Notes
  -----
  You can also return a Nifti header with the relevant fields set.
  
  Your header still needs methods ``get_data_dtype``, ``get_data_shape``
  and ``get_zooms``, for the conversion, and these get called *after*
  using the analyze map, so the methods will override values set in the
  map.
docstr_tok: ["Return","header","as","mapping","for","conversion","to","Analyze","types","Collect","data","from","custom","header","type","to","fill","in","fields","for","Analyze","and","derived","header","types","(","such","as","Nifti1","and","Nifti2",")",".","When","Analyze","types","convert","another","header","type","to","their","own","type",",","they","call","this","this","method","to","check","if","there","are","other","Analyze","\/","Nifti","fields","that","the","source","header","would","like","to","set",".","Returns","--","--","--","-","analyze_map",":","mapping","Object","that","can","be","used","as","a","mapping","thus",":",":","for","key","in","analyze_map",":","value","=","analyze_map","[","key","]","where","``","key","``","is","the","name","of","a","field","that","can","be","set","in","an","Analyze","header","type",",","such","as","Nifti1",",","and","``","value","``","is","a","value","for","the","field",".","For","example",",","`","analyze_map","`","might","be","a","something","like","``","dict","(","regular=","'","y","'",",","slice_duration=0.3",")","``","where","``","regular","``","is","a","field","present","in","both","Analyze","and","Nifti1",",","and","``","slice_duration","``","is","a","field","restricted","to","Nifti1","and","Nifti2",".","If","a","particular","Analyze","header","type","does","not","recognize","the","field","name",",","it","will","throw","away","the","value","without","error",".","See",":","meth",":","`","Analyze.from_header","`",".","Notes","--","--","-","You","can","also","return","a","Nifti","header","with","the","relevant","fields","set",".","Your","header","still","needs","methods","``","get_data_dtype","``",",","``","get_data_shape","``","and","``","get_zooms","``",",","for","the","conversion",",","and","these","get","called","*","after","*","using","the","analyze","map",",","so","the","methods","will","override","values","set","in","the","map","."]
code: def as_analyze_map(self):
      """Return header as mapping for conversion to Analyze types
  
      Collect data from custom header type to fill in fields for Analyze and
      derived header types (such as Nifti1 and Nifti2).
  
      When Analyze types convert another header type to their own type, they
      call this this method to check if there are other Analyze / Nifti
      fields that the source header would like to set.
  
      Returns
      -------
      analyze_map : mapping
          Object that can be used as a mapping thus::
  
              for key in analyze_map:
                  value = analyze_map[key]
  
          where ``key`` is the name of a field that can be set in an Analyze
          header type, such as Nifti1, and ``value`` is a value for the
          field.  For example, `analyze_map` might be a something like
          ``dict(regular='y', slice_duration=0.3)`` where ``regular`` is a
          field present in both Analyze and Nifti1, and ``slice_duration`` is
          a field restricted to Nifti1 and Nifti2.  If a particular Analyze
          header type does not recognize the field name, it will throw away
          the value without error.  See :meth:`Analyze.from_header`.
  
      Notes
      -----
      You can also return a Nifti header with the relevant fields set.
  
      Your header still needs methods ``get_data_dtype``, ``get_data_shape``
      and ``get_zooms``, for the conversion, and these get called *after*
      using the analyze map, so the methods will override values set in the
      map.
      """
      # In the case of Analyze types, the header is already such a mapping
      return self
  
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 16 for calling the AnalyzeHeader obj's underlying member method code with example usage: obj.as_analyze_map() and returns: self