Native Enzo Data Structures

class yt.lagos.EnzoStaticOutput(filename, data_style=None, parameter_override=None, conversion_override=None)

Enzo-specific output, set at a fixed time.

This class is a stripped down class that simply reads and parses filename without looking at the hierarchy. data_style gets passed to the hierarchy to pre-determine the style of data-output. However, it is not strictly necessary. Optionally you may specify a parameter_override dictionary that will override anything in the paarmeter file and a conversion_override dictionary that consists of {fieldname : conversion_to_cgs} that will override the #DataCGS.

cosmology_get_units()
Return an Enzo-fortran style dictionary of units to feed into custom routines. This is typically only necessary if you are interacting with fortran code.
class yt.lagos.EnzoHierarchy(pf, data_style=None)

This is the grid structure as Enzo sees it, with some added bonuses. It’s primarily used as a class factor, to generate data objects and access grids.

It should never be created directly – you should always access it via calls to an affiliated EnzoStaticOutput.

On instantiation, it processes the hierarchy and generates the grids.

export_boxes_pv(filename)
Exports the grid structure in partiview text format.
export_particles_pb(filename, filter=1, indexboundary=0, fields=None, scale=1.0)
Exports all the star particles, or a subset, to pb-format filename for viewing in partiview. Filters based on particle_type=*filter*, particle_index>=*indexboundary*, and exports fields, if supplied. Otherwise, index, position(x,y,z). Optionally scale by a given factor before outputting.
findMax(field, finestLevels=True)
Returns (value, center) of location of maximum for a given field.
find_max(field, finestLevels=True)
Returns (value, center) of location of maximum for a given field.
find_min(field)
Returns (value, center) of location of minimum for a given field
find_point(coord)
Returns the (objects, indices) of grids containing an (x,y,z) point
find_ray_grids(coord, axis)
Returns the (objects, indices) of grids that an (x,y) ray intersects along axis
find_slice_grids(coord, axis)
Returns the (objects, indices) of grids that a slice intersects along axis
find_sphere_grids(center, radius)
Returns objects, indices of grids within a sphere
get_box_grids(left_edge, right_edge)
Gets back all the grids between a left edge and right edge
get_data(node, name)
Return the dataset with a given name located at node in the datafile.
get_smallest_dx()
Returns (in code units) the smallest cell size in the simulation.
print_stats()
Prints out (stdout) relevant information about the simulation
save_data(array, node, name, set_attr=None, force=False)
Arbitrary numpy data will be saved to the region in the datafile described by node and name. If data file does not exist, it throws no error and simply does not save.
select_grids(level)
Returns an array of grids at level.
class yt.lagos.EnzoGridBase(id, filename=None, hierarchy=None)

Returns an instance of EnzoGrid with id, associated with filename and hierarchy.

clear_all()
Clears all datafields from memory and calls clear_derived_quantities().
clear_all_grid_references()
This clears out all references this grid has to any others, as well as the hierarchy. It’s like extra-cleaning after clear_data.
clear_data()
Clear out the following things: child_mask, child_indices, all fields, all field parameters.
clear_derived_quantities()
Clears coordinates, child_indices, child_mask.
find_max(field)
Returns value, index of maximum value of field in this gird
find_min(field)
Returns value, index of minimum value of field in this gird
get_data(field)
Returns a field or set of fields for a key or set of keys
get_global_startindex()
Return the integer starting index for each dimension at the current level.
get_position(index)
Returns center position of an index
set_filename(filename)
Intelligently set the filename.

Previous topic

yt.lagos - Data Handling and Analysis

Next topic

Data Containers

This Page

Quick search