From f60a8aa686a92b5155b269a76016c7043926cb83 Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Fri, 19 Feb 2021 14:44:27 -0600 Subject: [PATCH] Pep8 changes to model_defaults.py module --- halotools/empirical_models/model_defaults.py | 49 ++++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/halotools/empirical_models/model_defaults.py b/halotools/empirical_models/model_defaults.py index b4789bbd4..1967b547e 100644 --- a/halotools/empirical_models/model_defaults.py +++ b/halotools/empirical_models/model_defaults.py @@ -4,7 +4,7 @@ """ import numpy as np -__all__ = ['get_halo_boundary_key', 'get_halo_mass_key'] +__all__ = ["get_halo_boundary_key", "get_halo_mass_key"] # Default thresholds for mocks @@ -15,30 +15,38 @@ # Used when executing a Monte Carlo realization of a Poission distribution # whose mean is formally zero, which causes the built-in # scipy method to raise an exception. -default_tiny_poisson_fluctuation = 1.e-20 +default_tiny_poisson_fluctuation = 1.0e-20 default_smhm_scatter = 0.2 -default_smhm_haloprop = 'halo_mpeak' +default_smhm_haloprop = "halo_mpeak" default_binary_galprop_haloprop = default_smhm_haloprop # At minimum, the following halo and galaxy properties # will be bound to each mock galaxy -host_haloprop_prefix = 'halo_' +host_haloprop_prefix = "halo_" -default_haloprop_list_inherited_by_mock = ( - ['halo_id', 'halo_hostid', 'halo_x', 'halo_y', 'halo_z', - 'halo_vx', 'halo_vy', 'halo_vz', - 'halo_mvir', 'halo_rvir', 'halo_upid'] - ) +default_haloprop_list_inherited_by_mock = [ + "halo_id", + "halo_hostid", + "halo_x", + "halo_y", + "halo_z", + "halo_vx", + "halo_vy", + "halo_vz", + "halo_mvir", + "halo_rvir", + "halo_upid", +] -prim_haloprop_key = 'halo_mvir' -sec_haloprop_key = 'halo_nfw_conc' +prim_haloprop_key = "halo_mvir" +sec_haloprop_key = "halo_nfw_conc" -halo_mass_definition = 'vir' +halo_mass_definition = "vir" def get_halo_boundary_key(mdef): - """ For the input mass definition, + """For the input mass definition, return the string used to access halo table column storing the halo radius. @@ -56,11 +64,11 @@ def get_halo_boundary_key(mdef): -------- radius_key : str """ - return 'halo_r'+mdef + return "halo_r" + mdef def get_halo_mass_key(mdef): - """ For the input mass definition, + """For the input mass definition, return the string used to access halo table column storing the halo mass. @@ -78,7 +86,7 @@ def get_halo_mass_key(mdef): -------- mass_key : str """ - return 'halo_m'+mdef + return "halo_m" + mdef # Number of bins to use in the lookup table attached to the NFWProfile. @@ -88,14 +96,15 @@ def get_halo_mass_key(mdef): max_permitted_conc = 20.0 default_conc_gal_bias_bins = np.linspace(0.1, 10, 10) -default_conc_gal_bias_bins = np.insert(default_conc_gal_bias_bins, - np.searchsorted(default_conc_gal_bias_bins, 1), 1) +default_conc_gal_bias_bins = np.insert( + default_conc_gal_bias_bins, np.searchsorted(default_conc_gal_bias_bins, 1), 1 +) Npts_radius_table = 101 default_lograd_min = -3 default_lograd_max = 0 -conc_mass_model = 'direct_from_halo_catalog' -concentration_key = 'halo_nfw_conc' +conc_mass_model = "direct_from_halo_catalog" +concentration_key = "halo_nfw_conc" default_rbins = np.logspace(-1, 1.25, 15)