Catalog_Plot Module

This is the Catalog_Plot module. It is a library of wrappers around plotting functions in the plot_lib module, whose functions are named according to the classes whose data they help plot.

A library of wrappers which call plotting functions in the SSINS.plot_lib library. Each function is named according to the class that they plot.

SSINS.Catalog_Plot.INS_plot(INS, prefix, file_ext='pdf', xticks=None, yticks=None, vmin=None, vmax=None, ms_vmin=None, ms_vmax=None, data_cmap=None, xticklabels=None, yticklabels=None, aspect='auto', cbar_ticks=None, ms_cbar_ticks=None, cbar_label='', xlabel='', ylabel='', log=False, sig_event_plot=True, sig_event_vmax=None, sig_event_vmin=None, sig_log=True, sig_cmap=None, symlog=False, linthresh=1, sample_sig_vmin=None, sample_sig_vmax=None, title=None, title_x=0.5, title_y=0.98, use_extent=True, backend=None, extent_time_format='jd', convert_times=True)[source]

Plots an incoherent noise specturm and its mean-subtracted spectrum

Parameters
  • INS (INS) – The INS whose data is to be plotted. Required

  • prefix (str) – A prefix for the output filepath e.g. “/outdir/plots/obsid” Required

  • file_ext (str) – The type of image file to output

  • xticks (sequence) – The frequency channel indices to tick in INS waterfall plots.

  • yticks (sequence) – The time indices to tick in INS waterfall plots.

  • vmin (float) – The minimum of the colormap for the INS (non-mean-subtracted)

  • vmax (float) – The maximum of the colormap for the INS (non-mean-subtracted)

  • ms_vmin (float) – The minimum of the colormap for the mean-subtracted INS

  • ms_vmax (float) – The maximum of the colormap for the mean-subtracted INS

  • data_cmap (str) – The colormap for the non-mean-subtracted data

  • xticklabels (sequence of str) – The labels for the frequency ticks

  • yticklabels (sequence of str) – The labels for the time ticks

  • aspect (float or 'auto' or 'equal') – Set the aspect ratio of the waterfall plots.

  • title (str) – The title to use for the plot.

  • title_x (float) – x-coordinate of title center (in figure coordinates)

  • title_y (float) – y-coordinate of title center (in figure coordinates)

  • use_extent (bool) – Whether to use the INS metadata to make ticks on plots. Easier than manual adjustment and sufficient for most cases. Will put time in UTC and frequency in MHz.

  • backend (str) – Which matplotlib backend to use.

  • extent_time_format (str) – If ‘jd’, will use the time_array of the object. is ‘lst’, will use the lst_array of the object.

  • convert_times (bool) – Whether to convert times in extent. Will convert jd into UTC and lst into hourangles.

SSINS.Catalog_Plot.VDH_plot(SS, prefix, file_ext='pdf', xlabel='', xscale='linear', yscale='log', bins='auto', legend=True, ylim=None, density=False, pre_flag=True, post_flag=True, pre_model=True, post_model=True, error_sig=0, alpha=0.5, pre_label='', post_label='', pre_model_label='', post_model_label='', pre_color='orange', post_color='blue', pre_model_color='purple', post_model_color='green', font_size='medium', backend=None)[source]

Plots a histogram of the amplitudes of the visibility differences that result from sky subtraction.

Parameters
  • SS (SS) – An SS object whose data to plot Required

  • prefix (str) – A prefix for the output filepath of the plot e.g. /outdir/plots/obsid Required

  • file_ext (str) – The file extension for the plot. Determines the filetype of the image.

  • xlabel (str) – The label for the horizontal axis of the histogram

  • xscale ('linear' or 'log') – The scale of the horizontal axis

  • yscale ('linear' or 'log') – The scale of the vertical axis

  • bins – See numpy.histogram() documentation

  • legend (bool) – Whether or not to display a legend

  • ylim – Set the limits for the vertical axis

  • density (bool) – Report a probability density instead of counts

  • pre_flag (bool) – Plot the data without applying flags

  • post_flag (bool) – Plot the data after applying flags

  • pre_model (bool) – Plot a rayleigh-mixture fit made from data without applying flags

  • post_model (bool) – Plot a rayleigh-mixture fit made from data after applying flags

  • error_sig (float) – Plot error shades to specified number of sigma

  • alpha (float) – Specify alpha parameter for error shading

  • pre_label (str) – The legend label for amplitudes made from data without flags applied.

  • post_label (str) – The legend label for amplitudes made from data with flags applied.

  • pre_model_label (str) – The legend label for a model made from data without flags applied.

  • post_model_label (str) – The legend label for a model made from data with flags applied.

  • pre_color (str) – The color of the pre-flag histogram

  • post_color (str) – The color of the post-flag histogram

  • pre_model_color (str) – The color of the pre-flag model

  • post_model_color (str) – The color of the post-flag model

  • font_size (str) – The font size for all labels

  • backend (str) – Which matplotlib backend to use.