API Reference

class Almaqso(target: list[str] | str = '', band: list[int] | int | str = '', cycle: str = '', project_code: list[str] | str = '', frequency_ghz: float | tuple[float, float] | None = None, work_dir: str = './', casapath: str = 'casa')

Bases: object

Public class for ALMAQSO. Users can call this class and its methods to use ALMAQSO’s functionality.

You can specify multiple bands and cycles with using , or ; and ~. For instance, “3,6” (3 and 6), “3;6” (3 and 6), “3~5” (3 to 5), “3,7-9” (3, 7 to 9).

Parameters:
  • target (list[str] | str) – Target source name. If empty list or empty string is given, all sources is targeted.

  • band (list[int] | int | str) – Band number to work with. Default is “” (all bands).

  • cycle (list[int] | int | str) – project name to work with. Default is “” (all cycles). If project_code is given, this parameter is ignored.

  • project_code (list[str] | str) – ALMA project code to work with. Default is “” (all projects). If given, cycle parameter is ignored.

  • frequency_ghz (float | tuple[float, float] | None) – A single frequency in GHz or a tuple of (min_frequency, max_frequency) in GHz. Data covering the specified frequency range completely will be targeted. Default is None.

  • work_dir (str, optional) – Working directory. Default is ‘./’.

  • casapath (str, optional) – Path to the CASA executable. Default is ‘casa’.

analysis_calc_spectrum() None

Perform the spectrum analysis.

This method only works if cube FITS images are exported and self.sort_images() has been called.

close() None

Close the log listener and clean up resources.

process(n_parallel: int = 1, skip_previous_successful: bool = False, do_tclean: bool = False, tclean_mode: list[str] = ['mfs'], tclean_weightings: tuple[str, str] = ('natural', ''), do_selfcal: bool = False, kw_selfcal: dict[str, object] = {}, remove_casa_images: bool = False, remove_asdm: bool = False, remove_intermediate: bool = False) None

Download and process ALMA data.

Parameters:
  • n_parallel (int) – The number of the parallel execution.

  • do_tclean (bool) – Perform tclean. Default is False.

  • skip_previous_successful (bool) – Skip processing for previously successful tasks. Default is False.

  • tclean_mode (list[str]) – List of imaging specmodes for tclean. “mfs” creates a MFS image, “mfs_spw” creates MFS images for each spw, and “cube” creates a cube image. Default is [“mfs”].

  • tclean_weightings (tuple[str, str]) – Weighting scheme and robust parameter for tclean. Second element is the robust parameter for briggs weighting. Default is (“natural”, “”).

  • do_selfcal (bool) – Perform self-calibration. Default is False.

  • kw_selfcal (dict[str, object]) – Parameters for the self-calibration and tclean task.

  • remove_casa_images (bool) – Remove the CASA images after processing. This option only works if do_tclean is True. Default is False.

  • remove_asdm (bool) – Remove the ASDM files after processing. Default is False.

  • remove_intermediate (bool) – Remove the intermediate files after processing. Log of CASA will be retained. Default is False.

Returns:

None