Skip to contents

Return a sample of magnitudes drawn from the GR distribution

Usage

sample_GR_magnitudes(n, beta.p, M0)

Arguments

n

Number of events in the sample.

beta.p

Related to the b-value via b ln(10).

M0

Minimum magnitude for the sample.

Value

A list of magnitudes of length n drawn from a GR distribution.

Examples

sample_GR_magnitudes(n = 100, beta.p = log(10), M0 = 2.5)
#>   [1] 2.641108 2.733679 2.690702 2.732390 3.093376 2.885278 2.834955 2.831712
#>   [9] 2.881138 2.745436 2.666638 2.533294 2.512652 3.907868 3.413571 2.513232
#>  [17] 2.938514 2.580574 3.799198 2.800923 2.678095 2.644705 2.691124 2.846251
#>  [25] 2.677616 2.918720 2.597626 3.013097 3.449386 3.452523 2.545537 3.222535
#>  [33] 2.527223 2.573967 3.312138 2.513201 2.882604 2.946106 2.691387 2.870281
#>  [41] 3.686735 3.877686 2.772845 2.869731 3.309863 2.745123 2.682769 2.641635
#>  [49] 3.487309 2.611922 3.178103 3.033842 3.554593 2.707969 2.659756 2.780513
#>  [57] 2.883300 2.579577 3.000783 2.526763 5.428831 2.566678 3.903795 2.902639
#>  [65] 2.679304 3.748411 2.833095 2.584127 2.561456 2.886492 2.757133 2.884965
#>  [73] 2.685042 3.065287 2.614231 2.560224 3.319946 3.068199 3.305287 2.765612
#>  [81] 3.153599 2.764685 3.165020 3.459589 3.408912 2.558500 2.997802 2.642056
#>  [89] 2.850902 2.807333 3.355423 2.807528 2.693089 2.539174 2.715142 2.784156
#>  [97] 2.533720 2.898945 2.614498 3.017350