Previous topic

pycrtools.tasks.minibeamformer

Next topic

pycrtools.tasks.polarization

This Page

pycrtools.tasks.plotfootprint

gatherresults(filefilter, pol, excludelist, ...) This function returns a dictionary with selected results from file in the subdirectories (/pol?/*/) of the filedir that are needed for the plotfootprint task.
obtainvalue(par, key) This function returns the value from a parameter dict or a default value if the key does not exist
plotfootprint([ws, parfile]) Description:

A tool to plot the footprint of a cosmic ray event with the superterp as background.

Module author: Sander ter Veen <s.terveen@astro.ru.nl>

pycrtools.tasks.plotfootprint.gatherresults(filefilter, pol, excludelist, plotlora, goodonly, loradir)

This function returns a dictionary with selected results from file in the subdirectories (/pol?/*/) of the filedir that are needed for the plotfootprint task.

pycrtools.tasks.plotfootprint.obtainvalue(par, key)

This function returns the value from a parameter dict or a default value if the key does not exist

class pycrtools.tasks.plotfootprint.plotfootprint(ws=None, parfile=None, **kwargs)

Description:

Plots the footprint of the air shower on the ground. It will automatically assign colors to the arrivaltimes and scale the size with the signal power. The footprint is only suitable for stations that have seen a signal. To see also other stations set goodonly = False in the options. But note that then neither colors nor size will make any sense. It can also draw the LORA detector either in static or also with time information (plotlora = True, loracolor=”time”). You need to have LORA data available on your computer. Without the LORA data only the shower geometry can be shown.

Usage:

See example.

Example:

::
polarization=0 filefilter=”/data/VHECR/LORAtriggered/LORA/results/VHECR_LORA-20110716T094509.665Z/” loradir = “/data/VHECR/LORAtriggered/LORA/” crfootprint=cr.trun(“plotfootprint”,filefilter=filefilter,pol=polarization,loradir=loradir)

Input parameters

antid
hArray containing strings of antenna ids
arrivaltime
hArray of dimension [NAnt] with the values of relative peak arrival time. This gives the colors of the plot
colormap [default value: “autumn” ]
colormap to use for LOFAR timing
event_id
String formatted time of event
excludelist [default value: None ]
List with stations not to take into account when making the footprint
figure [default value: None ]
No startplot
filefilter [default value: None ]
Obtains results from subdirectories of these files (from results.py)
filetype [default value: “png” ]
extension/type of output file
generate_html [default value: False ]
Default output to altair webserver
goodonly [default value: True ]
Enables drawing of only stations that have been reconstructed as good (status OK)
lofarshape [default value: “o” ]
Shape of LOFAR antennas. e.g. ‘o’ for circle, ‘^’ for triangle
loraarrivaltimes
hArray with arrival time of LORA events
loracolor [default value: “#730909” ]
Color used for LORA plots. If set to ‘time’ uses the arrival time
loracore
Shower core position in hArray(float(X,Y,0))
loradir [default value: “/data/VHECR/LORAtriggered/LORA/” ]
Directory where LORA data files are stored
loradirection
Shower direction hArray(float,(Azimuth,Elevation)). Azimuth defined from North Eastwards. Elevation defined from horizon up
lorapositions
3-dim hArray with transposed Cartesian coordinates of the antenna positions (x0,x1,...,y0,y1...,z0,z1,....)
lorapower
hArray with power of the LORA events
lorashape [default value: “p” ]
Shape of LORA detectors. e.g. ‘s’ for square, ‘p’ for pentagram, ‘h’ for hexagon
names
hArray of dimension [NAnt] with the names or IDs of the antennas
newfigure [default value: True ]
Create a new figure for plotting for each new instance of the task.
normalize_colors [default value: False ]
Normalize the colors to run from 0-1.
normalize_sizes [default value: True ]
Normalize the sizes to run from 0-1.
plot_finish
Function to be called after each plot to determine whether to pause or not (see ::func::plotfinish)
plot_name [default value: “footprint” ]
Extra name to be added to plot filename.
plotlayout [default value: True ]
Plot the LOFAR layout of the stations as the background
plotlegend [default value: False ]
Plot a legend
plotlora [default value: True ]
Plot the LORA data when positions are present
plotlorashower [default value: True ]
Plot LORA shower data, when stored in LOFAR results
plotnames [default value: False ]
plot names of dipoles
pol [default value: 0 ]
0 or 1 for even or odd polarization
positions
hArray of dimension [NAnt,3] with Cartesian coordinates of the antenna positions (x0,y0,z0,...)
positionsT
hArray with transposed Cartesian coordinates of the antenna positions (x0,x1,...,y0,y1...,z0,z1,....)
power
hArray of dimension [NAnt] with the values for the power of each lofar antenna. This gives the sizes of the plot

results

save_images [default value: False ]
Enable if images should be saved to disk in default folder
size [default value: 300 ]
Size of largest point.
sizes_max [default value: None ]
If set, then use this as the maximum scale for the sizes, when normalizing.
sizes_min [default value: None ]
If set, then use this as the minimum scale for the sizes, when normalizing and plotting.
title
Title for the plot (e.g., event or filename)
usecolorbar [default value: True ]
print the colorbar?

Output parameters

NAnt
Number of antennas.