[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Apr 7 12:38:16 PDT 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/5bfe471daf43/
Changeset: 5bfe471daf43
Branch: yt
User: jmoloney
Date: 2016-04-06 22:50:29+00:00
Summary: Removing outdated and broken Rockstar halo loading (replaced by Rockstar frontend).
Affected #: 3 files
diff -r 2b15ed4adb92292dc18d50f778b813f7e003cfc3 -r 5bfe471daf43204c2b8161cfa069e21ba525f11c yt/analysis_modules/halo_finding/api.py
--- a/yt/analysis_modules/halo_finding/api.py
+++ b/yt/analysis_modules/halo_finding/api.py
@@ -28,7 +28,4 @@
HaloFinder, \
LoadHaloes, \
LoadTextHalos, \
- LoadTextHaloes, \
- RockstarHalo, \
- RockstarHaloList, \
- LoadRockstarHalos
+ LoadTextHaloes
diff -r 2b15ed4adb92292dc18d50f778b813f7e003cfc3 -r 5bfe471daf43204c2b8161cfa069e21ba525f11c yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py
+++ b/yt/analysis_modules/halo_finding/halo_objects.py
@@ -560,126 +560,6 @@
return (mag_A, mag_B, mag_C, e0_vector[0], e0_vector[1],
e0_vector[2], tilt)
-class RockstarHalo(Halo):
- _name = "RockstarHalo"
- # See particle_mask
- _radjust = 4.
-
- def maximum_density(self):
- r"""Not implemented."""
- return -1
-
- def maximum_density_location(self):
- r"""Not implemented."""
- return self.center_of_mass()
-
- def write_particle_list(self,handle):
- r"""Not implemented."""
- return -1
-
- def virial_mass(self):
- r"""Virial mass in Msun/h"""
- return self.supp['m']
-
- def virial_radius(self):
- r"""Virial radius in Mpc/h comoving"""
- return self.supp['r']
-
- def __getitem__(self, key):
- # This function will try to get particle data in one of three ways,
- # in descending preference.
- # 1. From saved_fields, e.g. we've already got it.
- # 2. From the halo binary files off disk.
- # 3. Use the unique particle indexes of the halo to select a missing
- # field from a Sphere.
- if key in self._saved_fields:
- # We've already got it.
- return self._saved_fields[key]
- # Gotta go get it from the Rockstar binary file.
- if key == 'particle_index':
- IDs = self._get_particle_data(self.supp['id'],
- self.halo_list.halo_to_fname, self.size, key)
- IDs = IDs[IDs.argsort()]
- self._saved_fields[key] = IDs
- return self._saved_fields[key]
- # We won't store this field below in saved_fields because
- # that would mean keeping two copies of it, one in the yt
- # machinery and one here.
- ds = self.ds.sphere(self.CoM, 4 * self.max_radius)
- return np.take(ds[key][self._ds_sort], self.particle_mask)
-
- def _get_particle_data(self, halo, fnames, size, field):
- # Given a list of file names, a halo, its size, and the desired field,
- # this returns the particle indices for that halo.
- file = fnames[halo]
- mylog.info("Getting %d particles from Rockstar binary file %s.", self.supp['num_p'], file)
- fp = open(file, 'rb')
- # We need to skip past the header and all the halos.
- fp.seek(self.halo_list._header_dt.itemsize + \
- self.halo_list.fname_halos[file] * \
- self.halo_list._halo_dt.itemsize, os.SEEK_CUR)
- # Now we skip ahead to where this halos particles begin.
- fp.seek(self.supp['p_start'] * 8, os.SEEK_CUR)
- # And finally, read in the ids.
- IDs = np.fromfile(fp, dtype=np.int64, count=self.supp['num_p'])
- fp.close()
- return IDs
-
- def get_ellipsoid_parameters(self):
- r"""Calculate the parameters that describe the ellipsoid of
- the particles that constitute the halo.
-
- Parameters
- ----------
- None
-
- Returns
- -------
- tuple : (cm, mag_A, mag_B, mag_C, e0_vector, tilt)
- The 6-tuple has in order:
- #. The center of mass as an array.
- #. mag_A as a float.
- #. mag_B as a float.
- #. mag_C as a float.
- #. e0_vector as an array.
- #. tilt as a float.
-
- Examples
- --------
- >>> params = halos[0].get_ellipsoid_parameters()
- """
- basic_parameters = self._get_ellipsoid_parameters_basic()
- toreturn = [self.center_of_mass()]
- updated = [basic_parameters[0], basic_parameters[1],
- basic_parameters[2], np.array([basic_parameters[3],
- basic_parameters[4], basic_parameters[5]]), basic_parameters[6]]
- toreturn.extend(updated)
- return tuple(toreturn)
-
- def get_ellipsoid(self):
- r"""Returns an ellipsoidal data object.
-
- This will generate a new, empty ellipsoidal data object for this
- halo.
-
- Parameters
- ----------
- None.
-
- Returns
- -------
- ellipsoid : `yt.data_objects.data_containers.YTEllipsoid`
- The ellipsoidal data object.
-
- Examples
- --------
- >>> ell = halos[0].get_ellipsoid()
- """
- ep = self.get_ellipsoid_parameters()
- ell = self.data.ds.ellipsoid(ep[0], ep[1], ep[2], ep[3],
- ep[4], ep[5])
- return ell
-
class HOPHalo(Halo):
_name = "HOPHalo"
pass
@@ -1126,134 +1006,6 @@
f.flush()
f.close()
-class RockstarHaloList(HaloList):
- _name = "Rockstar"
- _halo_class = RockstarHalo
- # see io_internal.h in Rockstar.
- BINARY_HEADER_SIZE=256
- _header_dt = np.dtype([('magic', np.uint64), ('snap', np.int64),
- ('chunk', np.int64), ('scale', np.float32), ('Om', np.float32),
- ('Ol', np.float32), ('h0', np.float32),
- ('bounds', (np.float32, 6)), ('num_halos', np.int64),
- ('num_particles', np.int64), ('box_size', np.float32),
- ('particle_mass', np.float32), ('particle_type', np.int64),
- ('unused', (np.byte, BINARY_HEADER_SIZE - 4*12 - 8*6))])
- # see halo.h.
- _halo_dt = np.dtype([('id', np.int64), ('pos', (np.float32, 6)),
- ('corevel', (np.float32, 3)), ('bulkvel', (np.float32, 3)),
- ('m', np.float32), ('r', np.float32), ('child_r', np.float32),
- ('vmax_r', np.float32),
- ('mgrav', np.float32), ('vmax', np.float32),
- ('rvmax', np.float32), ('rs', np.float32),
- ('klypin_rs', np.float32),
- ('vrms', np.float32), ('J', (np.float32, 3)),
- ('energy', np.float32), ('spin', np.float32),
- ('alt_m', (np.float32, 4)), ('Xoff', np.float32),
- ('Voff', np.float32), ('b_to_a', np.float32),
- ('c_to_a', np.float32), ('A', (np.float32, 3)),
- ('bullock_spin', np.float32), ('kin_to_pot', np.float32),
- ('num_p', np.int64),
- ('num_child_particles', np.int64), ('p_start', np.int64),
- ('desc', np.int64), ('flags', np.int64), ('n_core', np.int64),
- ('min_pos_err', np.float32), ('min_vel_err', np.float32),
- ('min_bulkvel_err', np.float32), ('padding2', np.float32),])
- # Above, padding* are due to c byte ordering which pads between
- # 4 and 8 byte values in the struct as to not overlap memory registers.
- _tocleanup = ['padding2']
-
- def __init__(self, ds, out_list):
- ParallelAnalysisInterface.__init__(self)
- mylog.info("Initializing Rockstar List")
- self._data_source = None
- self._groups = []
- self._max_dens = -1
- self.ds = ds
- self.redshift = ds.current_redshift
- self.out_list = out_list
- self._data_source = ds.all_data()
- mylog.info("Parsing Rockstar halo list")
- self._parse_output()
- mylog.info("Finished %s"%out_list)
-
- def _run_finder(self):
- pass
-
- def __obtain_particles(self):
- pass
-
- def _get_dm_indices(self):
- pass
-
- def _get_halos_binary(self, files):
- """
- Parse the binary files to get information about halos in higher
- precision than the text file.
- """
- halos = None
- self.halo_to_fname = {}
- self.fname_halos = {}
- for file in files:
- fp = open(file, 'rb')
- # read the header
- header = np.fromfile(fp, dtype=self._header_dt, count=1)
- # read the halo information
- new_halos = np.fromfile(fp, dtype=self._halo_dt,
- count=header['num_halos'])
- # Record which binary file holds these halos.
- for halo in new_halos['id']:
- self.halo_to_fname[halo] = file
- # Record how many halos are stored in each binary file.
- self.fname_halos[file] = header['num_halos']
- # Add to existing.
- if halos is not None:
- halos = np.concatenate((new_halos, halos))
- else:
- halos = new_halos.copy()
- fp.close()
- # Sort them by mass.
- halos.sort(order='m')
- halos = np.flipud(halos)
- return halos
-
- def _parse_output(self):
- """
- Read the out_*.list text file produced
- by Rockstar into memory."""
-
- ds = self.ds
- # In order to read the binary data, we need to figure out which
- # binary files belong to this output.
- basedir = os.path.dirname(self.out_list)
- s = self.out_list.split('_')[-1]
- s = s.rstrip('.list')
- n = int(s)
- fglob = path.join(basedir, 'halos_%d.*.bin' % n)
- files = glob.glob(fglob)
- halos = self._get_halos_binary(files)
- length = 1.0 / ds['Mpchcm']
- conv = dict(pos = np.array([length, length, length,
- 1, 1, 1]), # to unitary
- r=1.0/ds['kpchcm'], # to unitary
- rs=1.0/ds['kpchcm'], # to unitary
- )
- #convert units
- for name in self._halo_dt.names:
- halos[name]=halos[name]*conv.get(name,1)
- # Store the halos in the halo list.
- for i, row in enumerate(halos):
- supp = {name:row[name] for name in self._halo_dt.names}
- # Delete the padding columns. 'supp' below will contain
- # repeated information, but that's OK.
- for item in self._tocleanup: del supp[item]
- halo = RockstarHalo(self, i, size=row['num_p'],
- CoM=row['pos'][0:3], group_total_mass=row['m'],
- max_radius=row['r'], bulk_vel=row['bulkvel'],
- rms_vel=row['vrms'], supp=supp)
- self._groups.append(halo)
-
- def write_particle_list(self):
- pass
-
class HOPHaloList(HaloList):
"""
Run hop on *data_source* with a given density *threshold*. If
@@ -1961,22 +1713,3 @@
TextHaloList.__init__(self, ds, filename, columns, comment)
LoadTextHalos = LoadTextHaloes
-
-class LoadRockstarHalos(GenericHaloFinder, RockstarHaloList):
- r"""Load Rockstar halos off disk from Rockstar-output format.
-
- Parameters
- ----------
- fname : String
- The name of the Rockstar file to read in. Default =
- "rockstar_halos/out_0.list'.
-
- Examples
- --------
- >>> ds = load("data0005")
- >>> halos = LoadRockstarHalos(ds, "other_name.out")
- """
- def __init__(self, ds, filename = None):
- if filename is None:
- filename = 'rockstar_halos/out_0.list'
- RockstarHaloList.__init__(self, ds, filename)
diff -r 2b15ed4adb92292dc18d50f778b813f7e003cfc3 -r 5bfe471daf43204c2b8161cfa069e21ba525f11c yt/analysis_modules/halo_finding/rockstar/rockstar.py
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar.py
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar.py
@@ -366,10 +366,3 @@
self.runner.run(self.handler, self.workgroup)
self.comm.barrier()
self.pool.free_all()
-
- def halo_list(self,file_name='out_0.list'):
- """
- Reads in the out_0.list file and generates RockstarHaloList
- and RockstarHalo objects.
- """
- return RockstarHaloList(self.ts[0], self.outbase+'/%s'%file_name)
https://bitbucket.org/yt_analysis/yt/commits/17018cfdd3cf/
Changeset: 17018cfdd3cf
Branch: yt
User: jmoloney
Date: 2016-04-06 23:02:35+00:00
Summary: Removing unused import.
Affected #: 1 file
diff -r 5bfe471daf43204c2b8161cfa069e21ba525f11c -r 17018cfdd3cf5fa2aeea5020c05fcfef34a3de21 yt/analysis_modules/halo_finding/rockstar/rockstar.py
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar.py
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar.py
@@ -21,8 +21,6 @@
is_root, mylog
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface, ProcessorPool
-from yt.analysis_modules.halo_finding.halo_objects import \
- RockstarHaloList
from yt.utilities.exceptions import YTRockstarMultiMassNotSupported
from . import rockstar_interface
https://bitbucket.org/yt_analysis/yt/commits/4d97401768f1/
Changeset: 4d97401768f1
Branch: yt
User: jmoloney
Date: 2016-04-07 17:31:12+00:00
Summary: Removed unused imports.
Affected #: 1 file
diff -r 17018cfdd3cf5fa2aeea5020c05fcfef34a3de21 -r 4d97401768f14c1c67a3a57ab43a77c1f08322c7 yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py
+++ b/yt/analysis_modules/halo_finding/halo_objects.py
@@ -17,8 +17,6 @@
from yt.utilities.on_demand_imports import _h5py as h5py
import math
import numpy as np
-import glob
-import os
import os.path as path
from functools import cmp_to_key
from yt.extern.six import add_metaclass
https://bitbucket.org/yt_analysis/yt/commits/c7470f10bdc0/
Changeset: c7470f10bdc0
Branch: yt
User: ngoldbaum
Date: 2016-04-07 19:38:00+00:00
Summary: Merged in jmoloney/yt (pull request #2113)
Removing old Rockstar halo loading
Affected #: 3 files
diff -r d5af145f1ac7993c2f94c2a4cc0d75824d019f98 -r c7470f10bdc0a7851036a0baa30d88f1d65e4c9c yt/analysis_modules/halo_finding/api.py
--- a/yt/analysis_modules/halo_finding/api.py
+++ b/yt/analysis_modules/halo_finding/api.py
@@ -28,7 +28,4 @@
HaloFinder, \
LoadHaloes, \
LoadTextHalos, \
- LoadTextHaloes, \
- RockstarHalo, \
- RockstarHaloList, \
- LoadRockstarHalos
+ LoadTextHaloes
diff -r d5af145f1ac7993c2f94c2a4cc0d75824d019f98 -r c7470f10bdc0a7851036a0baa30d88f1d65e4c9c yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py
+++ b/yt/analysis_modules/halo_finding/halo_objects.py
@@ -17,8 +17,6 @@
from yt.utilities.on_demand_imports import _h5py as h5py
import math
import numpy as np
-import glob
-import os
import os.path as path
from functools import cmp_to_key
from yt.extern.six import add_metaclass
@@ -560,126 +558,6 @@
return (mag_A, mag_B, mag_C, e0_vector[0], e0_vector[1],
e0_vector[2], tilt)
-class RockstarHalo(Halo):
- _name = "RockstarHalo"
- # See particle_mask
- _radjust = 4.
-
- def maximum_density(self):
- r"""Not implemented."""
- return -1
-
- def maximum_density_location(self):
- r"""Not implemented."""
- return self.center_of_mass()
-
- def write_particle_list(self,handle):
- r"""Not implemented."""
- return -1
-
- def virial_mass(self):
- r"""Virial mass in Msun/h"""
- return self.supp['m']
-
- def virial_radius(self):
- r"""Virial radius in Mpc/h comoving"""
- return self.supp['r']
-
- def __getitem__(self, key):
- # This function will try to get particle data in one of three ways,
- # in descending preference.
- # 1. From saved_fields, e.g. we've already got it.
- # 2. From the halo binary files off disk.
- # 3. Use the unique particle indexes of the halo to select a missing
- # field from a Sphere.
- if key in self._saved_fields:
- # We've already got it.
- return self._saved_fields[key]
- # Gotta go get it from the Rockstar binary file.
- if key == 'particle_index':
- IDs = self._get_particle_data(self.supp['id'],
- self.halo_list.halo_to_fname, self.size, key)
- IDs = IDs[IDs.argsort()]
- self._saved_fields[key] = IDs
- return self._saved_fields[key]
- # We won't store this field below in saved_fields because
- # that would mean keeping two copies of it, one in the yt
- # machinery and one here.
- ds = self.ds.sphere(self.CoM, 4 * self.max_radius)
- return np.take(ds[key][self._ds_sort], self.particle_mask)
-
- def _get_particle_data(self, halo, fnames, size, field):
- # Given a list of file names, a halo, its size, and the desired field,
- # this returns the particle indices for that halo.
- file = fnames[halo]
- mylog.info("Getting %d particles from Rockstar binary file %s.", self.supp['num_p'], file)
- fp = open(file, 'rb')
- # We need to skip past the header and all the halos.
- fp.seek(self.halo_list._header_dt.itemsize + \
- self.halo_list.fname_halos[file] * \
- self.halo_list._halo_dt.itemsize, os.SEEK_CUR)
- # Now we skip ahead to where this halos particles begin.
- fp.seek(self.supp['p_start'] * 8, os.SEEK_CUR)
- # And finally, read in the ids.
- IDs = np.fromfile(fp, dtype=np.int64, count=self.supp['num_p'])
- fp.close()
- return IDs
-
- def get_ellipsoid_parameters(self):
- r"""Calculate the parameters that describe the ellipsoid of
- the particles that constitute the halo.
-
- Parameters
- ----------
- None
-
- Returns
- -------
- tuple : (cm, mag_A, mag_B, mag_C, e0_vector, tilt)
- The 6-tuple has in order:
- #. The center of mass as an array.
- #. mag_A as a float.
- #. mag_B as a float.
- #. mag_C as a float.
- #. e0_vector as an array.
- #. tilt as a float.
-
- Examples
- --------
- >>> params = halos[0].get_ellipsoid_parameters()
- """
- basic_parameters = self._get_ellipsoid_parameters_basic()
- toreturn = [self.center_of_mass()]
- updated = [basic_parameters[0], basic_parameters[1],
- basic_parameters[2], np.array([basic_parameters[3],
- basic_parameters[4], basic_parameters[5]]), basic_parameters[6]]
- toreturn.extend(updated)
- return tuple(toreturn)
-
- def get_ellipsoid(self):
- r"""Returns an ellipsoidal data object.
-
- This will generate a new, empty ellipsoidal data object for this
- halo.
-
- Parameters
- ----------
- None.
-
- Returns
- -------
- ellipsoid : `yt.data_objects.data_containers.YTEllipsoid`
- The ellipsoidal data object.
-
- Examples
- --------
- >>> ell = halos[0].get_ellipsoid()
- """
- ep = self.get_ellipsoid_parameters()
- ell = self.data.ds.ellipsoid(ep[0], ep[1], ep[2], ep[3],
- ep[4], ep[5])
- return ell
-
class HOPHalo(Halo):
_name = "HOPHalo"
pass
@@ -1126,134 +1004,6 @@
f.flush()
f.close()
-class RockstarHaloList(HaloList):
- _name = "Rockstar"
- _halo_class = RockstarHalo
- # see io_internal.h in Rockstar.
- BINARY_HEADER_SIZE=256
- _header_dt = np.dtype([('magic', np.uint64), ('snap', np.int64),
- ('chunk', np.int64), ('scale', np.float32), ('Om', np.float32),
- ('Ol', np.float32), ('h0', np.float32),
- ('bounds', (np.float32, 6)), ('num_halos', np.int64),
- ('num_particles', np.int64), ('box_size', np.float32),
- ('particle_mass', np.float32), ('particle_type', np.int64),
- ('unused', (np.byte, BINARY_HEADER_SIZE - 4*12 - 8*6))])
- # see halo.h.
- _halo_dt = np.dtype([('id', np.int64), ('pos', (np.float32, 6)),
- ('corevel', (np.float32, 3)), ('bulkvel', (np.float32, 3)),
- ('m', np.float32), ('r', np.float32), ('child_r', np.float32),
- ('vmax_r', np.float32),
- ('mgrav', np.float32), ('vmax', np.float32),
- ('rvmax', np.float32), ('rs', np.float32),
- ('klypin_rs', np.float32),
- ('vrms', np.float32), ('J', (np.float32, 3)),
- ('energy', np.float32), ('spin', np.float32),
- ('alt_m', (np.float32, 4)), ('Xoff', np.float32),
- ('Voff', np.float32), ('b_to_a', np.float32),
- ('c_to_a', np.float32), ('A', (np.float32, 3)),
- ('bullock_spin', np.float32), ('kin_to_pot', np.float32),
- ('num_p', np.int64),
- ('num_child_particles', np.int64), ('p_start', np.int64),
- ('desc', np.int64), ('flags', np.int64), ('n_core', np.int64),
- ('min_pos_err', np.float32), ('min_vel_err', np.float32),
- ('min_bulkvel_err', np.float32), ('padding2', np.float32),])
- # Above, padding* are due to c byte ordering which pads between
- # 4 and 8 byte values in the struct as to not overlap memory registers.
- _tocleanup = ['padding2']
-
- def __init__(self, ds, out_list):
- ParallelAnalysisInterface.__init__(self)
- mylog.info("Initializing Rockstar List")
- self._data_source = None
- self._groups = []
- self._max_dens = -1
- self.ds = ds
- self.redshift = ds.current_redshift
- self.out_list = out_list
- self._data_source = ds.all_data()
- mylog.info("Parsing Rockstar halo list")
- self._parse_output()
- mylog.info("Finished %s"%out_list)
-
- def _run_finder(self):
- pass
-
- def __obtain_particles(self):
- pass
-
- def _get_dm_indices(self):
- pass
-
- def _get_halos_binary(self, files):
- """
- Parse the binary files to get information about halos in higher
- precision than the text file.
- """
- halos = None
- self.halo_to_fname = {}
- self.fname_halos = {}
- for file in files:
- fp = open(file, 'rb')
- # read the header
- header = np.fromfile(fp, dtype=self._header_dt, count=1)
- # read the halo information
- new_halos = np.fromfile(fp, dtype=self._halo_dt,
- count=header['num_halos'])
- # Record which binary file holds these halos.
- for halo in new_halos['id']:
- self.halo_to_fname[halo] = file
- # Record how many halos are stored in each binary file.
- self.fname_halos[file] = header['num_halos']
- # Add to existing.
- if halos is not None:
- halos = np.concatenate((new_halos, halos))
- else:
- halos = new_halos.copy()
- fp.close()
- # Sort them by mass.
- halos.sort(order='m')
- halos = np.flipud(halos)
- return halos
-
- def _parse_output(self):
- """
- Read the out_*.list text file produced
- by Rockstar into memory."""
-
- ds = self.ds
- # In order to read the binary data, we need to figure out which
- # binary files belong to this output.
- basedir = os.path.dirname(self.out_list)
- s = self.out_list.split('_')[-1]
- s = s.rstrip('.list')
- n = int(s)
- fglob = path.join(basedir, 'halos_%d.*.bin' % n)
- files = glob.glob(fglob)
- halos = self._get_halos_binary(files)
- length = 1.0 / ds['Mpchcm']
- conv = dict(pos = np.array([length, length, length,
- 1, 1, 1]), # to unitary
- r=1.0/ds['kpchcm'], # to unitary
- rs=1.0/ds['kpchcm'], # to unitary
- )
- #convert units
- for name in self._halo_dt.names:
- halos[name]=halos[name]*conv.get(name,1)
- # Store the halos in the halo list.
- for i, row in enumerate(halos):
- supp = {name:row[name] for name in self._halo_dt.names}
- # Delete the padding columns. 'supp' below will contain
- # repeated information, but that's OK.
- for item in self._tocleanup: del supp[item]
- halo = RockstarHalo(self, i, size=row['num_p'],
- CoM=row['pos'][0:3], group_total_mass=row['m'],
- max_radius=row['r'], bulk_vel=row['bulkvel'],
- rms_vel=row['vrms'], supp=supp)
- self._groups.append(halo)
-
- def write_particle_list(self):
- pass
-
class HOPHaloList(HaloList):
"""
Run hop on *data_source* with a given density *threshold*. If
@@ -1961,22 +1711,3 @@
TextHaloList.__init__(self, ds, filename, columns, comment)
LoadTextHalos = LoadTextHaloes
-
-class LoadRockstarHalos(GenericHaloFinder, RockstarHaloList):
- r"""Load Rockstar halos off disk from Rockstar-output format.
-
- Parameters
- ----------
- fname : String
- The name of the Rockstar file to read in. Default =
- "rockstar_halos/out_0.list'.
-
- Examples
- --------
- >>> ds = load("data0005")
- >>> halos = LoadRockstarHalos(ds, "other_name.out")
- """
- def __init__(self, ds, filename = None):
- if filename is None:
- filename = 'rockstar_halos/out_0.list'
- RockstarHaloList.__init__(self, ds, filename)
diff -r d5af145f1ac7993c2f94c2a4cc0d75824d019f98 -r c7470f10bdc0a7851036a0baa30d88f1d65e4c9c yt/analysis_modules/halo_finding/rockstar/rockstar.py
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar.py
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar.py
@@ -21,8 +21,6 @@
is_root, mylog
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface, ProcessorPool
-from yt.analysis_modules.halo_finding.halo_objects import \
- RockstarHaloList
from yt.utilities.exceptions import YTRockstarMultiMassNotSupported
from . import rockstar_interface
@@ -366,10 +364,3 @@
self.runner.run(self.handler, self.workgroup)
self.comm.barrier()
self.pool.free_all()
-
- def halo_list(self,file_name='out_0.list'):
- """
- Reads in the out_0.list file and generates RockstarHaloList
- and RockstarHalo objects.
- """
- return RockstarHaloList(self.ts[0], self.outbase+'/%s'%file_name)
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160407/c7f83208/attachment.html>
More information about the yt-svn
mailing list