Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
HMF
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
db
 
 
 
 
 
 

README.md

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.

About

Django web-application for calculating the halo mass function

Resources

Releases

No releases published
You can’t perform that action at this time.