class_docstr: Class contains logic for spaces with XYZ coordinate systems
  
  >>> sp = XYZSpace('hijo')
  >>> print(sp)
  hijo: [('x', 'hijo-x=L->R'), ('y', 'hijo-y=P->A'), ('z', 'hijo-z=I->S')]
  >>> csm = sp.to_coordsys_maker()
  >>> cs = csm(3)
  >>> cs
  CoordinateSystem(coord_names=('hijo-x=L->R', 'hijo-y=P->A', 'hijo-z=I->S'), name='hijo', coord_dtype=float64)
  >>> cs in sp
  True
class_docstr_tok: ["Class","contains","logic","for","spaces","with","XYZ","coordinate","systems",">",">",">","sp","=","XYZSpace","(","'hijo","'",")",">",">",">","print","(","sp",")","hijo",":","[","(","'","x","'",",","'hijo-x=L-",">","R","'",")",",","(","'","y","'",",","'hijo-y=P-",">","A","'",")",",","(","'","z","'",",","'hijo-z=I-",">","S","'",")","]",">",">",">","csm","=","sp.to_coordsys_maker","(",")",">",">",">","cs","=","csm","(","3",")",">",">",">","cs","CoordinateSystem","(","coord_names=","(","'hijo-x=L-",">","R","'",",","'hijo-y=P-",">","A","'",",","'hijo-z=I-",">","S","'",")",",","name='hijo","'",",","coord_dtype=float64",")",">",">",">","cs","in","sp","True"]
docstr: True if `obj` can be thought of as being 'in' this space
  
  `obj` is an object that is in some kind of space - it can be a
  coordinate system, a coordinate map, or an object with a ``coordmap``
  attribute.  We test the output coordinate system of `obj` against our
  own space definition.
  
  A coordinate system is in our space if it has all the axes of our space.
  
  Parameters
  ----------
  obj : object
      Usually a coordinate system, a coordinate map, or an Image (with a
      ``coordmap`` attribute)
  
  Returns
  -------
  tf : bool
      True if `obj` is 'in' this space
  
  Examples
  --------
  >>> from nipy.core.api import Image, AffineTransform, CoordinateSystem
  >>> sp = XYZSpace('hijo')
  >>> names = sp.as_tuple()
  >>> cs = CoordinateSystem(names)
  >>> cs in sp
  True
  >>> cs = CoordinateSystem(names + ('another_name',))
  >>> cs in sp
  True
  >>> cmap = AffineTransform('ijk', names, np.eye(4))
  >>> cmap in sp
  True
  >>> img = Image(np.zeros((3,4,5)), cmap)
  >>> img in sp
  True
docstr_tok: ["True","if","`","obj","`","can","be","thought","of","as","being","'in","'","this","space","`","obj","`","is","an","object","that","is","in","some","kind","of","space","-","it","can","be","a","coordinate","system",",","a","coordinate","map",",","or","an","object","with","a","``","coordmap","``","attribute",".","We","test","the","output","coordinate","system","of","`","obj","`","against","our","own","space","definition",".","A","coordinate","system","is","in","our","space","if","it","has","all","the","axes","of","our","space",".","Parameters","--","--","--","--","--","obj",":","object","Usually","a","coordinate","system",",","a","coordinate","map",",","or","an","Image","(","with","a","``","coordmap","``","attribute",")","Returns","--","--","--","-","tf",":","bool","True","if","`","obj","`","is","'in","'","this","space","Examples","--","--","--","--",">",">",">","from","nipy.core.api","import","Image",",","AffineTransform",",","CoordinateSystem",">",">",">","sp","=","XYZSpace","(","'hijo","'",")",">",">",">","names","=","sp.as_tuple","(",")",">",">",">","cs","=","CoordinateSystem","(","names",")",">",">",">","cs","in","sp","True",">",">",">","cs","=","CoordinateSystem","(","names","+","(","'another_name","'",",",")",")",">",">",">","cs","in","sp","True",">",">",">","cmap","=","AffineTransform","(","'ijk","'",",","names",",","np.eye","(","4",")",")",">",">",">","cmap","in","sp","True",">",">",">","img","=","Image","(","np.zeros","(","(","3,4,5",")",")",",","cmap",")",">",">",">","img","in","sp","True"]
code: def __contains__(self, obj):
      """True if `obj` can be thought of as being 'in' this space
  
      `obj` is an object that is in some kind of space - it can be a
      coordinate system, a coordinate map, or an object with a ``coordmap``
      attribute.  We test the output coordinate system of `obj` against our
      own space definition.
  
      A coordinate system is in our space if it has all the axes of our space.
  
      Parameters
      ----------
      obj : object
          Usually a coordinate system, a coordinate map, or an Image (with a
          ``coordmap`` attribute)
  
      Returns
      -------
      tf : bool
          True if `obj` is 'in' this space
  
      Examples
      --------
      >>> from nipy.core.api import Image, AffineTransform, CoordinateSystem
      >>> sp = XYZSpace('hijo')
      >>> names = sp.as_tuple()
      >>> cs = CoordinateSystem(names)
      >>> cs in sp
      True
      >>> cs = CoordinateSystem(names + ('another_name',))
      >>> cs in sp
      True
      >>> cmap = AffineTransform('ijk', names, np.eye(4))
      >>> cmap in sp
      True
      >>> img = Image(np.zeros((3,4,5)), cmap)
      >>> img in sp
      True
      """
      try:
          obj = obj.coordmap
      except AttributeError:
          pass
      try:
          obj = obj.function_range
      except AttributeError:
          pass
      my_names = self.as_tuple()
      return set(my_names).issubset(obj.coord_names)
  
imports: import numpy
  from nibabel import io_orientation
  from nibabel.affines import from_matvec
  from .coordinate_map import CoordMapMaker
  from .coordinate_system import CoordSysMaker, is_coordsys, is_coordsys_maker
label_desc: Use image node_id 13 for calling the XYZSpace obj's underlying member method code with example usage: obj.__contains__(obj) and returns: set