The /spectcl/fit domain provides access to the SpecTcl fit command. fit provides you with the ability to fit spectra to arbitrary functions. The built-in linear and gaussian fit types are provided and the programming manual describes how to extend the set of fits that are provided by this command.
The URL below:
http://host:port/spectcl/fit/create?name=fitname&spectrum=specname&low=lochan&high=hichan&type=fittype
Provides the capability to create new fits (fit create). The query parameters are as follows:
Name to be associated with the fit. This will be used when referring to the fit in the future.
The spectrum on which the fit is to be computed.
The channel coordinates over which the fit is to be computed. At present, the fit is done in channel coordinates.
The type of the fit to perform. The built in fit types are linear and gaussian which have pretty obvious meanings. Applications may extend this set of functions.
The URL
Provides the ability to update the set of fits whose names match the glob pattern in the query parameter pattern. As spectra accumulate, fit data will be outdated. This allows the fit information to be recomputed to match current data.
If the pattern is not provided it defaults to *
The URL
provides the ability to delete the fit object named after the contents of the query parameter name. Once deleted, the fit cannot be recovered.
URLs of the form
Allows you to get information about the fits whose names match the pattern query parameter. The pattern is treated as a glob pattern and, if not supplied, defaults to *
The result is a detail attribute that is an array. Each element of the array is an object that describes a matching fit. The atributes of these objects are:
Name of the fit.
Name of the spectrum the fit is computed on.
Type of the fit being computed.
Fit limits in spectrum channel coordinates.
An object that contains the fit parameters. The attributes of this object will depend on the actual fit type. Likely there will always be a chisquare attribute that describes the goodness of fit.