mahos.meas.podmr.SPODMRIO#

class mahos.meas.spodmr.SPODMRIO(logger=None)#
save_data(filename: str, data: SPODMRData, params: dict | None = None, note: str = '') bool#

Save data to filename. return True on success.

load_data(filename: str) SPODMRData | None#

Load data from filename. return None if load is failed.

export_data(filename: str, data: SPODMRData | list[mahos.msgs.spodmr_msgs.SPODMRData], params: dict | None = None) bool#

Export the data to text or image files.

Parameters:
  • filename – supported extensions: text: .txt and .csv. image: .png, .pdf, and .eps.

  • data – single data or list of data

  • params.plot (dict|None) – plot parameter. if given, reanalyze data.

  • params.fit (dict|None) – fit parameter. if given, refit data.

  • params.fft (bool) – perform FFT on data.

  • params.offset (list[float]) – offset along y-axis

  • params.xmin (float) – lower limit of x-axis

  • params.xmax (float) – upper limit of x-axis

  • params.ymin (float) – lower limit of y-axis

  • params.ymax (float) – upper limit of y-axis

  • params.figsize (tuple[float, float]) – matplotlib figure size (w, h)

  • params.fontsize (float) – matplotlib fontsize

  • params.dpi (float) – matplotlib dpi

  • params.label (list[str]) – matplotlib labels

  • params.color_fit (list[str]) – matplotlib colors for fit data

  • params.color0 (list[str]) – matplotlib colors for data0

  • params.color1 (list[str]) – matplotlib colors for data1

  • params.linewidth (list[float]) – matplotlib linewidths for data

  • params.linewidth_fit (list[float]) – matplotlib linewidths for fit data

  • params.marker0 (list[str]) – matplotlib markers for data0

  • params.marker1 (list[str]) – matplotlib markers for data1

  • params.show_fit (bool) – set True to plot fit data

  • params.show_std (bool) – set True to plot estimated std. dev.

  • params.legend (str|None) – legend location (best|upper left|…). None to disable legend.