icecube.astro package¶
- icecube.astro.angular_distance(lon1, lat1, lon2, lat2)¶
calculate the angular distince along the great circle on the surface of a shpere between the points (lon1,`lat1`) and (lon2,`lat2`)
This function Works for equatorial coordinates with right ascension as longitude and declination as latitude. This function uses the Vincenty formula for calculating the distance.
- Parameters:
lon1 (array_like) – longitude of first point in radians
lat1 (array_like) – latitude of the first point in radians
lon2 (array_like) – longitude of second point in radians
lat2 (array_like) – latitude of the second point in radians
- icecube.astro.fractional_mjd(mjd_day, mjd_sec, mjd_ns)¶
This is a convenience function to convert the MJD information provided by the standard tableio booking to a fractional MJD.
- Parameters:
mjd_day (array_like) – Modified julian day (number of days since Nov 17, 1858)
mjd_sec (array_like) – Seconds since the start of the UTC day
mjd_ns (array_like) – number nanoseconds since the start of UTC second
- icecube.astro.tables_to_equa(particle_table, event_header_table)¶
Get the equatorial coordinates (right ascension and declination) of IceCubes Events from tables writen by tableio. Works with hdf5 tables written by hdfwriter and read by pytables, h5py, or pandas
- Parameters:
particle_table (table) – Table containing Zenith and Azimuth of particles
event_header_table (table) – Table containing the start time of the events
- Returns:
ra (array_like) – Right Ascension in J2000
dec (array_like) – Declination in J2000
Example
# using pytables f = tables.openFile('foo.hdf5') ra,dec= tables_to_equa(f.root.Particle, f.root.I3EventHeader) #using h5py f= h5py.File('foo.hdf5') ra,dec = tables_to_equa(f["Particle"], f["I3EventHeader"]) #using pandas p = pandas.read_hdf('foo.hdf5','Particle') h = pandas.read_hdf('foo.hdf5','I3EventHeader') ra,dec = tables_to_equa(p,h)