matthewja / blobmatch Goto Github PK
View Code? Open in Web Editor NEWRadio-radio cross-identification
License: BSD 3-Clause "New" or "Revised" License
Radio-radio cross-identification
License: BSD 3-Clause "New" or "Revised" License
Blobmatch: Machine learning for cross-identification of radio surveys James Gardner, Cheng Soon Ong, Matthew Alger README Abstract: Success in radio-radio survey cross-identification is determining the real, physical objects that we're looking at. The naivest measure of two sources (or blobs) being a match for an actual object is their separation on the sky. Using this separation, we train a logistic regression classifier on the TGSS (TIFR GMRT Sky Survey Alternative Data Release 1) and NVSS (NRAO VLA Sky Survey) radio surveys. Then use its predictions to partition a patch of the sky into objects, by transitively grouping any chain of predicted matches. Although the classifier successfully learns the importance of separation, we find that the naive partitioning fails to convincingly identify objects in the sky. Current build found at: https://github.com/MatthewJA/blobmatch Directory structure: blobmatch/ source/ (all .ipynb notebooks, manual_labels.csv) report/ pics/ (all plots as .pdf saved by above notebooks, also cut-out comparison) main.tex report.pdf project/ (non-plot outputs of notebooks except sky_matches.csv and sky_catalogue.csv, also defunct scipts and plots) README.txt LICENSE .gitignore --- Guide to replicate results, please follow exactly Blobmatch uses python 3.6.8 in jupyter notebook and has the requirements: astropy==3.2.1 ipython==5.5.0 jupyter==1.0.0 jupyter-client==5.2.2 jupyter-console==6.0.0 jupyter-core==4.4.0 matplotlib==3.0.3 numpy==1.16.2 pandas==0.24.2 scikit-learn==0.21.3 sklearn==0.0 torch==1.1.0 torchvision==0.3.0 tqdm==4.33.0 Download the TGSS and NVSS radio object surveys from the links below and unzip them https://github.com/MatthewJA/blobmatch/releases/download/v0.1/TGSSADR1_7sigma_catalog.tsv.gz https://github.com/MatthewJA/blobmatch/releases/download/v0.1/CATALOG.FIT.gz Open up a directory with the extracted surveys and all of the source code (as in source/ folder) in a jupyter notebook Run feature_vectors.ipynb, executing all cells from top to bottom (constructs feature vectors from source catalogues in a patch, labels based off of positional matching) (warning: will take a few minutes to create combined catalogue, appending to a pandas dataframe is slow) feature_vectors.ipynb requires the above TGSSADR1_7sigma_catalog.tsv and CATALOG.FIT to be present in cwd feature_vectors.ipynb will save patch_catalogue.csv of combined match feature vectors with attached labels, as well as tgss.csv and nvss.csv of feature vectors of individual sources Have manual_labels.csv (found in source folder) present in cwd, manual labels made from cut-outs taken from: http://tgssadr.strw.leidenuniv.nl/hips/ http://alasky.u-strasbg.fr/NVSS/intensity/ Run torch_logistic_regression.ipynb, executing all cells from top to bottom (performs logistic regression using pytorch, partitions sky into physical objects) torch_logistic_regression.ipynb requires patch_catalogue.csv (as above) and manual_labels.csv be present in cwd torch_logistic_regression.ipynb will save weights.csv, predictions.csv, objects.csv, multi_objects.csv, torch_lr_losses.pdf, torch_lr_weights.pdf, torch_lr_predictions.pdf, and torch_lr_partition.pdf This ends the main-line results using logistic regression, the following are auxillary Run sklearn_logistic_regression.ipynb, executing all cells from top to bottom (performs logistic regression and random forest using sklearn) sklearn_logistic_regression.ipynb requires patch_catalogue.csv and manual_labels.csv be present in cwd sklearn_logistic_regression.ipynb will save sklearn_lr.pdf and sklearn_rf.pdf Run score_feature_vectors.ipynb, executing all cells from top to bottom (scores the match feature vectors in patch against various metrics, finds each individual source's best match) score_feature_vectors.ipynb requires patch_catalogue.csv, tgss.csv, nvss.csv be present in cwd score_feature_vectors.ipynb will save tgss_sorted.csv, nvss_sorted.csv, hist_patch_cat_score_naive.pdf, hist_patch_cat_score_separation.pdf, hist_patch_cat_score_spectral.pdf, and hist_patch_cat_score_combo.pdf Run sky_positional_matching.ipynb, executing all cells from top to bottom (constructs catalogue of primitive feature vectors over entire sky in catalogues, performs positional matching) (warning: will take a much longer time, at least 30 minutes) sky_positional_matching.ipynb requires TGSSADR1_7sigma_catalog.tsv and CATALOG.FIT be present in cwd sky_positional_matching.ipynb saves sky_matches.csv, sky_catalogue.csv, hist_angle.pdf, and hist_alpha.pdf ---
@daccordeon to get @MatthewJA feedback by Friday 5pm.
Include:
Could @daccordeon please add a file containing dates and items to be completed, leading all the way to the end of the project?
Once you have a score, sort all TGSS sources, and all NVSS sources.
Section 2.1: https://www.cv.nrao.edu/~sransom/web/Ch2.html#S1
Add a README.md
file in the project root with a brief project description.
pip3 freeze > requirements.txt
only call things you use
Write one or two pages precisely describing the inputs and outputs of the predictors.
Only to be done after having a sensible experiment from positional matching.
Develop a function that takes an NVSS and a TGSS object and scores how related they are.
cosine of angle of displacement vector
Use the NVSS and TGSS catalogue papers for reference.
To do logistic regression, only need to run through feature_vectors.ipynb and logistic_regression.ipynb , all other files auxiliary.
A few pages, about the data and what positional matching does.
Might as well get started on your report.
As a CSV file with TGSS, NVSS columns.
Don't spend too much time
Using #31
Chapter 8 of mml-book.com
And flesh out bits of napkin.tex if needed.
Each object will have some number of TGSS and NVSS components.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.