{"id":15444381,"url":"https://github.com/miguelcarcamov/gpuvmem","last_synced_at":"2025-04-14T19:07:31.214Z","repository":{"id":43862258,"uuid":"53015721","full_name":"miguelcarcamov/gpuvmem","owner":"miguelcarcamov","description":"GPU Framework for Radio Astronomical Image Synthesis","archived":false,"fork":false,"pushed_at":"2024-11-12T18:27:11.000Z","size":527158,"stargazers_count":28,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T19:06:53.656Z","etag":null,"topics":["alma","astronomical-algorithms","astronomical-images","astrophysics","complex-systems","cuda","gpu","gpu-acceleration","gpu-computing","image-synthesis","maximum-entropy","multi-gpu","optimization-methods","radio-imaging","radio-interferometry","radioastronomy","ska","vla"],"latest_commit_sha":null,"homepage":"https://doi.org/10.1016/j.ascom.2017.11.003","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelcarcamov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-03T02:58:46.000Z","updated_at":"2024-11-12T14:59:20.000Z","dependencies_parsed_at":"2024-07-30T22:53:35.444Z","dependency_job_id":null,"html_url":"https://github.com/miguelcarcamov/gpuvmem","commit_stats":{"total_commits":707,"total_committers":6,"mean_commits":"117.83333333333333","dds":"0.16124469589816126","last_synced_commit":"d425505eb989924d21d2f5c4a247c01d569f2070"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fgpuvmem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fgpuvmem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fgpuvmem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fgpuvmem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelcarcamov","download_url":"https://codeload.github.com/miguelcarcamov/gpuvmem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943456,"owners_count":21186958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alma","astronomical-algorithms","astronomical-images","astrophysics","complex-systems","cuda","gpu","gpu-acceleration","gpu-computing","image-synthesis","maximum-entropy","multi-gpu","optimization-methods","radio-imaging","radio-interferometry","radioastronomy","ska","vla"],"created_at":"2024-10-01T19:40:36.023Z","updated_at":"2025-04-14T19:07:31.190Z","avatar_url":"https://github.com/miguelcarcamov.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n   \u003cimg src=\"https://github.com/miguelcarcamov/gpuvmem/wiki/images/logos/logo2.png\" height=\"400\"\u003e\n\u003c/h1\u003e\n\n# Papers and documentation\n\n- Paper: \u003chttps://doi.org/10.1016/j.ascom.2017.11.003\u003e\n- Wiki: \u003chttps://github.com/miguelcarcamov/gpuvmem/wiki\u003e\n\n# Citing\n\nIf you use GPUVMEM for your research please do not forget to cite Cárcamo et al.\n\n   ```tex\n   @article{CARCAMO201816,\n   title = \"Multi-GPU maximum entropy image synthesis for radio astronomy\",\n   journal = \"Astronomy and Computing\",\n   volume = \"22\",\n   pages = \"16 - 27\",\n   year = \"2018\",\n   issn = \"2213-1337\",\n   doi = \"https://doi.org/10.1016/j.ascom.2017.11.003\",\n   url = \"http://www.sciencedirect.com/science/article/pii/S2213133717300094\",\n   author = \"M. Cárcamo and P.E. Román and S. Casassus and V. Moral and F.R. Rannou\",\n   keywords = \"Maximum entropy, GPU, ALMA, Inverse problem, Radio interferometry, Image synthesis\"\n   }\n   ```\n\n# Installation\n\n1. Install git-lfs\n\n    a. `sudo apt-get install git-lfs`\n\n2. Install casacore latest stable version v3.2.1\n\n    a. `git clone --single-branch --branch v3.2.1 https://github.com/casacore/casacore.git`\n\n    b. `sudo apt-get install -y build-essential cmake gfortran g++ libncurses5-dev libreadline-dev flex bison libblas-dev liblapacke-dev libcfitsio-dev wcslib-dev libhdf5-serial-dev libfftw3-dev python-numpy libboost-python-dev libpython2.7-dev`\n\n    b. `cd casacore`\n\n    c. `mkdir build`\n\n    d. `cd build`\n\n    e. `cmake -DUSE_FFTW3=ON -DUSE_OPENMP=ON -DUSE_HDF5=ON -DUSE_THREADS=ON ..`\n\n    f. `make -j`\n\n    g. `sudo make install`\n\n3. Install Boost\n\n    a. `sudo apt-get -y install libboost-all-dev`\n\n4. Install cfitsio\n\n    a. `sudo apt-get -y install libcfitsio-dev`\n\n5. Download or clone gpuvmem.\n\n6. To compile GPUVMEM you will need:\n\n   - cfitsio - Usually the package is called `libcfitsio-dev`.\n   - cmake \u003e= 3.8\n   - git-lfs - `git-lfs`\n   - casacore \u003e= v3.1.2 (\u003chttps://github.com/casacore/casacore\u003e - branch v3.1.2. please make sure you have installed the github version, Ubuntu package doesn't work well since doesn't have the `put()` function).\n   - CUDA 9, 9.1, 9.2, 10.0 and 11.0. Remember to add binaries and libraries to the **PATH** and **LD_LIBRARY_PATH** environment variables, respectively.\n   - OpenMP\n\n7. To run the cmake tests you need to run `git lfs install` if not installled and then `git-lfs pull` to pull the measurement sets and model input FITS images.\n\n# Installation using Docker\n\n   ```bash\n   docker pull ghcr.io/miguelcarcamov/gpuvmem:latest\n   ```\n\n# Compiling\n\n   ```bash\n   cd gpuvmem\n   mkdir build\n   cd build\n   cmake ..\n   make -j\n   ```\n\n## Now antenna configurations are read directly from the MS file\n\n# Usage\n\nCreate your FITS model input astrometry data on the header, typically we use the resulting dirty image from CASA's tclean.\n\n# Use GPUVMEM\n\nUsage: `./bin/gpuvmem [options]`\n\n   ```text\n      -O --output_image [default: mod_out.fits]\n          Name of the output visibility file/s (separated by a comma)\n      -e --eta [default: -1]\n          Variable that controls the minimum image value in the entropy prior\n      -T --threshold [default: 0]\n          Threshold to calculate the spectral index image above a certain number of\n          sigmas in I_nu_0\n      -p --path [default: mem/]\n          Path to save FITS images. With last trail / included. (Example ./../mem/)\n      -G --gpus [default: 0]\n          Index of the GPU/s you are going to use separated by a comma\n      -R --robust_parameter [default: 2]\n          Robust weighting parameter when gridding. -2.0 for uniform weighting, 2.0\n          for natural weighting and 0.0 for a tradeoff between these two.\n      -X --blockSizeX [default: -1]\n          GPU block X Size for image/Fourier plane (Needs to be pow of 2)\n      -Y --blockSizeY [default: -1]\n          GPU block Y Size for image/Fourier plane (Needs to be pow of 2)\n      -V --blockSizeV [default: -1]\n          GPU block V Size for visibilities (Needs to be pow of 2)\n      -t --iterations [default: 500]\n          Number of iterations for optimization\n      -g --gridding [default: 0]\n          Use gridded visibilities. This is done in CPU (Need to select the CPU thre\n          ads that will grid the input visibilities)\n      -z --initial_values [default: NULL]\n          Initial values for image/s\n      -Z --regularization_factors [default: NULL]\n          Regularization factors for each regularization (separated by a comma)\n\n    Flags:\n      -v --verbose [default: (unset)]\n          Shows information through all the execution\n      -x --nopositivity [default: (unset)]\n          Runs gpuvmem with no positivity restrictions on the images\n      -a --apply-noise [default: (unset)]\n          Applies random gaussian noise to visibilities\n      -P --print-images [default: (unset)]\n          Prints images per iteration\n      -E --print-errors [default: (unset)]\n          Prints final error maps\n      -s --save_modelcolumn [default: (unset)]\n          Saves the model visibilities on the model column of the input MS\n      -M --use-radius-mask [default: (unset)]\n          Use a mask based on a radius instead of the noise estimation\n\n    Help:\n      -h --help [default: (unset)]\n          Shows this help\n      -w --warranty [default: (unset)]\n          Shows warranty details\n      -c --copyright [default: (unset)]\n          Shows copyright conditions\n\n    Mandatory:\n      -i --input [default: NULL]\n          Name of the input visibility file/s (separated by a comma)\n      -o --output [default: NULL]\n          Name of the output visibility file/s (separated by a comma)\n      -m --model_input [default: mod_in_0.fits]\n          FITS file including a complete header for astrometry\n\n    Optional:\n      -n --noise [default: -1]\n          Noise factor parameter\n      -N --noise_cut [default: 10]\n          Noise-cut Parameter\n      -F --ref_frequency [default: -1]\n          Reference frequency in Hz (if alpha is not zero). It will be calculated fr\n          om the measurement set if not set\n      -r --random_sampling [default: 1]\n          Percentage of data used when random sampling\n      -f --output_file [default: NULL]\n          Output file where final objective function values are saved\n   ```\n\n# Framework usage\n\n- The normal flow of the program starts by creating a synthesizer, creating an optimizer, creating an objective function, and adding the terms to the objective function. It is also possible to add a convolution kernel for gridding and a weighting scheme.\n\n- Objects can be created by their respective factory or by their constructors.\n\n- The configuration of each objective function term is parameterized by the penalty factor (-Z), the index of the image from where data will be calculated and the index of the image where results are going to be applied.\n\n# TO RESTORE YOUR IMAGE PLEASE SEE CARCAMO ET AL. 2018 FOR MORE INFORMATION\n\n- This will return a restored image: A convolution of the model image with the CLEAN beam + residuals (Jy/beam)\n- Residuals (Jy/beam)\n- The script file is on the scripts folder and it is named `restore.py`\n\nRestoring usage:\n\n   ```bash\n   python restore.py residual_folder.ms mem_model.fits restored_output 2.0\n   ```\n\nThe last parameter, is the robust parameter that you want to use to clean the residuals.\n\n# CONTRIBUTORS\n\n- Miguel Cárcamo - The University of Manchester - miguel.carcamo@postgrad.manchester.ac.uk\n- Nicolás Muñoz - Universidad de Santiago de Chile\n- Fernando Rannou - Universidad de Santiago de Chile\n- Pablo Román - Universidad de Santiago de Chile\n- Simón Casassus - Universidad de Chile\n- Axel Osses - Universidad de Chile\n- Victor Moral - Universidad de Chile\n\n# CONTRIBUTION AND BUG REPORTS\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1\\. Go to '...'\n2\\. Click on '....'\n3\\. Scroll down to '....'\n4\\. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n\n- OS: [e.g. Ubuntu 16.04]\n- CUDA version [e.g. 9]\n- gpuvmem Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n\n# FEATURE REQUEST\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcarcamov%2Fgpuvmem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelcarcamov%2Fgpuvmem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcarcamov%2Fgpuvmem/lists"}