zeeman procs

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Tue Dec 20 11:48:26 2005.


List of Routines


Routine Descriptions

ZFIT -- FIT B FIELDS TO STOKES V AND I/2 DATA

[Next Routine] [List of Routines]
NAME:
ZFIT -- Fit B fields to Stokes V and I/2 data

PURPOSE:
    Fit B fields to Stokes V and I/2 data in the channel range
         chnl1a to chnl2a. Fits the V spectrum to the derivative
         of the I/2 spectrum (providing the field) and, also, to
         the I/2 spectrum itself (providing the 'gain' error).

CALLING SEQUENCE:
    ZFIT, v0, i0, chnl1a, chnl2a, bfld, berr, gain, gainerr, $
	vpredicted, vmodified, a

INPUTS:
     v0: the data points of the Stokes V spectrum.
     i0: the data points of the Stokes I/2 (***NOT Stokes I***) spectrum.
     chnl1a: the first channel nr to include in the fit.
     chnl2a: the last channel nr to include in the fit.

OUTPUTS:
     bfld: the fitted magnetic field. UNITS ARE CHANNELS; SEE BELOW
     berr: the uncertainty in the fitted field.
     gain: the 'gain error', the fraction of residual I/2 leaked into V.
     gainerr: the uncertainty in the gain error.
     vpredicted: the V spectrum predicted from the bfld (all channels) 
     vmodified: measured V spectrum with the 'gain error' removed.
     a: the array of solved-for coefficients
 
UNITS OF FITTED FIELD:
	Bfld is the frequency separation betweeen the RHC and LHC 
components in units of channels. Thus, if the channel width is 2800 Hz
and bfld is returned as 1.00, and if the splitting is 2.8 Hz per microG
as it is for HI, then the freq separation between the two components is
2800 Hz and the field is 1000 Microg.

RESTRICTIONS:
    None...that we know of.
EXAMPLE:
    You have measured a V and an I spectrum and you want to 
         derive the associated field strength. 

    ZFIT, v0, i0, chnl1a, chnl2a, bfld, berr, gain, gainerr, $
	vpredicted, vmodified, a

(See /dzd2/heiles/idl/gen/zeeman/zfit.pro)


ZGFIT -- FIT B FIELDS TO STOKES V DATA, ASSUMING EMITTING GAUSSIANS AND ONE ABSORBING GAUSSIAN

[Previous Routine] [List of Routines]
NAME:
ZGFIT -- Fit B fields to Stokes V data, assuming emitting Gaussians and one absorbing gaussian

PURPOSE:
    Fit B fields to Stokes V data, assuming Gaussians are the
         total intensity spectrum and assuming one absorbing gaussian.
CALLING SEQUENCE:
    ZG_EA_FIT, xdata, tdata, hgt0, cen0, wid0, hgttau, centau, widtau, $
	bfld, berr, cov

INPUTS:
     tdata: the data points of the Stokes V spectrum.
     hgt0: the array of N Gaussian heights of the Stokes I/2 spectrum.
     cen0: the array of N Gaussian centers of the Stokes I/2 spectrum.
     wid0: the array of N Gaussian widths of the Stokes I/2 spectrum.
	hgttau: the absorbing gaussian height
	centau, the absorbing gaussian centr
	widtau, the absorbing gaussian halfpower width

NOTE:
	ABSORBTION ASSUMED TO BE OF THE FORM
	optical depth = hgttau * exp[ (xdata - centau)/(0.6005612*widtau))^2]

OUTPUTS:
     bfld: the array of N fields of the Gaussians. 
     berr: the array of N fitted centers.
     cov: the normalized covariance matrix.

RESTRICTIONS:
    None...that we know of.
EXAMPLE:
    You have fit N Gaussians to a total intensity profile; their
         parameters are in the N-element arrays hgt, cen, wid. 
         You also have the Stokes V spectrum, which is the array 
         tdata, and you want to derive the associated field strengths. 
         ZGFIT, tdata, hgt0, cen0, wid0, bfld, berr, cov

(See /dzd2/heiles/idl/gen/zeeman/zg_ea_fit.pro)