From da0cdb36ba5da3199236d25a2f83246b2003e6f1 Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 8 Apr 2021 09:37:02 +0100 Subject: [PATCH] Add max_box_fraction to plan_cosmology_splice. --- .../cosmological_observation/cosmology_splice.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/yt_astro_analysis/cosmological_observation/cosmology_splice.py b/yt_astro_analysis/cosmological_observation/cosmology_splice.py index 505ee41a..dd6c6304 100644 --- a/yt_astro_analysis/cosmological_observation/cosmology_splice.py +++ b/yt_astro_analysis/cosmological_observation/cosmology_splice.py @@ -228,6 +228,7 @@ def create_cosmology_splice(self, near_redshift, far_redshift, return cosmology_splice def plan_cosmology_splice(self, near_redshift, far_redshift, + max_box_fraction=1.0, decimals=3, filename=None, start_index=0): r"""Create imaginary list of redshift outputs to maximally @@ -244,6 +245,15 @@ def plan_cosmology_splice(self, near_redshift, far_redshift, The nearest (lowest) redshift in the cosmology splice list. far_redshift : float The furthest (highest) redshift in the cosmology splice list. + max_box_fraction : float + In terms of the size of the domain, the maximum length a light + ray segment can be in order to span the redshift interval from + one dataset to another. If using a zoom-in simulation, this + parameter can be set to the length of the high resolution + region so as to limit ray segments to that size. If the + high resolution region is not cubical, the smallest side + should be used. + Default: 1.0 (the size of the box) decimals : int The decimal place to which the output redshift will be rounded. If the decimal place in question is nonzero, the redshift will @@ -264,6 +274,8 @@ def plan_cosmology_splice(self, near_redshift, far_redshift, """ + self.max_box_fraction = max_box_fraction + z = far_redshift outputs = []