Difference between revisions of "High Level Functions"

From LIBISIS
Jump to navigation Jump to search
Line 2: Line 2:
  
 
These functions are
 
These functions are
<pre>>>wwout = deriv1x(ww)
+
<pre>>> wwout = deriv1x(ww)
 
>> wwout = deriv2x(ww)
 
>> wwout = deriv2x(ww)
 
>> wwout = deriv1y(ww)
 
>> wwout = deriv1y(ww)
Line 8: Line 8:
 
>> wout = deriv1(w)
 
>> wout = deriv1(w)
 
>> wout = deriv2(w)
 
>> wout = deriv2(w)
>> wwout = integrate_x(ww, xmin, xmax)
+
>> wout = integrate_x(ww, xmin, xmax)
>> wwout = integrate_y(ww, ymin, ymax)
+
>> wout = integrate_y(ww, ymin, ymax)
>> wwout = integrate_xy(ww, xmin, xmax, ymin, ymax)
+
>> dout = integrate_xy(ww, xmin, xmax, ymin, ymax)
>> wout = integrate(w, xmin, xmax)
+
>> dout = integrate(w, xmin, xmax)
 
>> wwout = smooth(ww)
 
>> wwout = smooth(ww)
 
>> wwout = smooth(w)
 
>> wwout = smooth(w)
Line 25: Line 25:
  
  
 +
==Derrivative Functions==
 +
 +
===First Derivative===
 +
These functions take the derivatives of datasets.
 +
 +
<pre>>> wwout = deriv1x(ww)
 +
>> wwout = deriv1y(ww)</pre>
 +
 +
* Input is an [[IXTdataset_2d]] object
 +
* Output is an [[IXTdataset_2d]] object
 +
* Calculates first derivative of the dataset in the x and y directions respectively
 +
 +
<pre>>> wout = deriv1(w)</pre>
 +
 +
* Input is an [[IXTdataset_1d]] object
 +
* Output is an [[IXTdataset_1d]] object
 +
* Calculates the first derivative of the dataset in the x direction
 +
 +
===Second Derivative===
 +
These functions take the second derivatives of datasets.
 +
 +
<pre>>> wwout = deriv2x(ww)
 +
>> wwout = deriv2y(ww)</pre>
 +
 +
* Input is an [[IXTdataset_2d]] object
 +
* Output is an [[IXTdataset_2d]] object
 +
* Calculates the second derivative of the dataset in the x and y directions respectively
  
 +
<pre>>> wout = deriv2(w)</pre>
 +
 +
* Input is an [[IXTdataset_1d]] object
 +
* Output is an [[IXTdataset_1d]] object
 +
* Calculates the second derivative of the dataset in the x direction.
  
==Derrivative Functions==
 
These functions take the derivatives of datasets.
 
  
 
==Integral Functions==
 
==Integral Functions==
 +
These functions integrate a dataset between given limits using the trapezoid method.
 +
 +
<pre>>> wwout = integrate_x(ww, xmin, xmax)
 +
>> wout = integrate_y(ww, ymin, ymax)</pre>
 +
 +
* Input is an [[IXTdataset_2d]] object
 +
* Output is an [[IXTdataset_1d]] object
 +
* Integral is evaluated between xmin and xmax in the x direction '''or''' ymin and ymax in the y direction
 +
 +
<pre>>> dout = integrate_xy(ww, xmin, xmax, ymin, ymax)</pre>
 +
 +
* Input is an [[IXTdataset_2d]] object
 +
* Output is an [[IXTdatum]] object
 +
* Integral is evaluated between xmin and xmax in the x direction '''and''' ymin and ymax in the y direction
 +
 +
<pre>>> dout = integrate(w, xmin, xmax)</pre>
 +
 +
* Input is an [[IXTdataset_2d]] object
 +
* Output is an [[IXTdatum]] object
 +
* Integral is evaluated between xmin and xmax
  
 
==Smooth Functions==
 
==Smooth Functions==
 +
Smooth functions use an algorithm to smooth the data in a dataset to eliminate fluctuations.
 +
 +
<pre>>> wwout = smooth(ww, options)
 +
>> wout = smooth(w, options)</pre>
 +
 +
* Input may be [[IXTdataset_1d]] '''or''' [[IXTdataset_2d]] object
 +
* Output is the same object type as the input
 +
* Options allow the user to set the method of smoothing and parameters
 +
 +
===Optional Inputs===
 +
 +
The following syntaxes may be used
 +
 +
<pre>>> wout = smooth (w, filter)
 +
>> wout = smooth (w, filter, size)
 +
>> wout = smooth (w, filter, size, pars)
 +
>> wout = smooth (w, filter, size, pars,'nonorm')</pre>
 +
 +
* '''filter''' may be 'box', 'gaussian', or the handle to a function that defines how the smoothing should occur. '''Default:''' 'box'
 +
* '''size''' is a vector indicating the size of the convolution kernel. '''Default:''' [3,3]
 +
* '''pars''' are arguments required by filter if a function is given
 +
* ''''nonorm'''' turns off the normalisation in the kernel shell if filter is a user defined function
 +
 +
See the Matlab online help for more information.
  
 
==Interpolate Functions==
 
==Interpolate Functions==
 +
These functions always return '''point''' datasets regardless of point or histogram input. It is analogous to the [[Rebin Functions | rebin]] functions
 +
  
 
==Unspike Functions==
 
==Unspike Functions==

Revision as of 11:00, 18 March 2008

Many powerful high level functions are provided. These manipulate datasets in a complicated manor.

These functions are

>> wwout = deriv1x(ww)
>> wwout = deriv2x(ww)
>> wwout = deriv1y(ww)
>> wwout = deriv2y(ww)
>> wout = deriv1(w)
>> wout = deriv2(w)
>> wout = integrate_x(ww, xmin, xmax)
>> wout = integrate_y(ww, ymin, ymax)
>> dout = integrate_xy(ww, xmin, xmax, ymin, ymax)
>> dout = integrate(w, xmin, xmax)
>> wwout = smooth(ww)
>> wwout = smooth(w)
>> wwout = interp_x(ww, xarray, optional inputs)
>> wwout = interp_y(ww, yarray, optional inputs)
>> wout = interp(ww, xarray, optional inputs)
>> wwout = unspike(ww)
>> wwout = unspike(w)
>> [wwout fitdata] = fit(ww, func, pin, optional)
>> [wout fitdata] = fit(w, func, pin, optional)
>> wwout = func_eval(ww, func, args)
>> wout = func_eval(w, func, args)


Derrivative Functions

First Derivative

These functions take the derivatives of datasets.

>> wwout = deriv1x(ww)
>> wwout = deriv1y(ww)
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_2d object
  • Calculates first derivative of the dataset in the x and y directions respectively
>> wout = deriv1(w)
  • Input is an IXTdataset_1d object
  • Output is an IXTdataset_1d object
  • Calculates the first derivative of the dataset in the x direction

Second Derivative

These functions take the second derivatives of datasets.

>> wwout = deriv2x(ww)
>> wwout = deriv2y(ww)
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_2d object
  • Calculates the second derivative of the dataset in the x and y directions respectively
>> wout = deriv2(w)
  • Input is an IXTdataset_1d object
  • Output is an IXTdataset_1d object
  • Calculates the second derivative of the dataset in the x direction.


Integral Functions

These functions integrate a dataset between given limits using the trapezoid method.

>> wwout = integrate_x(ww, xmin, xmax)
>> wout = integrate_y(ww, ymin, ymax)
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_1d object
  • Integral is evaluated between xmin and xmax in the x direction or ymin and ymax in the y direction
>> dout = integrate_xy(ww, xmin, xmax, ymin, ymax)
  • Input is an IXTdataset_2d object
  • Output is an IXTdatum object
  • Integral is evaluated between xmin and xmax in the x direction and ymin and ymax in the y direction
>> dout = integrate(w, xmin, xmax)
  • Input is an IXTdataset_2d object
  • Output is an IXTdatum object
  • Integral is evaluated between xmin and xmax

Smooth Functions

Smooth functions use an algorithm to smooth the data in a dataset to eliminate fluctuations.

>> wwout = smooth(ww, options)
>> wout = smooth(w, options)
  • Input may be IXTdataset_1d or IXTdataset_2d object
  • Output is the same object type as the input
  • Options allow the user to set the method of smoothing and parameters

Optional Inputs

The following syntaxes may be used

>> wout = smooth (w, filter)
>> wout = smooth (w, filter, size)
>> wout = smooth (w, filter, size, pars)
>> wout = smooth (w, filter, size, pars,'nonorm')
  • filter may be 'box', 'gaussian', or the handle to a function that defines how the smoothing should occur. Default: 'box'
  • size is a vector indicating the size of the convolution kernel. Default: [3,3]
  • pars are arguments required by filter if a function is given
  • 'nonorm' turns off the normalisation in the kernel shell if filter is a user defined function

See the Matlab online help for more information.

Interpolate Functions

These functions always return point datasets regardless of point or histogram input. It is analogous to the rebin functions


Unspike Functions

Fitting Functions

Function Evaluation