Giter Site home page Giter Site logo

hmfcalc's Introduction

HMFcalc

The web-app for calculating Halo Mass Functions

NOTE: This app been improved and expanded to calculate a full range of halo model quantities. In doing so, a new repo was started, over at https://github.com/steven-murray/TheHaloMod. This repo remains for historical purposes only.

This is the source code for the HMFcalc web-app, which uses the hmf Python package to calculate halo mass functions (and other cosmological structure quantities).

The web-app is powered by Django and uses Bootstrap 4 as a CSS framework.

To acknowledge use of this app, cite Murray, Power & Robotham (2013).

Developing

Clearly, this repository is intended for developers (users shouldn't need to see this code, or I've done something wrong!). I would love contributions to this app from the community -- whether in the form of bug reports, feature requests, or new code. Please consider getting involved!

If you'd like to get involved but have never done any web-development before (like me when I started this project), I'd suggest taking the Django Beginner's Tutorial to wrap your head around things a bit.

After that, here's a bit of a primer of how this repo is laid out:

The top-level is reserved for interesting project-level stuff like this README, and scripts for managing the website itself (things you call manually when you're on the server, outside the context of the web-app itself).

The HMF directory contains the website-level settings and structure (eg. where urls point to).

The hmfstatic directory contains static files required by the website (eg javascript, images, css), which are also served as a Google app to be available via the web.

The templates directory contains the HTML files (really, they're just kinda-sorta HTML, they're actually templates) that define how each page of the website will be structured (and often, the text on the website).

Finally, the most important directory: HMFcalc. This contains the logic of the web-application, as a bunch of python files. Most important here are the views.py, which defines the various things that happen when different URLs are accessed (not always a web-page opening -- sometimes a download of a file, or a form displaying etc.), and the forms.py which defines the (fairly large) form into which inputs for the HMF are given.

Running the Server Locally

To run the local server for development, do python manage.py runserver from the top level. It should open a browser tab for you.

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.