Skip to content

Conversation

@Kerianne28
Copy link
Collaborator

@Kerianne28 Kerianne28 commented Mar 7, 2020

This branch implements everything needed to inject primordial black holes (PBHs) into the .h5 file that will be used by calc_events.

Synthetic.py Changes:

add_pbh:
This function takes the .h5 file that is output by perform_pop_syn, creates everything needed for the injected PBHs, then combines the PBH data with the data from the previous .h5 file into a new .h5 file.

This function does the following:

  • The .h5 file without PBHs is read in (this is the product of perform_pop_syn). Latitude bins and longitude bins are stored. Maximum ID values are determined, so that we know where to start with the PBH ID's.

  • An NFW profile is used to determine how many PBHs there are within the field of view.

  • A cylinder with a length of 2*r_max and an area of the field of view is created.

  • PBHs are populated into this cylinder.

  • The cylinder gets masked, giving us only the PBHs that exist in the observable light cone.

  • The Maxwellian velocity distribution is calculated for each radius.

  • One value is randomly sampled, and assigned as the rms velocity (then converted to vx, vy, and vz).

  • All other values needed are assigned to each PBH: magnitudes, pop_id, etc.

  • A new .h5 file is created that consists of all of the data from the original .h5 file (without PBHs. From perform_pop_syn), combined with all of the new PBH information for the current field.

Run.py Changes:

  • Created an optional add_argument statement for the PBH config file.

  • Added a segment that instructs what to do if a pbh_config file is given.

  • Added a synthetic.add_pbh section to run if pbh_config_filename is not None.

  • Added a section that will append "_pbh" to files generated if add_pbh is being run.

generate_pbh_config_file:

  • Generates a config file with the parameters that are needed for the add_pbh function.

Other files added:

pbh_config.yaml

  • Has all of the default parameters needed for the add_pbh function.

radial_velocity_profile_middle.csv
radial_velocity_profile_shallow.csv
radial_velocity_profile_steep.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants