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.
To acknowledge use of this app, cite Murray, Power & Robotham (2013).
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 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
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.),
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.