demist.nro45m.qlook module#

demist.nro45m.qlook.otf(*logs: PathLike[str] | str, analysis_ranges: Sequence[tuple[float | None, float | None]] = ((None, None),), arrays: Sequence[Literal['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16', 'A17', 'A18', 'A19', 'A20', 'A21', 'A22', 'A23', 'A24', 'A25', 'A26', 'A27', 'A28', 'A29', 'A30', 'A31', 'A32']] = ('A1',), chan_binning: int = 8, time_binning: int = 5, polyfit_degree: int = 1, polyfit_ranges: Sequence[tuple[float | None, float | None]] = ((None, None),), demist_iterations: int = 100, demist_threshold: float = 0.0001, lowrank_components: int = 5, lowrank_off_only: bool = False, lowrank_per_array: bool = True, lowrank_per_observation: bool = True, sparse_per_array: bool = False, sparse_per_observation: bool = False, sparse_prefilter: int = 3, sparse_threshold: float = 3.0, detailed: bool = False, figsize: tuple[float, float] = (10, 5), label: str | None = None, note: str | None = None, overwrite: bool = False, xlim: tuple[float | None, float | None] = (None, None), ylim: tuple[float | None, float | None] = (None, None), debug: bool = False, progress: bool = True) Path[source]#

Quick-look at a DE:MIST on-the-fly (OTF) mapping observation.

Parameters:
  • *logs – Path(s) to SAM45 log(s).

  • analysis_ranges – Frequency ranges in GHz to use for the whole analysis.

  • arrays – Array names to read (A1-A32).

  • chan_binning – Number of channels to bin together.

  • time_binning – Number of time samples to bin together.

  • polyfit_degree – Degree of polynomial for the PolyFit analysis.

  • polyfit_ranges – Frequency ranges in GHz to use for the PolyFit analysis.

  • demist_iterations – Number of maximum iterations for the DE:MIST analysis.

  • demist_threshold – Convergence threshold for the DE:MIST analysis.

  • lowrank_components – Number of components for low-rank model fitting.

  • lowrank_off_only – Whether to use only OFF samples for low-rank model fitting.

  • lowrank_per_array – Whether to fit low-rank model per array.

  • lowrank_per_observation – Whether to fit low-rank model per observation.

  • sparse_per_array – Whether to fit sparse model per array.

  • sparse_per_observation – Whether to fit sparse model per observation.

  • sparse_prefilter – Size of median filter for sparse model fitting.

  • sparse_threshold – Absolute S/N threshold for sparse model fitting.

  • detailed – Whether to save detailed information.

  • figsize – Size of the saved quick-look results.

  • label – Additional label for the file name of the saved quick-look results.

  • note – Additional note to add to the saved quick-look results.

  • overwrite – Whether to overwrite existing quick-look results.

  • xlim – X-axis limits for the saved quick-look results.

  • ylim – Y-axis limits for the saved quick-look results.

  • debug – Whether to display debug information.

  • progress – Whether to display progress bar.

Returns:

Absolute path to the saved quick-look results. If multiple logs are given, the first log’s name will be used for saving.

demist.nro45m.qlook.psw(*logs: PathLike[str] | str, analysis_ranges: Sequence[tuple[float | None, float | None]] = ((None, None),), arrays: Sequence[Literal['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16', 'A17', 'A18', 'A19', 'A20', 'A21', 'A22', 'A23', 'A24', 'A25', 'A26', 'A27', 'A28', 'A29', 'A30', 'A31', 'A32']] = ('A1',), chan_binning: int = 8, time_binning: int = 5, polyfit_degree: int = 1, polyfit_ranges: Sequence[tuple[float | None, float | None]] = ((None, None),), demist_iterations: int = 100, demist_threshold: float = 0.0001, lowrank_components: int = 5, lowrank_off_only: bool = False, lowrank_per_array: bool = True, lowrank_per_observation: bool = True, sparse_per_array: bool = False, sparse_per_observation: bool = False, sparse_prefilter: int = 3, sparse_threshold: float = 3.0, detailed: bool = False, figsize: tuple[float, float] = (10, 5), label: str | None = None, note: str | None = None, overwrite: bool = False, xlim: tuple[float | None, float | None] = (None, None), ylim: tuple[float | None, float | None] = (None, None), debug: bool = False, progress: bool = True, chan_flip: bool = False) Path[source]#

Quick-look at a DE:MIST position-switching (PSW) observation.

Parameters:
  • *logs – Path(s) to SAM45 log(s).

  • analysis_ranges – Frequency ranges in GHz to use for the whole analysis.

  • arrays – Array names to read (A1-A32).

  • chan_binning – Number of channels to bin together.

  • time_binning – Number of time samples to bin together.

  • polyfit_degree – Degree of polynomial for the PolyFit analysis.

  • polyfit_ranges – Frequency ranges in GHz to use for the PolyFit analysis.

  • demist_iterations – Number of maximum iterations for the DE:MIST analysis.

  • demist_threshold – Convergence threshold for the DE:MIST analysis.

  • lowrank_components – Number of components for low-rank model fitting.

  • lowrank_off_only – Whether to use only OFF samples for low-rank model fitting.

  • lowrank_per_array – Whether to fit low-rank model per array.

  • lowrank_per_observation – Whether to fit low-rank model per observation.

  • sparse_per_array – Whether to fit sparse model per array.

  • sparse_per_observation – Whether to fit sparse model per observation.

  • sparse_prefilter – Size of median filter for sparse model fitting.

  • sparse_threshold – Absolute S/N threshold for sparse model fitting.

  • detailed – Whether to save detailed information.

  • figsize – Size of the saved quick-look results.

  • label – Additional label for the file name of the saved quick-look results.

  • note – Additional note to add to the saved quick-look results.

  • overwrite – Whether to overwrite existing quick-look results.

  • xlim – X-axis limits for the saved quick-look results.

  • ylim – Y-axis limits for the saved quick-look results.

  • debug – Whether to display debug information.

  • progress – Whether to display progress bar.

  • chan_flip – Whether to flip the channel order. Note that this is a temporary workaround for reading SAM45 logs with flipped channel order and will be removed in future versions.

Returns:

Absolute path to the saved quick-look results. If multiple logs are given, the first log name will be used for saving.