Last modified: December 2024

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/cos.html
Jump to: · Example · ATTRIBUTES · Notes · Bugs · See Also


AHELP for CIAO 4.17 Sherpa

cos

Context: models

Synopsis

One-dimensional cosine function.

Syntax

cos

Example

>>> create_model_component("cos", "mdl")
>>> print(mdl)

Create a component of the cos model and display its default parameters. The output is:

mdl
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   mdl.period   thawed            1        1e-10           10           
   mdl.offset   thawed            0            0  3.40282e+38           
   mdl.ampl     thawed            1        1e-05  3.40282e+38           

ATTRIBUTES

The attributes for this object are:

Attribute Definition
period The period of the cosine, in units of the independent axis.
offset The offset (related to the phase) of the cosine.
ampl The amplitude of the cosine.

Notes

The functional form of the model for points is:

f(x) = ampl * cos (2 * pi * (x - offset) / period)

and for an integrated grid it is the integral of this over the bin.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

models
sin, tan