galileoQC.qualitycontrol.psdChannelDiff¶
Plot power spectral density of the difference between two channels.
Author: Mark Helm Dransfield
Created: ca 2023
License: CC BY-SA
Module Contents¶
Functions¶
Plot the PSD (log-log Sqrt(Power) from welch method) of channel1 - channel2 in each flightLine. |
|
Plot the PSD of channel averaged over the flightLines. |
|
Plot the FFT of filchan / rawchan averaged over the flightLines. |
|
Return the gain vector corresponding to the freq vector
for a cosine taper low-pass filter with centre frequency
corresponding to |
|
Converts period (sec) to distance by multiplying by the GLOBAL
mean speed (m/s).
For use in creating a secondary wavelength axis for |
|
Converts distance (metres) to period(sec) by dividing by the GLOBAL
mean speed (m/s).
For use in creating a secondary wavelength axis for |
|
Returns the sample frequency of the data in the project group. Simply calculated as the inverse of the difference of the first two sample times in the first line. Relies on the TimeChannel attribute being set. |
|
Returns the mean line speed of the data in the line (which is in the given project group). Instantaneous speeds are calculated for each sample along the line and their average value returned. Relies on the XChaneel, YChannel and TimeChannel attributes being set. |
Data¶
API¶
- galileoQC.qualitycontrol.psdChannelDiff.groupName¶
None
- galileoQC.qualitycontrol.psdChannelDiff.psdChannelDiff(whizzFile, channel1, channel2, flightLines=[])¶
Plot the PSD (log-log Sqrt(Power) from welch method) of channel1 - channel2 in each flightLine.
Parameters
whizzFile : String or pathlib Path
Name of a HDF5 Whizz file, including path and extension.
flightLines : String List, optional
A list of flightline, e.g. ['1000110.0']. Default is all lines in whizzFile.
channel1 : String
The name of a channel.
channel2 : String
The name of a channel.
Returns
None.
- galileoQC.qualitycontrol.psdChannelDiff.psdChannel(whizzFile, channel, flightLines=[], shortestPeriod=0.0, minlinelenkm=None, verbose=False)¶
Plot the PSD of channel averaged over the flightLines.
Parameters
whizzFile : String or pathlib Path
Name of a HDF5 Whizz file, including path and extension.
channel : String
The name of the channel to be analysed.
flightLines : String List, optional
A list of flightline, e.g. ['1000110.0']. Default is all lines in whizzFile.
shortestPeriod : Float, optional
The left hand limit of the x (period) axis of the plot in seconds. Default is 0.0.
minlinelenkm : Float, optional
Flightlines shorter than this number of kilometres will be ignored in the calculation. Default is None.
verbose : Bool, optional
If True, more information is printed. Default is False.
Returns
None.
- galileoQC.qualitycontrol.psdChannelDiff.psdChannelGain(whizzFile, rawchan, filchan, flightLines=[], nominalPeriod=0.0, shortestPeriod=0.0, minlinelenkm=None, verbose=False)¶
Plot the FFT of filchan / rawchan averaged over the flightLines.
Parameters
whizzFile : String or pathlib Path
Name of a HDF5 Whizz file, including path and extension.
rawchan : String
The name of the channel to be the denominator in the gain.
filchan : String
The name of the channel to be the numerator in the gain.
flightLines : String List, optional
A list of flightline, e.g. ['1000110.0']. Default is all lines in whizzFile.
nominalPeriod : Float, optional
At this period in seconds, a vertical red line is drawn. Default (0.0) is to not draw the line.
shortestPeriod : Float, optional
The left hand limit of the x (period) axis of the plot in seconds. Default is 0.0.
minlinelenkm : Float, optional
Flightlines shorter than this number of kilometres will be ignored in the calculation. Default is None.
verbose : Bool, optional
If True, more information is printed. Default is False.
Returns
None.
- galileoQC.qualitycontrol.psdChannelDiff._costaper(freq, nominalPeriod)¶
Return the gain vector corresponding to the freq vector for a cosine taper low-pass filter with centre frequency corresponding to
nominalperiodand pass frequency 2/3rd the 50% pass frequency; cut frequency 4/3rds.
- galileoQC.qualitycontrol.psdChannelDiff._period_to_dist(p)¶
Converts period (sec) to distance by multiplying by the GLOBAL mean speed (m/s). For use in creating a secondary wavelength axis for
psdChannelDiff.Parameters
p : Float
The period in seconds.
Returns
Float. The distance in metres.
- galileoQC.qualitycontrol.psdChannelDiff._dist_to_period(x)¶
Converts distance (metres) to period(sec) by dividing by the GLOBAL mean speed (m/s). For use in creating a secondary wavelength axis for
psdChannelDiff.Parameters
x : Float
The distance in metres.
Returns
Float. The period in seconds.
- galileoQC.qualitycontrol.psdChannelDiff._time_frequency(group)¶
Returns the sample frequency of the data in the project group. Simply calculated as the inverse of the difference of the first two sample times in the first line. Relies on the TimeChannel attribute being set.
Parameters
group : HDF5 group
Must be the project group (top level of hierarchy in whizz File).
Returns
Float. The sample frequency in Hz.
- galileoQC.qualitycontrol.psdChannelDiff._mean_line_speed(group, line)¶
Returns the mean line speed of the data in the line (which is in the given project group). Instantaneous speeds are calculated for each sample along the line and their average value returned. Relies on the XChaneel, YChannel and TimeChannel attributes being set.
Parameters
group : HDF5 group
Must be the project group (top level of hierarchy in whizz File).
line : String
The line identifier.
Returns
Float. The mean speed along the line.