Skip to content
Snippets Groups Projects
Commit 726846cb authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

upd signatures

parent 3bdc5578
No related branches found
No related tags found
2 merge requests!1847rebase on latest r21,!1827Upd GenericScale signatures in webdoc
Pipeline #107728 passed
...@@ -72,22 +72,20 @@ start : Low edge of first bin ...@@ -72,22 +72,20 @@ start : Low edge of first bin
end : Upper edge of last bin end : Upper edge of last bin
""" """
GenericScale(name, nbins, bin_boundaries) GenericScale(name, bin_boundaries)
""" """
Constructs an axis with variable bin size Constructs an axis with variable bin size
name : The name of the axis name : The name of the axis
nbins : Number of axis bins bin_boundaries : Array of even size containing lower and upper edges for each bin.
bin_boundaries : Array of size nbins+1 containing low-edges for each bin and upper edge of last bin.
""" """
``` ```
In the following example we create a `SphericalDetector` with two axes: an x-axis with variable bin size and a y-axis with fixed bin size. The code and resulting detector plane are shown below. In the following example we create a `SphericalDetector` with two axes: an x-axis with variable bin size and a y-axis with fixed bin size. The code and resulting detector plane are shown below.
```python ```python
nxbins = 13 xedges = [-1.0*deg, -0.7*deg, -0.7*deg, -0.5*deg, -0.5*deg, -0.3*deg, -0.3*deg, -0.2*deg, -0.2*deg, -0.1*deg, -0.1*deg, -0.025*deg, -0.025*deg, 0.025*deg, 0.025*deg, 0.1*deg, 0.1*deg, 0.2*deg, 0.2*deg, 0.3*deg, 0.3*deg, 0.5*deg, 0.5*deg, 0.7*deg, 0.7*deg, 1.0*deg]
xedges = [-1.0*deg, -0.7*deg, -0.5*deg, -0.3*deg, -0.2*deg, -0.1*deg, -0.025*deg, 0.025*deg, 0.1*deg, 0.2*deg, 0.3*deg, 0.5*deg, 0.7*deg, 1.0*deg] xaxis = GenericScale("my-x-axis", xedges)
xaxis = GenericScale("my-x-axis", nxbins, xedges)
yaxis = EquiDivision("my-y-axis", 10, 0.0, 10.) yaxis = EquiDivision("my-y-axis", 10, 0.0, 10.)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment