-
Notifications
You must be signed in to change notification settings - Fork 4
Code for z-DM calculations based on James+2021
License
FRBs/zdm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DOI: https://doi.org/10.5281/zenodo.8192369 # # Library of functions used for # https://ui.adsabs.harvard.edu/abs/2021arXiv210108005J/abstract # and # https://ui.adsabs.harvard.edu/abs/2021arXiv210107998J/abstract # Please cite the former (the 'methods' paper) when using. Questions? Email: clancy.w.james@gmail.com ###### External dependencies ########3 Standard Python: python3 numpy matpltlib argparse os sys pickle time Specialist modules: ne2001 (see https://readthedocs.org/projects/ne2001) FRB (see https://zenodo.org/record/3403651#.YGVnxGQzZKA) ####################### This code ################# Contained herein: #### Three main programs: ### (terribly named) #1: test.py This program loads survey data from ASKAP and Parkes, and for the best-fit value of parameters, performs several calculations, produces plots, and outputs. run with python3 test.py #2: test_errors.py As above, except it produces plots requiring data from not just the best-fit, but also 90% error ranges of parameters, the best-fit function when forcing n=0, and the best-fit when setting Emin=10^38.5 erg run with python3 test_errors.py #3: cube.py This program is designed to iterate over many possible values of parameters and estimate the likelihoods for each set. run first with: python3 cube.py then with steering files. ######## library files ######### #4 zdm.py Class definition containing a grid of p(z,DM) and all the intermediate data and functions required to calculate it #5 survey.py Class definition containing FRB survey parameters and related functions #6 iteration.py Functions related to maximum likelihood calculations for FRB surveys, and how to iterate these over a grid of values. #7 cosmology.py My own dodgy cosmology calculator containing some simple standard cosmological calculations for simplified flat Universe lambda CDM cosmology, and some functions specific for FRBs #8 beams.py Functions related to telescope beamshape, including reading beam data #9 misc_functions.py Various miscellaneous functions, many of which are deprecated #10 errors_misc_functions.py Similar functions to misc_functions.py, but specifically designed to simultaneously plot results from multiple parameter sets - i.e. as required by test_errors.py #11 pcosmic.py A library of function to allow the calculation of p(DM_cosmic). This is an implementation of the routines from https://ui.adsabs.harvard.edu/abs/2020Natur.581..391M/abstract which requires a numerical optimisation to ensure a mean of unity. ######## Cube steering files ######### #12 launch_cube_job.sh This is designed to send a batch of 'cube.py' jobs to Pawsey's Magnus GPU clusters. #13 steer_cube.sh This is the job steering file sent by launch_cube_job.sh that steers the submission of cube.py jobs to 24 GPUs on a single node. #14 Cube/all_params.dat This contains the multi-demensional cube of parameters to be iterated over by the cube submisson jobs ######## Directories ###### # BeamData This directory contains numpy data parameterising \Omega(b) - _bins.npy files give the value of b, _hist.npy files the corresponding values of \Omega. Those in log-space should be named as such, but beams.py tests this. Gaussian beams can also be generated in beams.py # Surveys Directory containing survey information, specifying details of ASKAP and Parkes FRB surveys. These get read by the survey class defined in surveys.py # Pickle This directory is for saving data for efficient re-use. In particular, calculating a p(z,dm) grid for a single survey takes more than a minute on a single processor, while many plotting routines by default save data here to allow rapid recalculation. # Cube Directory containing inputs and outputs for cube.py # Plots Directory for all plots generated by test.py # ErrorPlots Directory for all plots generated by test_errors.py # GridData Save directory for grids of the intrinsic p(DM_cosmic | z) distribution
About
Code for z-DM calculations based on James+2021
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published