Nicole Drakos

Research Blog

Welcome to my Research Blog.

This is mostly meant to document what I am working on for myself, and to communicate with my colleagues. It is likely filled with errors!

This project is maintained by ndrakos

Neutrino Implementation in C

This post contains code to assign velocity to the particles in C. I did this in a previous post in python, but we need it in a form that will be incorporated into MUSIC, and eventually Cholla.

Note that I am embarrassingly rusty at C, and I am not sure how efficiently I coded this! It does give the same answer as the python code though.

Code

A note on the velocity directions

To assign velocity directions, we need a way to divide the sphere into equal area elements. For the python code I used the package “healpy” which is the python version of Healpix to do this.

In the C version, I created a lookup table for \(N_{\rm side}=2,3,4,5,6\) (note the number of directions at each grid point will be \(12 N_{\rm side}^2\)).

For Cholla, we need to decide between the following options:

  1. Keep the lookup table approach. How large do we need \(N\) to be? In the Banjeree et. al paper they considered vales 1-4 for this variable.
  2. Install a code like Healpix, and make it a required dependant package
  3. Write our own code to divide up the unit sphere into equal area elements.

« MUSIC Code Breakdown
Neutrino Positions in MUSIC »