Commit 03aa111b6ceb9e21bfd2a5a089a4a2ef155881cf
1 parent
6f76f0b7
Update reference manual documentation.
Showing
3 changed files
with
52 additions
and
20 deletions
doc/source/reference_manual/ctbutterfly.rst
| @@ -9,16 +9,31 @@ Computes butterfly diagram for a power law model. | @@ -9,16 +9,31 @@ Computes butterfly diagram for a power law model. | ||
| 9 | Synopsis | 9 | Synopsis |
| 10 | -------- | 10 | -------- |
| 11 | 11 | ||
| 12 | -Calculates the confidence band of a power law model, taking into account the | ||
| 13 | -covariance matrix resulting from a maximum likelihood fit. The tool derives | ||
| 14 | -the envelope of all power law models whose prefactor and spectral index fall | ||
| 15 | -within the error ellipse that is associated with the covariance of the | ||
| 16 | -parameters. It outputs an ASCII file in column separated value (CSV) format | ||
| 17 | -containing the results. Each row in the result file corresponds to an energy. | ||
| 18 | -The columns give the energy in MeV, the fitted intensity in ph/cm2/s/MeV, | ||
| 19 | -and the minimum and maximum intensity that envelope the power law model | ||
| 20 | -with a given confidence (by default a confidence level of 68% is used, but | ||
| 21 | -the level can be adjusted using the ``confidence`` parameter). | 12 | +This tool calculates a butterfly diagram for a specific source with power law |
| 13 | +spectral model. The butterfly diagram is the envelope of all power law models | ||
| 14 | +that are within a given confidence limit compatible with the data. By default | ||
| 15 | +a confidence level of 68% is used, but the level can be adjusted using the | ||
| 16 | +hidden ``confidence`` parameter. ctbutterfly computes this envelope by | ||
| 17 | +evaluating for each energy the minimum and maximum intensity of all power law | ||
| 18 | +models that fall within the error ellipse of the prefactor and index parameters. | ||
| 19 | +The error ellipse is derived from the covariance matrix of a maximum likelihood | ||
| 20 | +fit. | ||
| 21 | + | ||
| 22 | +ctbutterfly assumes that the input model (parameter ``inmodel``) has been | ||
| 23 | +adjusted using :doc:`ctlike` to the data, but if this is not the case you | ||
| 24 | +can request a maximum likelihood fit by setting the hidden parameter ``fit=yes``. | ||
| 25 | + | ||
| 26 | +ctbutterfly writes the butterfly diagram into an ASCII file with 4 columns | ||
| 27 | +separated by a whitespace. Each row in the result file corresponds to a specific | ||
| 28 | +energy. The meaning of the columns are: | ||
| 29 | + | ||
| 30 | +* Energy in MeV | ||
| 31 | +* Fitted intensity for that energy in ph/cm2/s/MeV | ||
| 32 | +* Minimum intensity for that energy in ph/cm2/s/MeV | ||
| 33 | +* Maximum intensity for that energy in ph/cm2/s/MeV | ||
| 34 | + | ||
| 35 | +The butterfly diagram can be displayed using the ``show_butterfly.py`` script | ||
| 36 | +in the example folder. | ||
| 22 | 37 | ||
| 23 | 38 | ||
| 24 | General parameters | 39 | General parameters |
| @@ -54,8 +69,9 @@ General parameters | @@ -54,8 +69,9 @@ General parameters | ||
| 54 | ``outfile [file]`` | 69 | ``outfile [file]`` |
| 55 | Output butterfly ASCII file name. | 70 | Output butterfly ASCII file name. |
| 56 | 71 | ||
| 57 | -``(refit = no) [boolean]`` | ||
| 58 | - Performs refitting of solution ignoring any provided covariance matrix. | 72 | +``(fit = no) [boolean]`` |
| 73 | + Performs maximum likelihood fitting of input model ignoring any provided | ||
| 74 | + covariance matrix. | ||
| 59 | 75 | ||
| 60 | ``(confidence = 0.68) [real]`` | 76 | ``(confidence = 0.68) [real]`` |
| 61 | Confidence level for error computation. | 77 | Confidence level for error computation. |
| @@ -110,5 +126,6 @@ Standard parameters | @@ -110,5 +126,6 @@ Standard parameters | ||
| 110 | Related tools | 126 | Related tools |
| 111 | ------------- | 127 | ------------- |
| 112 | 128 | ||
| 129 | +:doc:`ctlike` | ||
| 113 | :ref:`ctulimit` | 130 | :ref:`ctulimit` |
| 114 | :ref:`cterror` | 131 | :ref:`cterror` |
doc/source/reference_manual/ctulimit.rst
| 1 | .. _ctulimit: | 1 | .. _ctulimit: |
| 2 | 2 | ||
| 3 | ctulimit | 3 | ctulimit |
| 4 | -=========== | 4 | +======== |
| 5 | 5 | ||
| 6 | -Computes upper limit for a specific sky model component. | 6 | +Computes upper flux limit for a source model. |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | Synopsis | 9 | Synopsis |
| 10 | -------- | 10 | -------- |
| 11 | 11 | ||
| 12 | -Computes the upper limit flux of a given source. | 12 | +This tools computes the upper flux limit for a specific source model. Except |
| 13 | +of the node function, all spectral models are supported. Starting from the | ||
| 14 | +maximum likelihood model parameters, the tool finds the model flux that leads | ||
| 15 | +to a decrease of the likelihood that corresponds to a given confidence level. | ||
| 16 | +By default a confidence level of 95% is used, but the level can be adjusted | ||
| 17 | +using the hidden ``confidence`` parameter. | ||
| 18 | + | ||
| 19 | +ctulimit writes the differential upper flux limit at a given reference | ||
| 20 | +energy (specified by the hidden parameter ``eref``) and the integrated | ||
| 21 | +upper flux limit (specified by the hidden parameters ``emin`` and ``emax``) | ||
| 22 | +into the log file. | ||
| 23 | + | ||
| 13 | 24 | ||
| 14 | 25 | ||
| 15 | General parameters | 26 | General parameters |
| @@ -53,11 +64,14 @@ General parameters | @@ -53,11 +64,14 @@ General parameters | ||
| 53 | Maximum boundary to start searching for upper limit value. | 64 | Maximum boundary to start searching for upper limit value. |
| 54 | Number of standard deviations above best fit value | 65 | Number of standard deviations above best fit value |
| 55 | 66 | ||
| 67 | +``(eref = 1.0) [real])`` | ||
| 68 | + Reference energy for differential limit (in TeV). | ||
| 69 | + | ||
| 56 | ``(emin = 1.0) [real])`` | 70 | ``(emin = 1.0) [real])`` |
| 57 | - Minimum energy of flux limits (in TeV). | 71 | + Minimum energy for integral flux limit (in TeV). |
| 58 | 72 | ||
| 59 | ``(emax = 100) [real]`` | 73 | ``(emax = 100) [real]`` |
| 60 | - Maximum energy of flux limits (in TeV). | 74 | + Maximum energy for integral flux limit (in TeV). |
| 61 | 75 | ||
| 62 | ``(tol = 1e-5) [real]`` | 76 | ``(tol = 1e-5) [real]`` |
| 63 | Computation tolerance. | 77 | Computation tolerance. |
| @@ -98,4 +112,5 @@ Standard parameters | @@ -98,4 +112,5 @@ Standard parameters | ||
| 98 | Related tools | 112 | Related tools |
| 99 | ------------- | 113 | ------------- |
| 100 | 114 | ||
| 115 | +:ref:`ctlike` | ||
| 101 | :ref:`cterror` | 116 | :ref:`cterror` |
| 102 | \ No newline at end of file | 117 | \ No newline at end of file |
src/ctulimit/ctulimit.par
| @@ -33,9 +33,9 @@ edisp, b, h, no,,, "Apply energy dispersion?" | @@ -33,9 +33,9 @@ edisp, b, h, no,,, "Apply energy dispersion?" | ||
| 33 | confidence, r, h, 0.95,0.0,1.0, "Confidence level" | 33 | confidence, r, h, 0.95,0.0,1.0, "Confidence level" |
| 34 | sigma_min, r, h, 0.0,,, "Start minimum value (multiple sigmas above fit value)" | 34 | sigma_min, r, h, 0.0,,, "Start minimum value (multiple sigmas above fit value)" |
| 35 | sigma_max, r, h, 10.0,,, "Start maximum value (multiple sigmas above fit value)" | 35 | sigma_max, r, h, 10.0,,, "Start maximum value (multiple sigmas above fit value)" |
| 36 | -eref, r, h, 1.0,,, "Reference energy for differential limits (TeV)" | ||
| 37 | -emin, r, h, 1.0,,, "Minimum energy for flux limits (TeV)" | ||
| 38 | -emax, r, h, 100.0,,, "Maximum energy for flux limits (TeV)" | 36 | +eref, r, h, 1.0,,, "Reference energy for differential limit (TeV)" |
| 37 | +emin, r, h, 1.0,,, "Minimum energy for integral flux limit (TeV)" | ||
| 38 | +emax, r, h, 100.0,,, "Maximum energy for integral flux limit (TeV)" | ||
| 39 | tol, r, h, 1e-5,,, "Computation tolerance" | 39 | tol, r, h, 1e-5,,, "Computation tolerance" |
| 40 | max_iter, i, h, 50,,, "Maximum number of iterations" | 40 | max_iter, i, h, 50,,, "Maximum number of iterations" |
| 41 | 41 |