opt.bin: Divides data in blocks of optimal bin sizes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/opt.bin.R

Description

Divides given rate or magnitude data into blocks of optimal bin sizes, for specified shower, period of days, minimum and maximum bin sizes, number of meteors.

Usage

1
opt.bin(data,date.start,date.end,shw,kmin=0.01,kmax=1,num)

Arguments

data

data frame consisting of visual meteor rate data.

date.start

character vector or factor specifying start date, given in "%Y-%m-%d %H:%M:%S" format (UTC timezone).

date.end

character vector or factor specifying end date, given in "%Y-%m-%d %H:%M:%S" format (UTC timezone).

shw

character string consisting of three capital letters which represent meteor shower code.

kmin

numeric vector specifying minimum bin size, in degrees of solar longitude. By default, it is equal to 0.01. Minimum accepted value is 0.001.

kmax

numeric vector specifying maximum bin size, in degrees of solar longitude. By default, it is equal to 1. Maximum accepted values is 5.

num

numeric vector specifying total number of meteors per interval. Minimum accepted value is 1.

Details

Data is divided into blocks using optimal bin size algorithm. For each block of data, it searches for an optimal bin size between minimum bin size kmin and maximum bin size kmax with total number of meteors per bin num. If there are not enough meteors, a maximum bin size is used. For further calculations, only observing intervals with lengths smaller or equal to optimal bin are used.

Value

List containing blocks of rate or magnitude data of optimal bin sizes.

Author(s)

Kristina Veljkovic

See Also

zhr,pop.index2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Divide 2015 Orionids rate data into blocks of optimal sizes.
## Consider time period around the maximum, 21th to 25th October, 
## min bin size 0.16 degrees (4 hours), max bin size 1 degree, 
## number of meteors equals 100

## First select rate data for Orionids activity from 21th to 25th October, 
## limiting magnitudes above 5, radiant elevation above 20 degrees, 
## percentage of clouds below 20
ori2015<-filter(rate2015,date.start="2015-10-21",date.end="2015-10-25",shw="ORI",
P.up=20,mag.low=5,mag.up=8,h.low=20)
opt.bin(ori2015,date.start="2015-10-21",date.end="2015-10-25",shw="ORI",
kmin=0.16,kmax=1,num=100)

MetFns documentation built on May 1, 2019, 6:28 p.m.