subsetsphere             package:ssBase             R Documentation

_S_p_h_e_r_i_c_a_l _S_u_b_s_e_t _o_f _E_v_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Selects events within a specified spherical selection criteria
     (i.e. a given  radius from a hypocentral location), from a given
     catalogue. Note that 'subset.sphere' is deprecated; it conflicts
     with the generic function 'subset'. Change to 'subsetsphere'; it
     has the same arguments.

_U_s_a_g_e:

     subsetsphere(x, centrelat=0, centrelong=0, centredepth=0, minradius=0,
                  maxradius=Inf, minmag=-Inf, maxmag=Inf, minday=-Inf,
                  maxday=Inf, radius=6371, report.count=TRUE, na.rm=TRUE, ...)

     #   Deprecated Usage:
     subset.sphere(x, centrelat=0, centrelong=0, centredepth=0, minradius=0,
                   maxradius=Inf, minmag=-Inf, maxmag=Inf, minday=-Inf,
                   maxday=Inf, radius=6371, report.count=TRUE, na.rm=TRUE, ...)

_A_r_g_u_m_e_n_t_s:

       x: catalogue name. 

centrelat: latitude of the sphere centre. Specified as degrees north
          (positive) or south  (negative) of the equator (-90 to 90). 

centrelong: longitude of the sphere centre. Specified as degrees east
          of Greenwich (0 to  360). 

centredepth: depth of the sphere centre. 

minradius: arclength radius (km) within which events are not to be
          selected. 

maxradius: arclength radius (km) within which events to be selected. 

  minmag: minimum magnitude. 

  maxmag: maximum magnitude. 

  minday: the number of days (and fractions) after 00:00 hrs on 1
          January 1970 from which events are required. See Details. 

  maxday: the number of days (and fractions) after 1 January 1970
          denoting the upper bound  of the time interval containing the
          required events. See Details. 

  radius: the assumed radius of the earth. Default is 6371 km. 

report.count: Boolean. Report the number of events referred to by the
          new subset. Default is 'TRUE'. 

   na.rm: Boolean. Determines whether those events with missing values
          of the subsetting variables should be excluded, see Details. 
          Default is 'TRUE'. 

     ...: other options for restricting Catalogue data. These must take
          the form  'option == value', where 'option' is a component of
          the specified  catalogue. 

_D_e_t_a_i_l_s:

     The subsetting is based on the catalogue variables 'latitude',
     'longitude', 'depth', 'magnitude' and 'time'. The default settings
     for each of these variables is to take all events. The function
     only works through each of the "min" and "max" values for
     'magnitude' and 'time' _included in your function call_. Those
     arguments _not explicitly listed will have no effect_. For each
     event in the correct magnitude-time window, its distance from the
     centre of the sphere is calculated. A logical vector is
     constructed with the same length as the number of events in the
     catalogue, and indicates whether a given event satisfies the
     subsetting criteria. From this, the vector of indices of the
     required events is created.

     Historical events often have missing values, particularly the
     magnitude and depth. Consider the situation where 'minmag=6'. The
     logical vector within the function will contain 'TRUE''s and
     'FALSE''s for those events that satisfy or not satisfy this
     condition, respectively. However, for those historical events with
     a missing magnitude or depth ('NA'), the elements in the logical
     vector will also be 'NA'. The argument 'na.rm' determines whether
     these events should be removed ('TRUE') or included ('FALSE') in
     the subset. The default setting is to remove such events, though
     in the context of large historical events, it would be more
     sensible to include them, i.e. 'na.rm=FALSE'.

     The arguments 'minday' and 'maxday' represent the boundary
     _points_ of the time interval, and can represent fractions of
     days. For example, 00:00 hrs on 1 Jan 1970 is represented as
     'minday=0', whereas 18:00 hrs on 2 Jan 1970 is represented as
     'minday=1.75'. Similarly, 18:32:24 hrs on 30 Sept 1990 could be
     specified as 'minday = julian(9,30,1990) + 18/24 + 32/(24*60) +
     24/(24*60*60)'. Note that 'maxday = julian(1,1,1990)' represents
     the _point_ 00:00 hrs on 1 Jan 1990, and therefore will not
     include events on 1 Jan 1990 after midnight.

_V_a_l_u_e:

     Returns an object of type list with class '"subset"'. All optional
      arguments above, except radius, are included as elements within
     the list. Other  components within the list are:

 indices: an array of indices for events in catalogue 'x' satisfying
          the selection  criteria. 

 catname: catalogue name. 

    type: type of subset, set to '"Spherical"'. 

_S_e_e _A_l_s_o:

     'subsetcircle', 'subsetpolygon',  'subsetrect', 'print.subset', 
     'summary.subset'

_E_x_a_m_p_l_e_s:

     #   Select events from the NZ55 catalogue with hypocentre no more
     #   than 50kms from Wellington, but at least 20kms from Wellington.
     data(NZ55)

     b <- subsetsphere(NZ55, centrelat=-41.3, centrelong=174.8, 
                        maxradius=100, minradius=20, minmag=2)
     summary(b)

