Code Monkey home page Code Monkey logo

radio-galaxy-zoo's Introduction

Radio Galaxy Zoo

Getting started

  • Install (if you don't have them; likely need root or sudo):
  • Run:
    • npm install -- installs brunch plugins
    • bower install -- installs library dependencies (Underscore, Backbone, and jQuery)
    • brunch watch --server โ€” watches the project with continuous rebuild. This will also launch HTTP server with pushState.

Steps Before Launching App with New Data

Contour Levels

Contours are computed against an array defining various binning levels. This array should be changed when another radio survey is ingested into the project. Consult the science team to determine the values needed for a particular radio survey. This array may be updated in index.coffee.

RadioGalaxyZoo.contours("levels", [3.0, ..., 6561])

Contour Threshold

A threshold is applied to filter out contours that may represent noise. This is a tunable parameter that depends on the radio survey, and should be updated when the project uses a new survey. Update this value in index.coffee, and it will propagate through the rest of the application.

RadioGalaxyZoo.constant("contourThreshold", 8)

The value, with units of pixels, represents the diagonal of the bounding box surrounding the lowest level contour. This value should be derived from the field of view of the radio image.

FITS Image Dimension

FITS images are used to compute contours on the fly. This allows direct interaction with contours, as opposed to annotating over a rasterized representation. As a result, the dimension of the FITS image must be recorded in the app so that contours are scaled according to the image size. This dimension should be updated if a new radio survey uses FITS images of a different dimension. Update the value in index.coffee:

RadioGalaxyZoo.constant("fitsImageDimension", 301)

FITS Compression

The FITS images sent to the client are roughly 1 MB in size. To reduce the data transfer, it's best to gzip all FITS files, and upload to S3 with the correct encoding, and a spoofed MIME type. The Makefile described below gzips all FITS during processing.

gzip -9 some-binary-file.fits > some-binary-file.fits.gz
s3cmd put some-binary-file.gz s3://some-s3-bucket/ --mime-type "application/json" --add-header "Content-Encoding: gzip" --acl-public

Data Preparation

There is a Makefile in the scripts directory for preparing Radio Galaxy Zoo subjects. This Makefile provides functions that operate on rgz.tar.gz and rgz_fits.tar.gz, which are to be delivered by the Science Team.

The Makefile runs the following operations over the data:

  • Decompresses the tarballs
  • Process FITS infrared to PNGs without contours using make_infrared_pngs.py
  • Resizes radio PNGs using Imagemagick
  • Clean all radio FITS headers by removing unnecessary HISTORY keywords
  • GZIP all radio FITS that are to be served to volunteers
  • Converts PNGs to JPGs (an Automator Workflow is used to utilized Preview's export for a better compression compared to Imagemagick)

To process infrared subjects:

make infrared

To process radio subjects:

make radio

To process radio FITS subjects:

make raw

To process the entire subject set:

make

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.