yt / yt /

Full commit
Matthew Turk 11a938d 

Matthew Turk 80e4339 

Matthew Turk 23e94da 
Matthew Turk 80e4339 
Matthew Turk 8089c8d 
Matthew Turk 11a938d 

Casey Stark 996015e 
Matthew Turk 11a938d 

Casey Stark 996015e 
Matthew Turk 11a938d 

Matthew Turk 0366470 

Matthew Turk 3fb3e19 

Matthew Turk 11a938d 
Matthew Turk 3fb3e19 
Matthew Turk 20f28b6 

Anthony Scopatz 8e9b059 
Matthew Turk 20f28b6 
Matthew Turk 4679d9e 
Matthew Turk 64ee726 

Matthew Turk e1ba861 
Matthew Turk 64ee726 
Matthew Turk 972aa3f 
Matthew Turk 4679d9e 

Matthew Turk 319900e 
Matthew Turk 6570505 
Matthew Turk 4679d9e 
Matthew Turk 319900e 

Anthony Scopatz 8e9b059 
Matthew Turk 319900e 
Matthew Turk 4679d9e 

Matthew Turk 0366470 
Matthew Turk 2e2e92e 
John ZuHone e2f8c91 
Sam Skillman 1f8f3d5 
Matthew Turk 4679d9e 
Matthew Turk 672c309 

Matthew Turk 4679d9e 
Britton Smith be3f7a6 

Matthew Turk 4679d9e 

Matthew Turk 71abe46 

Matthew Turk 23786f4 
Matthew Turk 7f00336 
Casey Stark 996015e 
Matthew Turk 4679d9e 

Matthew Turk 11a938d 
Sam Skillman 67fc87e 

Sam Skillman 37540bd 

Matthew Turk a253b14 

Matthew Turk 1bb4506 

Chris Malone 931f1df 
Matthew Turk eab5391 
Matthew Turk 2026a9e 
Matthew Turk eab5391 

Matthew Turk 136796a 
Matthew Turk 00c985b 

Matthew Turk 136796a 

Matthew Turk ac936f5 
Matthew Turk 80e4339 
Matthew Turk 19cc339 
Matthew Turk 2ebf193 

Matthew Turk 0dbb56e 
Nathan Goldbaum 079ce90 
Nathan Goldbaum 7974389 
Matthew Turk 1c3c780 

Matthew Turk ddafd28 
Nathan Goldbaum fedd5bd 
Matthew Turk 25370ee 
Matthew Turk 28d6044 

Matthew Turk 2ebf193 

Matthew Turk 80e4339 
Britton Smith 0ca36e0 

Matthew Turk 7b63376 
Cameron Hummels 4e45446 

Matthew Turk 28d6044 
Matthew Turk 7b63376 

Matthew Turk 447be10 

Matthew Turk 7b63376 
Matthew Turk a163f53 
Matthew Turk 893b363 
Matthew Turk a163f53 
Matthew Turk 893b363 

Very simple convenience function for importing all the modules, setting up
the namespace and getting the last argument on the command line.

Author: Matthew Turk <>
Affiliation: KIPAC/SLAC/Stanford
  Copyright (C) 2008-2011 Matthew Turk.  All Rights Reserved.

  This file is part of yt.

  yt is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <>.

from __future__ import absolute_import


# First module imports
import sys, types, os, glob, cPickle, time
import numpy as na # For historical reasons
import numpy as np # For modern purposes
import numpy # In case anyone wishes to use it by name

# This next item will handle most of the actual startup procedures, but it will
# also attempt to parse the command line and set up the global state of various
# operations.

import yt.startup_tasks as __startup_tasks
unparsed_args = __startup_tasks.unparsed_args

from yt.funcs import *
from yt.utilities.logger import ytLogger as mylog
from yt.utilities.performance_counters import yt_counters, time_function
from yt.config import ytcfg, ytcfgDefaults
import yt.utilities.physical_constants as physical_constants

from yt.utilities.logger import level as __level
if __level >= int(ytcfgDefaults["loglevel"]):
    # This won't get displayed.
    mylog.debug("Turning off NumPy error reporting")
    np.seterr(all = 'ignore')

from yt.data_objects.api import \
    BinnedProfile1D, BinnedProfile2D, BinnedProfile3D, \
    data_object_registry, \
    derived_field, add_field, FieldInfo, \
    ValidateParameter, ValidateDataField, ValidateProperty, \
    ValidateSpatial, ValidateGridType, \
    TimeSeriesData, AnalysisTask, analysis_task, \
    ParticleTrajectoryCollection, ImageArray

from yt.data_objects.derived_quantities import \
    add_quantity, quantity_info

from yt.frontends.enzo.api import \
    EnzoStaticOutput, EnzoStaticOutputInMemory, \
    EnzoSimulation, EnzoFieldInfo, \
    add_enzo_field, add_enzo_1d_field, add_enzo_2d_field

from yt.frontends.castro.api import \
    CastroStaticOutput, CastroFieldInfo, add_castro_field

from yt.frontends.nyx.api import \
    NyxStaticOutput, NyxFieldInfo, add_nyx_field

from yt.frontends.orion.api import \
    OrionStaticOutput, OrionFieldInfo, add_orion_field

from yt.frontends.flash.api import \
    FLASHStaticOutput, FLASHFieldInfo, add_flash_field

from yt.frontends.tiger.api import \
    TigerStaticOutput, TigerFieldInfo, add_tiger_field

from yt.frontends.ramses.api import \
    RAMSESStaticOutput, RAMSESFieldInfo, add_ramses_field

from yt.frontends.chombo.api import \
    ChomboStaticOutput, ChomboFieldInfo, add_chombo_field

from yt.frontends.gdf.api import \
    GDFStaticOutput, GDFFieldInfo, add_gdf_field

from yt.frontends.athena.api import \
    AthenaStaticOutput, AthenaFieldInfo, add_athena_field

from import \
    ARTStaticOutput, ARTFieldInfo, add_art_field

#from yt.frontends.maestro.api import \
#    MaestroStaticOutput, MaestroFieldInfo, add_maestro_field

from yt.analysis_modules.list_modules import \
    get_available_modules, amods
available_analysis_modules = get_available_modules()

# Import our analysis modules
from yt.analysis_modules.halo_finding.api import \

from yt.utilities.definitions import \
    axis_names, x_dict, y_dict, inv_axis_names

# Now individual component imports from the visualization API
from yt.visualization.api import \
    PlotCollection, PlotCollectionInteractive, \
    get_multi_plot, FixedResolutionBuffer, ObliqueFixedResolutionBuffer, \
    callback_registry, write_bitmap, write_image, annotate_image, \
    apply_colormap, scale_image, write_projection, write_fits, \
    SlicePlot, OffAxisSlicePlot, ProjectionPlot, OffAxisProjectionPlot

from yt.visualization.volume_rendering.api import \
    ColorTransferFunction, PlanckTransferFunction, ProjectionTransferFunction, \
    HomogenizedVolume, Camera, off_axis_projection, MosaicFisheyeCamera

from yt.utilities.parallel_tools.parallel_analysis_interface import \

for name, cls in callback_registry.items():
    exec("%s = cls" % name)

from yt.convenience import \
    load, projload, simulation

# Import some helpful math utilities
from yt.utilities.math_utils import \
    ortho_find, quartiles

# We load plugins.  Keep in mind, this can be fairly dangerous -
# the primary purpose is to allow people to have a set of functions
# that get used every time that they don't have to *define* every time.
# This way, other command-line tools can be used very simply.
# Unfortunately, for now, I think the easiest and simplest way of doing
# this is also the most dangerous way.
if ytcfg.getboolean("yt","loadfieldplugins"):
    my_plugin_name = ytcfg.get("yt","pluginfilename")
    # We assume that it is with respect to the $HOME/.yt directory
    if os.path.isfile(my_plugin_name):
        _fn = my_plugin_name
        _fn = os.path.expanduser("~/.yt/%s" % my_plugin_name)
    if os.path.isfile(_fn):"Loading plugins from %s", _fn)