AHELP for CIAO 4.13 Sherpa v1

# histogram1d

Context: visualization

## Synopsis

Create a 1D histogram from a sequence of samples.

## Syntax

histogram1d(x, x_lo, x_hi)

x - sequence of numbers
x_lo - sequence of numbers
x_hi - sequence of numbers

## Description

See the `numpy.histogram` routine for a version with more options.

## Examples

### Example 1

A simple example, calculating the histogram of 1000 values randomly distributed over [0, 1).

>>> x = np.random.random(1000)
>>> edges = np.arange(0, 1.1, 0.1)
>>> xlo = edges[:-1]
>>> xhi = edges[1:]
>>> y = histogram1d(x, xlo, xhi)

### Example 2

Given a list of samples ( vals ), bin them up so that they can be used as the dependent axis (the value to be fitted) in a Sherpa data set:

>>> dataspace1d(0.1, 10, 0.1)
>>> (lo, hi) = get_indep()
>>> n = histogram1d(vals, lo, hi)
>>> set_dep(n)

### PARAMETERS

The parameters for this function are:

Parameter Definition
x The array of samples
x_lo The lower-edges of each bin.
x_hi The upper-edges of each bin, which must be the same size as x_lo .

### Return value

The return value from this function is:

y -- The number of samples in each histogram bin defined by the x_lo and x_hi arrays.

## Bugs

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

data
copy_data, dataspace1d, dataspace2d, datastack, delete_data, fake, get_axes, get_bkg_chisqr_plot, get_bkg_delchi_plot, get_bkg_fit_plot, get_bkg_model_plot, get_bkg_plot, get_bkg_ratio_plot, get_bkg_resid_plot, get_bkg_source_plot, get_counts, get_data, get_data_contour, get_data_contour_prefs, get_data_image, get_data_plot, get_data_plot_prefs, get_dep, get_dims, get_error, get_quality, get_specresp, get_staterror, get_syserror, group, group_adapt, group_adapt_snr, group_bins, group_counts, group_snr, group_width, load_ascii, load_data, load_grouping, load_quality, set_data, set_quality, ungroup, unpack_ascii, unpack_data
filtering