[yt-svn] commit/cookbook: brittonsmith: Removing obselete recipes.

Bitbucket commits-noreply at bitbucket.org
Tue Jul 24 16:56:55 PDT 2012


1 new commit in cookbook:


https://bitbucket.org/yt_analysis/cookbook/changeset/e4823007a84a/
changeset:   e4823007a84a
user:        brittonsmith
date:        2012-07-25 01:56:44
summary:     Removing obselete recipes.
affected #:  2 files

diff -r e9713a6df993f2c62fdb363afda95345881c6e8c -r e4823007a84a941abf5b3e3ec82c8291715dd89b recipes/light_cone_halo_mask.py
--- a/recipes/light_cone_halo_mask.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-The following recipe uses the HaloProfiler to locate halos of at least 
-10 :superscript:`14` solar masses in the sampled volume and create a 
-boolean mask to cover them up with circles of radii given by the virial 
-radius of each halo.  A text file is written out detailing the x and y 
-positions in the light cone projection of all the halos in the mask, their 
-redshifts, virial radii, and virial masses.
-"""
-
-from yt.mods import *
-
-# Instantiate a light cone object as usual.
-lc = amods.light_cone.LightCone(
-                  "128Mpc256grid_SFFB.param", initial_redshift=0.4, 
-                  final_redshift=0.0, observer_redshift=0.0,
-                  field_of_view_in_arcminutes=600.0, 
-                  image_resolution_in_arcseconds=60.0,
-                  use_minimum_datasets=True, deltaz_min=0.0, 
-                  minimum_coherent_box_fraction=0.0,
-                  output_dir='LC', output_prefix='LightCone')
-
-# Calculate the light cone solution.
-lc.calculate_light_cone_solution(seed=123456789, filename='lightcone.dat')
-
-# The list of halos to be masked out will come from the HaloProfiler.
-# Keyword arguments to be given to the halo profiler can be specified 
-# in the form of a dictionary.
-halo_profiler_kwargs = {'halo_list_file': 'HopAnalysis.out'}
-
-# Any actions the HaloProfiler is to perform are given in a list.
-halo_profiler_actions = []
-
-# Each list item contains a dictionary with entries for the function to 
-# be called ("function"), the arguments of the function ("args"), and the 
-# keyword arguments of the function ("kwargs").
-# This item will add a virial filter.
-halo_profiler_actions.append({'function': amods.halo_profiler.HaloProfiler.add_halo_filter,
-                              'args': [amods.halo_profiler.VirialFilter],
-                              'kwargs': {'must_be_virialized':True, 
-                                         'overdensity_field':'ActualOverdensity',
-                                         'virial_overdensity':200,
-                                         'virial_filters':[['TotalMassMsun','>','1e14']],
-                                         'virial_quantities':['TotalMassMsun','RadiusMpc']}})
-
-# This item will call the make_profile method to get the filtered halo list.
-halo_profiler_actions.append({'function': amods.halo_profiler.HaloProfiler.make_profiles,
-                              'kwargs': {'filename': "virial_filter.out"}})
-
-# Specify the desired halo list is the filtered list.
-# If 'all' is given instead, the full list will be used.
-halo_list = 'filtered'
-
-# Get the halo list for the active solution of this light cone using 
-# the HaloProfiler settings set up above.
-# Write the boolean map to an hdf5 file called 'halo_mask.h5'.
-# Write a text file detailing the location, redshift, radius, and mass 
-# of each halo in light cone projection.
-lc.get_halo_mask(mask_file='halo_mask.h5', map_file='halo_map.out',
-                 halo_profiler_kwargs=halo_profiler_kwargs,
-                 halo_profiler_actions=halo_profiler_actions,
-                 halo_list=halo_list)
-
-# This will be the field to be projected.
-field = 'SZY'
-
-# Make the light cone projection and apply the halo mask.
-pc = lc.project_light_cone(field, save_stack=True, save_slice_images=True,
-                           add_redshift_label=True, apply_halo_mask=True)


diff -r e9713a6df993f2c62fdb363afda95345881c6e8c -r e4823007a84a941abf5b3e3ec82c8291715dd89b recipes/unique_light_cones.py
--- a/recipes/unique_light_cones.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-The following recipe will create 15 light cone projections that have 
-at most 10% volume in common with each other.
-"""
-from yt.mods import *
-
-# Instantiate a light cone object as usual.
-lc = amods.light_cone.LightCone(
-                  "128Mpc256grid_SFFB.param", initial_redshift=0.4, 
-                  final_redshift=0.0, observer_redshift=0.0,
-                  field_of_view_in_arcminutes=120.0, 
-                  image_resolution_in_arcseconds=60.0,
-                  use_minimum_datasets=True, deltaz_min=0.0, 
-                  minimum_coherent_box_fraction=0.0,
-                  output_dir='LC', output_prefix='LightCone')
-
-# Try to find 15 solutions that have at most 10% volume in 
-# common and give up after 50 consecutive failed attempts.
-# The recycle=True setting tells the code to first attempt 
-# to use recycled solutions before trying completely 
-# independent solutions. 
-LC.find_unique_solutions(lc, max_overlap=0.10, failures=50, 
-                         seed=123456789, recycle=True,
-                         solutions=15, filename='unique.dat')
-
-# Make light cone projections with each of the random seeds 
-# found above.  All output files will be written with unique 
-# names based on the random seed numbers.  All keyword arguments 
-# accepted by project_light_cone can be given here as well.
-field = 'SZY'
-LC.project_unique_light_cones(lc, 'unique.dat', field)

Repository URL: https://bitbucket.org/yt_analysis/cookbook/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list