overplotScatterPlotInAllSkyGridChart: Overplots positions in some coordinate system on top of...

Description Usage Arguments Author(s) See Also Examples

View source: R/SPADAR.R

Description

A function to overplot points represented some astronomical coordinate system on top of all-sky charts in any coordinate system and projection. The function will perform the convertion of the data coordinate system to match the chart coordinate system, but this must be specified by the user. Any spherical projection supported by the mapproj package is supported (but only the Aitoff, Mollweide and Mercator projections are routinely tested).

Usage

1
2
3
overplotScatterPlotInAllSkyGridChart(x, y, pointcol = rgb(0, 0, 0, 0.5), 
pointsize = 0.5, dataCoordSys = "equatorial", mainGrid = "equatorial", 
projname = "aitoff", projparam = NULL, projorient = NULL, ...)

Arguments

x

A vector with the data in degrees for the first coordinate (Right Ascention, for data in the Equatorial system, Ecliptic Longitude for the Ecliptic system or Galactic Longitude for the Galactic System).

y

A vector with the data in degrees for the second coordinate (Declination, for data in the Equatorial system, Ecliptic Latitude for the Ecliptic system or Galactic Latitude for the Galactic System).

pointcol

A scalar or a vector with, the same size of the x and y vectors, containing the color of the points.

pointsize

A scalar or a vector with, the same size of the x and y vectors, containing the sizes of the points.

dataCoordSys

String. The name of the coordinate system of the x and y vector. It can take the following values: "equatorial", "ecliptic" or "galactic". It defaults to "equatorial".

mainGrid

String. The name of the the main coordinate system of the plot. It can take the following values: "equatorial", "ecliptic" or "galactic". It defaults to "equatorial".

projname

A string with the spherical projection of the plot. It can take as argument any projection supported by the mapproj package, but only "aitoff", "mollweide" and "mercator" are tested automatically. It defaults to "aitoff".

projparam

Parameters to configure the projection. It defaults to "NULL", as they are not needed for "aitoff".

projorient

The orientation of the projection.

...

Additional parameters to be passed to points.

Author(s)

Alberto Krone-Martins

See Also

createAllSkyScatterPlotChart, createAllSkyGridChart

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Creates a grid with the Galactic Coordinate system.

createAllSkyGridChart(mainGrid="galactic", eqDraw=FALSE, eclDraw=FALSE, galDraq=TRUE, 
  galCol=rgb(0,0,0,0.5), galLty=1)

# Overplots the Pierre Auger Observatory 2014 public event list (arXiv:1411.6111).

data(uhecrauger2014)

overplotScatterPlotInAllSkyGridChart(uhecrauger2014$RA, uhecrauger2014$DEC, 
  mainGrid="galactic", dataCoordSys="equatorial", pointcol="black", pch=19, 
  pointsize=uhecrauger2014$Eev/max(uhecrauger2014$Eev))

Example output

Loading required package: mapproj
Loading required package: maps
Loading required package: RCEIM

SPADAR documentation built on May 1, 2019, 9:22 p.m.