{"id":15444301,"url":"https://github.com/miguelcarcamov/snow","last_synced_at":"2025-07-21T03:34:16.277Z","repository":{"id":37541715,"uuid":"245884858","full_name":"miguelcarcamov/snow","owner":"miguelcarcamov","description":"SNOW: caSa pythoN self-calibratiOn frameWork","archived":false,"fork":false,"pushed_at":"2024-10-01T19:51:33.000Z","size":2025,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-12T22:49:07.508Z","etag":null,"topics":["astronomy-astrophysics","astrophysics","image-synthesis","imaging","interferometry","object-oriented-programming","python","radio-astronomy","radio-imaging","radioastro","radioastronomy","self-calibration","selfcalibration"],"latest_commit_sha":null,"homepage":"","language":"Python","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","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":"2020-03-08T20:40:32.000Z","updated_at":"2024-06-24T21:45:18.000Z","dependencies_parsed_at":"2024-01-08T16:28:29.973Z","dependency_job_id":"e1a6099c-b3fd-4548-8991-99c183a2ddd9","html_url":"https://github.com/miguelcarcamov/snow","commit_stats":null,"previous_names":["miguelcarcamov/objectoriented_selfcal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miguelcarcamov/snow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fsnow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fsnow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fsnow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fsnow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelcarcamov","download_url":"https://codeload.github.com/miguelcarcamov/snow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelcarcamov%2Fsnow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265087639,"owners_count":23709369,"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":["astronomy-astrophysics","astrophysics","image-synthesis","imaging","interferometry","object-oriented-programming","python","radio-astronomy","radio-imaging","radioastro","radioastronomy","self-calibration","selfcalibration"],"created_at":"2024-10-01T19:40:10.885Z","updated_at":"2025-07-21T03:34:16.256Z","avatar_url":"https://github.com/miguelcarcamov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **SNOW**\n\n## ca**S**a pytho**N** self-calibrati**O**n frame**W**ork\n\nMany radio-astronomers repeat the process of writing different scripts for self-calibration\ndepending on their datasets. This repository holds an object-oriented Framework for self-calibration\nof radio-interferometric datasets that will help radio astronomers to minimize the tedious work of\nwriting self-calibration scripts once again. The idea is to call just one main Python script that\nwill run an imager (tclean, wsclean, gpuvmem, rascil, etc.) and one or multiple self-calibration\nobjects (phase, amplitude, amplitude-phase) having the self-calibrated dataset as a result.\n\n## Requirements\n\n1. `Python == 3.8`\n2. Check CASA pip current version requirements [here](https://casadocs.readthedocs.io/en/stable/notebooks/introduction.html#Modular-Packages).\n3. Check the `requirements.txt` file.\n\n## Installation\n\n### From PYPI repository\n\n- `pip install snow`\n\n### From Github\n\n- `pip install -U git+https://github.com/miguelcarcamov/snow`\n\n### From source\n\n```bash\ngit clone https://github.com/miguelcarcamov/snow\ncd snow\npip install .\n```\n\n### From source as developer\n\n```bash\ngit clone https://github.com/miguelcarcamov/snow\ncd snow\npip install -e .\n```\n\n## Using docker container\n\n```bash\ndocker pull ghcr.io/miguelcarcamov/snow:latest\n```\n\n## Run snow\n\n```python\n# Import the modules that you want to use\nimport sys\nfrom snow.selfcalibration import Phasecal, AmpPhasecal\nfrom snow.imaging import Tclean\n\nif __name__ == '__main__':\n # This step is up to you, and option to capture your arguments from terminal is using sys.argv\n visfile = sys.argv[3]\n output = sys.argv[4]\n want_plot = eval(sys.argv[5])\n\n # Table for automasking on long or short baselines can be found here: https://casaguides.nrao.edu/index.php/Automasking_Guide\n # The default clean object will use automasking values for short baselines\n # In this case we will use automasking values for long baselines\n # Create different imagers with different thresholds (this is optional, you can create just one)\n clean_imager_phs = Tclean(inputvis=visfile, output=output, niter=100, M=1024, N=1024, cell=\"0.005arcsec\",\n                           stokes=\"I\", datacolumn=\"corrected\", robust=0.5,\n                           specmode=\"mfs\", deconvolver=\"hogbom\", gridder=\"standard\",\n                           savemodel=True, usemask='auto-multithresh', threshold=\"0.1mJy\", sidelobethreshold=3.0,\n                           noisethreshold=5.0,\n                           minbeamfrac=0.3, lownoisethreshold=1.5, negativethreshold=0.0, interactive=True)\n\n clean_imager_ampphs = Tclean(inputvis=visfile, output=output, niter=100, M=1024, N=1024, cell=\"0.005arcsec\",\n                              stokes=\"I\", datacolumn=\"corrected\", robust=0.5,\n                              specmode=\"mfs\", deconvolver=\"hogbom\", gridder=\"standard\",\n                              savemodel=True, usemask='auto-multithresh', threshold=\"0.025mJy\",\n                              sidelobethreshold=3.0,\n                              noisethreshold=5.0,\n                              minbeamfrac=0.3, lownoisethreshold=1.5, negativethreshold=0.0, interactive=True)\n\n # This is a dictionary with shared variables between self-cal objects\n shared_vars_dict = {'visfile': visfile, 'minblperant': 6, 'refant': \"DA51\", 'spwmap': [\n  0, 0, 0, 0], 'gaintype': 'T', 'want_plot': want_plot}\n\n # Create your solution intervals\n solint_phs = ['inf', '600s']\n solint_ap = ['inf']\n\n # Create your phasecal object\n phscal = Phasecal(minsnr=3.0, solint=solint_phs, combine=\"spw\", imager=clean_imager_phs, **shared_vars_dict)\n # Run it!\n phscal.run()\n\n # If we are happy with the result of the only-phase self-cal we can end the code here, if not...\n # Create the amplitude-phase self-cal object\n apcal = AmpPhasecal(minsnr=3.0, solint=solint_ap, combine=\"\", previous_selfcal=phscal, imager=clean_imager_ampphs,\n                     **shared_vars_dict)\n # Run it\n apcal.run()\n # Get your splitted final MS\n apcal.selfcal_output(overwrite=True)\n```\n\nThen you can simply run the main script using `python yourscript.py \u003carguments\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcarcamov%2Fsnow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelcarcamov%2Fsnow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcarcamov%2Fsnow/lists"}