plot_utils

gwas_tools.utils.plot_utils.plot_imf(pred, pred_name, imf_ia, imf_ia_name, gps, samp_freq, title, plot_name, event_time='center', figsize=None)

Plot of the instantaneous amplitude and predictor.

Parameters:
  • pred (numpy array) – predictor

  • pred_name (str) – predictor name

  • imf_ia (numpy array) – imf instantaneous amplitude

  • imf_ia_name (str) – imf instantaneous amplitude name

  • gps (int) – gps of the event

  • samp_freq (float) – sampling frequency

  • title (str) – plot title

  • plot_name (str) – plot name (full path)

  • event_time (str) – position of the event’s gps in the analysed period. Can be start, center, or end (default : center)

  • figsize (tuple[int], optional) – figure size (default : None)

gwas_tools.utils.plot_utils.plot_omegagram_download(pred, pred_name, target_name, gps, seconds, plot_name, norm=False, harmonics=None, event_time='center', figsize=None)

Omegagram plot with download of the target channel.

Parameters:
  • pred (numpy array) – predictor

  • pred_name (str) – name of the predictor channel

  • target_name (str) – name of the channel from which compute the omegagram

  • gps (int) – gps of the event

  • seconds (int) – how many seconds to plot

  • plot_name (str) – plot name (full path)

  • norm (bool, optional) – normalize predictor to 10 Hz (default : False)

  • harmonics (list[int], optional) – predictor harmonics to be plotted (default : [1, 2, 3, 4, 5])

  • event_time (str) – position of the event’s gps in the analysed period. Can be start, center, or end (default : center)

  • figsize (tuple[int], optional) – figure size

gwas_tools.utils.plot_utils.plot_omegagram(pred, pred_name, target, target_name, gps, seconds, fs, plot_name, norm=False, harmonics=None, event_time='center', figsize=None)

Omegagram plot.

Parameters:
  • pred (numpy array) – predictor

  • pred_name (str) – name of the predictor channel

  • target (numpy array) – channel from which compute the omegagram

  • target_name (str) – name of the target channel

  • gps (int) – gps of the event

  • seconds (int) – how many seconds to plot

  • fs (int) – sampling frequency

  • plot_name (str) – plot name (full path)

  • norm (bool, optional) – normalize predictor to 10 Hz (default : False)

  • harmonics (list[int], optional) – predictor harmonics to be plotted (default : [1, 2, 3, 4, 5])

  • event_time (str) – position of the event’s gps in the analysed period. Can be start, center, or end (default : center)

  • figsize (tuple[int], optional) – figure size

gwas_tools.utils.plot_utils.plot_imfs(folders, imfs_to_plot=None, imf_thr=-1.0, save_ext='png', figsize=None)

Plot imfs in the given folders.

Parameters:
  • folders (list[str]) – paths to the files needed for the plots

  • imfs_to_plot (list[int]) – imfs to plot (default : None, i.e. all the imfs)

  • imf_thr (float, optional) – correlation value above which to plot imfs (default : -1.0)

  • save_ext (str, optional) – plots extension (default : png)

  • figsize (tuple[int], optional) – figure size

gwas_tools.utils.plot_utils.plot_omegagrams(folders, imfs_to_plot=None, omegagram_thr=-1.0, harmonics=None, save_ext='png', figsize=None)

Plot omegagrams in the given folders.

Parameters:
  • folders (list[str]) – paths to the files needed for the plots

  • imfs_to_plot (list[int]) – imfs to consider for combos (default : None, i.e. all the imfs)

  • omegagram_thr (float, optional) – correlation value above which to plot omegagrams (default : -1.0)

  • harmonics (list[int]) – harmonics for the culprit (default : [1, 2, 3, 4, 5])

  • save_ext (str, optional) – plots extension (default : png)

  • figsize (tuple[int], optional) – figure size

gwas_tools.utils.plot_utils.plot_combinations(folders, imfs_to_plot=None, save_ext='png', imf_thr=-1.0, figsize=None)

Plot of the sum of more instantaneous amplitudes and the predictor.

Parameters:
  • folders (list[str]) – paths to the files needed for the plots

  • imfs_to_plot (list[int]) – imfs to consider for combos (default : None, i.e. all the imfs)

  • imf_thr (float, optional) – correlation value above which to plot the combo (default : -1.0)

  • save_ext (str, optional) – plots extension (default : png)

  • figsize (tuple[int], optional) – figure size

gwas_tools.utils.plot_utils.plot_seismic_data(folders_path, ifo, combo=True, save_ext='png')

Plot seismic channels along with the correlations time series.

Parameters:
  • folders_path (str) – path to the folder containing the analysis folders

  • ifo (str) – interferometer id

  • combo (bool, optional) – if True, plot correlations of the combo, if False plot the correlation of the single imf (default : True)

  • save_ext (str, optional) – plots extension (default : png)

gwas_tools.utils.plot_utils.plot_summaries(res_table, imf_thr=-1.0, save_ext='png', figsize=None)

Summary plots for the daily analysis.

Parameters:
  • res_table (str) – path to the summary table

  • imf_thr (float, optional) – correlation value above which to consider a line in the summary table (default : -1.0)

  • save_ext (str, optional) – plots extension (default : png)

  • figsize (tuple[int], optional) – figure size