# spacepy.irbempy.get_Bfield

`spacepy.irbempy.``get_Bfield`(ticks, loci, extMag='T01STORM', options=[1, 0, 0, 0, 0], omnivals=None)

  call get_bfield in irbem lib and return a dictionary with the B-field vector and strenght.

  Parameters
    - ticks (Ticktock class)containing time information

      - loci (Coords class) : containing spatial information

      - extMag (string)optional; will choose the external magnetic field model

          possible values [‘0’, ‘MEAD’, ‘T87SHORT’, ‘T87LONG’, ‘T89’, ‘OPQUIET’, ‘OPDYN’, ‘T96’, ‘OSTA’, ‘T01QUIET’, ‘T01STORM’, ‘T05’, ‘ALEX’, ‘TS07’]

      - options (optional list or array of integers length=5) : explained in Lstar

      - omni values as dictionary (optional) : if not provided, will use lookup table

      - (see Lstar documentation for further explanation)

  Returns
    - results (dictionary)containing keys: Bvec, and Blocal

  See also

  `get_Lstar`, `find_Bmirror`, `find_magequator`

  Examples

      >>> import spacepy.time as spt
      >>> import spacepy.coordinates as spc
      >>> import spacepy.irbempy as ib
      >>> t = spt.Ticktock(['2002-02-02T12:00:00', '2002-02-02T12:10:00'], 'ISO')
      >>> y = spc.Coords([[3,0,0],[2,0,0]], 'GEO', 'car')
      >>> ib.get_Bfield(t,y)
      {'Blocal': array([  976.42565251,  3396.25991675]),
         'Bvec': array([[ -5.01738885e-01,  -1.65104338e+02,   9.62365503e+02],
         [  3.33497974e+02,  -5.42111173e+02,   3.33608693e+03]])}