icecube.radcube.python_tools module¶
- icecube.radcube.python_tools.GetChunkSNR(trace, No_Chunks)¶
Compute the SNR using chunk method, where the trace is divided in to n chunks (choose n such that one chunk should not be smaller that 200ns, which is the average length of radio signal in the trace in the freq band of 100 MHz to 350 MHz). The peak is just the peak in the trace and RMS is calculated for all n chunks and their median is used to compute the SNR,
- Parameters:
trace (Python list or AntennaTimeSeries) – Traces whose SNR value will be calculated
No_Chunks (Int) – No of chuks the trace will be divided in
- Returns:
Peak of the given trace
- Return type:
- Returns:
Median RMS of chunks
- Return type:
- Returns:
SNR value of the given trace
- Return type:
- icecube.radcube.python_tools.PythonListToRadTrace(steps, x, y=None, z=None)¶
Inverse function of RadTraceToPythonList. Converts python iterable objects into the corresponding waveform type.
- Parameters:
steps (numpy.array, list) – Time or freq value for each of the steps. Must be equidistant.
x (numpy.array, list) – Amplitudes for each step
y (numpy.array, list, optional) – Y-axis amplitudes for each step (if wanting 1D waveform, set to None)
z (numpy.array, list, optional) – Z-axis amplitudes for each step (if wanting 1D waveform, set to None)
- Returns:
An I3AntennaWaveform object of the given dimension. If y values are set the waveform is assumed to be a 3D one. If the values are complex-valued then the waveform is assumed to be a spectrum rather than a time series.
- Return type:
icecube.dataclasses.AntennaTimeSeries
,icecube.dataclasses.AntennaSpectrum
,icecube.dataclasses.EFieldTimeSeries
,icecube.dataclasses.EFieldSpectrum
- icecube.radcube.python_tools.RadTraceDimensionSwap(xTrace, yTrace=None, zTrace=None)¶
Converts between the dimentionality of the given waveform type. If given 3 waveforms, will try to combine then into a 3D waveform. If only one is given, will try to split into 3 waveforms.
- Parameters:
xTrace – A 1D or 3D object that should be combined/split
yTrace – A 1D waveform that will be combined. If splitting, set None
zTrace – A 1D waveform that will be combined. If splitting, set None
- Returns:
A waveform (time series or spectrum) of a different dimentionality
- icecube.radcube.python_tools.RadTraceToPythonList(trace)¶
Converts an I3AntennaWaveformX into python lists. The waveform can be a time series or a spectrum. In the former case, the “steps” are the time values from t0 to tmax. In the latter, they are frequencies corresponding to each bin.
- Parameters:
trace (
icecube.dataclasses.AntennaTimeSeries
,icecube.dataclasses.AntennaSpectrum
,icecube.dataclasses.EFieldTimeSeries
,icecube.dataclasses.EFieldSpectrum
) – An I3AntennaWaveform of dimention 1 or 3- Returns:
If a 1D waveform is given, then (steps, amps) are returned and if a 3D waveform is given then (steps, x, y, z) is returned
- Return type:
numpy.array, numpy.array, (numpy.array, numpy.array)