<commit_before>"""
Functions for integrating population frequency spectra.
"""

import logging
logger = logging.getLogger('Integration')

#
# Note that these functions have all be written for xx=yy=zz, so the grids are
# identical in each direction. That's not essential here, though. The reason we
# do it is because later we'll want to extrapolate, and it's not obvious how to
# do so if the grids differ.
#

#: Controls use of Chang and Cooper's delj trick, which seems to lower accuracy.
use_delj_trick = False

import numpy
from numpy import newaxis as nuax

import Misc, Numerics, tridiag
import integration_c as int_c

#: Controls timestep for integrations. This is a reasonable default for
#: gridsizes of ~60. See set_timescale_factor for better control.
timescale_factor = 1e-3<commit_msg>Update comments<commit_after>"""
Functions for integrating population frequency spectra.
"""

import logging
logger = logging.getLogger('Integration')

# Note that these functions have all be written for xx=yy=zz, so the grids are
# identical in each direction. That's not essential here, though. The reason we
# do it is because later we'll want to extrapolate, and it's not obvious how to
# do so if the grids differ.
#
# Note that we could do different grids, if we solved a more complex
# extrapolation polynomial. For example:
#    val = a + b x + c x^2 + d y + e y^2 + f x y
# Where x and y denote the injection points for x and y axes.

# Also note that we have tested using multiprocessing to split up calls to
# the C integration methods. This appears to give no speedup (or even cause a
# slowdown). I suspect this is due to the cost of copying phi back and forth
# between subprocesses. I tried using shared memory to fix this, but was
# unsuccessful.

#: Controls use of Chang and Cooper's delj trick, which seems to lower accuracy.
use_delj_trick = False

import numpy
from numpy import newaxis as nuax

import Misc, Numerics, tridiag
import integration_c as int_c

#: Controls timestep for integrations. This is a reasonable default for
#: gridsizes of ~60. See set_timescale_factor for better control.
timescale_factor = 1e-3
{'fraction_non_alphanumeric': 0.06030855539971949, 'fraction_numerical': 0.004675081813931743, 'mean_word_length': 4.376884422110553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4469151', 'n_tokens_mistral': 630, 'n_tokens_neox': 582, 'n_words': 316}