{"id":13521162,"url":"https://github.com/devanshkv/fetch","last_synced_at":"2025-07-09T03:33:32.281Z","repository":{"id":48295543,"uuid":"165734093","full_name":"devanshkv/fetch","owner":"devanshkv","description":"A set of deep learning models for FRB/RFI binary classification. ","archived":false,"fork":false,"pushed_at":"2024-05-15T18:06:22.000Z","size":248,"stargazers_count":40,"open_issues_count":6,"forks_count":32,"subscribers_count":5,"default_branch":"tf2","last_synced_at":"2024-11-02T05:32:40.458Z","etag":null,"topics":["binary-classification","deep-learning","fast-radio-bursts","transfer-learning"],"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/devanshkv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-01-14T20:59:03.000Z","updated_at":"2024-09-11T16:37:08.000Z","dependencies_parsed_at":"2024-05-16T06:17:48.704Z","dependency_job_id":"32f79066-51a5-43e3-baba-eddb51c8b0dc","html_url":"https://github.com/devanshkv/fetch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshkv%2Ffetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshkv%2Ffetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshkv%2Ffetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshkv%2Ffetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devanshkv","download_url":"https://codeload.github.com/devanshkv/fetch/tar.gz/refs/heads/tf2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246535772,"owners_count":20793317,"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":["binary-classification","deep-learning","fast-radio-bursts","transfer-learning"],"created_at":"2024-08-01T06:00:29.661Z","updated_at":"2025-03-31T20:30:46.975Z","avatar_url":"https://github.com/devanshkv.png","language":"Python","readme":"# FETCH\n\n\n[![DOI](https://zenodo.org/badge/165734093.svg?style=flat-square)](https://zenodo.org/badge/latestdoi/165734093)\n[![issues](https://img.shields.io/github/issues/devanshkv/fetch)](https://github.com/devanshkv/fetch/issues)\n[![forks](https://img.shields.io/github/forks/devanshkv/fetch)](https://github.com/devanshkv/fetch/network/members)\n[![stars](https://img.shields.io/github/stars/devanshkv/fetch)](https://github.com/devanshkv/fetch/stargazers)\n[![GitHub license](https://img.shields.io/github/license/devanshkv/fetch)](https://github.com/devanshkv/fetch/blob/master/LICENSE)\n[![HitCount](http://hits.dwyl.com/devanshkv/fetch.svg)](http://hits.dwyl.com/devanshkv/fetch)\n[![arXiv](https://img.shields.io/badge/arXiv-1902.06343-brightgreen.svg)](https://arxiv.org/abs/1902.06343)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n\nfetch is Fast Extragalactic Transient Candidate Hunter. It has been detailed in the paper [Towards deeper neural networks for Fast Radio Burst detection](https://arxiv.org/abs/1902.06343).\n\nThis is the `tensorflow\u003e=2` version of the fetch, if you are looking for the older tensorflow version click [here](https://github.com/devanshkv/fetch/archive/0.1.8.tar.gz).\n\nInstall \n---\n    git clone https://github.com/devanshkv/fetch.git\n    cd fetch\n    pip install -r requirements.txt\n    python setup.py install\n\nThe installation will put `predict.py` and `train.py` in your `PYTHONPATH`.\n\nUsage\n---\nTo use fetch, you would first have to create candidates. Use [`your`](https://thepetabyteproject.github.io/your/) for this purpose, [this notebook](https://thepetabyteproject.github.io/your/ipynb/Candidate/) explains the whole process. Your also comes with a command line script [`your_candmaker.py`](https://thepetabyteproject.github.io/your/bin/your_candmaker/) which allows you to use CPU or single/multiple GPUs. \n\nTo predict a candidate h5 files living in the directory `/data/candidates/` use `predict.py` for model `a` as follows:\n\n    predict.py --data_dir /data/candidates/ --model a\n        \nTo fine-tune the model `a`, with a bunch of candidates, put them in a pandas readable csv, `candidate.csv` with headers 'h5' and 'label'. Use\n\n    train.py --data_csv candidates.csv --model a --output_path ./\n        \nThis would train the model `a` and save the training log, and model weights in the output path.\n\nExample\n---\n\nTest filterbank data can be downloaded from [here](http://astro.phys.wvu.edu/files/askap_frb_180417.tgz). The folder contains three filterbanks: 28.fil  29.fil  34.fil.\nHeimdall results for each of the files are as follows:\n\nfor 28.fil\n\n    16.8128\t1602\t2.02888\t1\t127\t475.284\t22\t1601\t1604\nfor 29.fil\n\n    18.6647\t1602\t2.02888\t1\t127\t475.284\t16\t1601\t1604\nfor 34.fil\n\n    13.9271\t1602\t2.02888\t1\t127\t475.284\t12\t1602\t1604 \n\nThe `cand.csv` would look like the following:\n\n    file,snr,stime,width,dm,label,chan_mask_path,num_files\n    28.fil,16.8128,2.02888,1,475.284,1,,1\n    29.fil,18.6647,2.02888,1,475.284,1,,1\n    34.fil,13.9271,2.02888,1,475.284,1,,1\n\nRunning `your_candmaker.py` will create three files:\n\n    cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_13.92710.h5\n    cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_16.81280.h5\n    cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_18.66470.h5\n\nRunning `predict.py` with model `a` will give `results_a.csv`:\n\n    ,candidate,probability,label\n    0,cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_18.66470.h5,1.0,1.0\n    1,cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_16.81280.h5,1.0,1.0\n    2,cand_tstart_58682.620316710374_tcand_2.0288800_dm_475.28400_snr_13.92710.h5,1.0,1.0\n    \nTraining Data\n---\n\nThe training data is available at [astro.phys.wvu.edu/fetch](http://astro.phys.wvu.edu/fetch/).\n\n## Citating this work\n___\n\nIf you use this work please cite:\n\n    @article{Agarwal2020,\n      doi = {10.1093/mnras/staa1856},\n      url = {https://doi.org/10.1093/mnras/staa1856},\n      year = {2020},\n      month = jun,\n      publisher = {Oxford University Press ({OUP})},\n      author = {Devansh Agarwal and Kshitij Aggarwal and Sarah Burke-Spolaor and Duncan R Lorimer and Nathaniel Garver-Daniels},\n      title = {{FETCH}: A deep-learning based classifier for fast transient classification},\n      journal = {Monthly Notices of the Royal Astronomical Society}\n    }\n    @software{agarwal_aggarwal_2020,\n      author       = {Devansh Agarwal and\n                      Kshitij Aggarwal},\n      title        = {{devanshkv/fetch: Software release with the \n                       manuscript}},\n      month        = jun,\n      year         = 2020,\n      publisher    = {Zenodo},\n      version      = {0.1.8},\n      doi          = {10.5281/zenodo.3905437},\n      url          = {https://doi.org/10.5281/zenodo.3905437}\n    }\n","funding_links":[],"categories":["Machine Learning Classifiers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshkv%2Ffetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevanshkv%2Ffetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshkv%2Ffetch/lists"}