# multi_cube
```
|=====================================================================|
| _ _ _ _ |
| _ __ ___ _ _ | || |_ (_) ___ _ _ | |__ ___ |
| | '_ ` _ \ | | | || || __|| | _____ / __|| | | || '_ \ / _ \ |
| | | | | | || |_| || || |_ | ||_____|| (__ | |_| || |_) || __/ |
| |_| |_| |_| \__,_||_| \__||_| \___| \__,_||_.__/ \___| |
| |
| |
|=====================================================================|
```
A convenience tool that orchestrates the parallel generation of FITS cubes from a continuum subtracted ms file.
Requirements
------------
This tool is designed to leverage [Slurm Workload Manager](https://slurm.schedmd.com/documentation.html) for efficient job scheduling, allowing for simultaneous submission of multiple jobs. Development and testing were conducted using Python 3.12.1 on the [ILIFU](https://www.ilifu.ac.za/) research cloud infrastructure, hosted by [IDIA](https://idia.ac.za/). To ensure proper environment setup, dependencies are listed in requirements.txt."
Installation
------------
### Setting up an environment
It is recommended to use a [virtual environment](https://docs.python.org/3/library/venv.html) to ensure isolation and proper dependency management when installing and running `multi_cube`. To set up the environment:
```
python3 -m venv .venv
source .venv/bin/activate
```
This will create and activate a virtual environment in your current directory.
Installing from PyPI
Once your environment is set up, you can install multi_cube directly from PyPI:
```
pip install multi-cube
```
This will install the latest version of the package along with its dependencies.
Installing from Source
If you’d like to work with the source code directly, clone the repository and install it locally. First, clone the repository into your desired directory:
```
cd <desired_directory>
git clone https://<yourtoken>@github.com/LeonMtshweni/multi_cube.git
cd multi_cube/
```
### Usage
------------
`multi_cube` is a tool designed to generate FITS cubes from a continuum-subtracted measurement set. Below are the steps to configure and run the tool.
#### 1. Generate a Default Configuration File
To get started, you need to generate a default configuration file. This file contains all the necessary parameters and paths that `multi_cube` uses during execution. Run the following command to generate the config file in your current working directory:
```
multi_cube –get-config
```
This will create a file named `multi_cube_config.yml` in the current directory. The configuration file contains several parameters, including paths, imaging options, and Slurm resource allocation settings.
#### 2. Customize the Configuration File
Once the configuration file is generated, you need to customise it according to your data and computing environment. Open the `multi_cube_config.yml` file in a text editor and modify the following key parameters:
- **Paths**: Set the correct paths to your MS files, output directories, and any containers (e.g., WSClean or CASA).
- **WSClean Settings**: Customize WSClean parameters such as pixel scale, image size, data column, and the number of channels to image.
- **Slurm Settings**: Set the required Slurm resource allocation, including `ntasks`, `cpus`, `mem`, and job `partition`.
Make sure you have a calibrated, continuum-subtracted MS file before proceeding.
#### 3. Run the Workflow
After configuring the settings, run the workflow by executing the `multi_cube` tool from the command line. The tool will split your MS file into user-defined bandwidth segments, image each segment, and then stack the images to create a data cube.
```
multi_cube –config multi_cube_config.yml
```
This command will:
- Split the MS file into smaller chunks.
- Image each chunk using WSClean or CASA.
- Stack the resulting images into a single FITS cube.
#### 4. Monitor the Workflow
The tool is designed to leverage the Slurm workload manager for efficient job scheduling. You can monitor the jobs using standard Slurm commands, such as:
```
squeue -u <your_username>
```
Raw data
{
"_id": null,
"home_page": "https://github.com/LeonMtshweni/multi-cube",
"name": "multi-cube",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Leon K.B. Mtshweni",
"author_email": "leonkb.m.astro@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/38/4f/99da95c93e09b2440f3b7e14e76848cf97c7d10b722a49c6bf7c04057915/multi_cube-0.5.2.tar.gz",
"platform": null,
"description": "# multi_cube\n```\n |=====================================================================|\n | _ _ _ _ |\n | _ __ ___ _ _ | || |_ (_) ___ _ _ | |__ ___ |\n | | '_ ` _ \\ | | | || || __|| | _____ / __|| | | || '_ \\ / _ \\ |\n | | | | | | || |_| || || |_ | ||_____|| (__ | |_| || |_) || __/ |\n | |_| |_| |_| \\__,_||_| \\__||_| \\___| \\__,_||_.__/ \\___| |\n | |\n | |\n |=====================================================================|\n```\n\nA convenience tool that orchestrates the parallel generation of FITS cubes from a continuum subtracted ms file.\n\nRequirements\n------------\nThis tool is designed to leverage [Slurm Workload Manager](https://slurm.schedmd.com/documentation.html) for efficient job scheduling, allowing for simultaneous submission of multiple jobs. Development and testing were conducted using Python 3.12.1 on the [ILIFU](https://www.ilifu.ac.za/) research cloud infrastructure, hosted by [IDIA](https://idia.ac.za/). To ensure proper environment setup, dependencies are listed in requirements.txt.\"\n\nInstallation\n------------\n\n### Setting up an environment\n\nIt is recommended to use a [virtual environment](https://docs.python.org/3/library/venv.html) to ensure isolation and proper dependency management when installing and running `multi_cube`. To set up the environment:\n\n```\npython3 -m venv .venv\nsource .venv/bin/activate\n```\nThis will create and activate a virtual environment in your current directory.\n\nInstalling from PyPI\n\nOnce your environment is set up, you can install multi_cube directly from PyPI:\n\n```\npip install multi-cube\n```\nThis will install the latest version of the package along with its dependencies.\n\nInstalling from Source\n\nIf you\u2019d like to work with the source code directly, clone the repository and install it locally. First, clone the repository into your desired directory:\n\n```\ncd <desired_directory>\ngit clone https://<yourtoken>@github.com/LeonMtshweni/multi_cube.git\ncd multi_cube/\n```\n\n### Usage\n------------\n\n`multi_cube` is a tool designed to generate FITS cubes from a continuum-subtracted measurement set. Below are the steps to configure and run the tool.\n\n#### 1. Generate a Default Configuration File\n\nTo get started, you need to generate a default configuration file. This file contains all the necessary parameters and paths that `multi_cube` uses during execution. Run the following command to generate the config file in your current working directory:\n\n```\nmulti_cube \u2013get-config\n```\nThis will create a file named `multi_cube_config.yml` in the current directory. The configuration file contains several parameters, including paths, imaging options, and Slurm resource allocation settings.\n\n#### 2. Customize the Configuration File\n\nOnce the configuration file is generated, you need to customise it according to your data and computing environment. Open the `multi_cube_config.yml` file in a text editor and modify the following key parameters:\n\n- **Paths**: Set the correct paths to your MS files, output directories, and any containers (e.g., WSClean or CASA).\n- **WSClean Settings**: Customize WSClean parameters such as pixel scale, image size, data column, and the number of channels to image.\n- **Slurm Settings**: Set the required Slurm resource allocation, including `ntasks`, `cpus`, `mem`, and job `partition`.\n\nMake sure you have a calibrated, continuum-subtracted MS file before proceeding.\n\n#### 3. Run the Workflow\n\nAfter configuring the settings, run the workflow by executing the `multi_cube` tool from the command line. The tool will split your MS file into user-defined bandwidth segments, image each segment, and then stack the images to create a data cube.\n\n```\nmulti_cube \u2013config multi_cube_config.yml\n```\nThis command will:\n- Split the MS file into smaller chunks.\n- Image each chunk using WSClean or CASA.\n- Stack the resulting images into a single FITS cube.\n\n#### 4. Monitor the Workflow\n\nThe tool is designed to leverage the Slurm workload manager for efficient job scheduling. You can monitor the jobs using standard Slurm commands, such as:\n```\nsqueue -u <your_username>\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A convenience tool that orchestrates the parallel generation of FITS cubes from a continuum-subtracted ms file.",
"version": "0.5.2",
"project_urls": {
"Homepage": "https://github.com/LeonMtshweni/multi-cube"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "26a51fb3d438967d962fe1b826825b0285e49c491c7bfbf6dc5957e3bfa8d842",
"md5": "4c409cdb032dd45bcf50224f7b1ec5fa",
"sha256": "2baa1d41f0358b3677c546166e5f6f6ebe069228045676a41f868f700f8392b9"
},
"downloads": -1,
"filename": "multi_cube-0.5.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c409cdb032dd45bcf50224f7b1ec5fa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14782,
"upload_time": "2024-10-20T20:47:35",
"upload_time_iso_8601": "2024-10-20T20:47:35.472991Z",
"url": "https://files.pythonhosted.org/packages/26/a5/1fb3d438967d962fe1b826825b0285e49c491c7bfbf6dc5957e3bfa8d842/multi_cube-0.5.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "384f99da95c93e09b2440f3b7e14e76848cf97c7d10b722a49c6bf7c04057915",
"md5": "dda5740b7b1a281095de3dd3e5c0340f",
"sha256": "e4de92422f406c6681c8546f85a064204e2872187d0f93d4adce918668905200"
},
"downloads": -1,
"filename": "multi_cube-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "dda5740b7b1a281095de3dd3e5c0340f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13394,
"upload_time": "2024-10-20T20:47:37",
"upload_time_iso_8601": "2024-10-20T20:47:37.427504Z",
"url": "https://files.pythonhosted.org/packages/38/4f/99da95c93e09b2440f3b7e14e76848cf97c7d10b722a49c6bf7c04057915/multi_cube-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-20 20:47:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LeonMtshweni",
"github_project": "multi-cube",
"github_not_found": true,
"lcname": "multi-cube"
}