oph_gsl_histogram

Description

Behaviour

It estimates the empiric distribution of a sample of measures contained in the array with n bins.

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • output measure type: not used.
  • measure: input measure.
  • bin number: number of equally spaced intervals in which the interval [min,max] will be subdivided, with min and max representing the minimum and the maximum values in the array.
  • mode: type of requested output
    • ‘RANGES’: gets only interval ranges;
    • ‘FREQS’: gets only the values of each bin;
    • ‘ALL’: gets ranges and frequencies (default). In this case the format will be: <range[0],bin[0],range[1],bin[1],…,range[nbin-1],bin[nbin-1],range[nbin]>
  • flag: type of returned frequencies
    • ‘ABS’: gets the absolute frequencies for each bin (default);
    • ‘PDF’: gets the normalized frequencies with respect to the total number of samples, that is the pdf;
    • ‘CDF’: gets the normalized and cumulative frequencies with respect to the total number of samples, that is the cdf.

Return type

Binary-array.

Examples

Estimate the empiric distribution of a set of oph_double with 10 bins. Return ranges and absolute frequencies.

oph_gsl_histogram('OPH_DOUBLE','',measure,10)

Operation type

Reduce.

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
output measure type “oph_type” “yes”       “1” / “1”
measure “binary-array” “yes”       “1” / “1”
bin number “int” “yes”       “1” / “1”
mode “string” “no” “‘RANGES’|’FREQS|’ALL’” “‘ALL’”   “0” / “1”
flag “string” “no” “‘ABS’|’PDF’|’CDF’” “‘ABS’”   “0” / “1”