[yt-svn] commit/yt-3.0: 26 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Sep 25 13:02:47 PDT 2013
26 new commits in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/7a7ca4d5a1b3/
Changeset: 7a7ca4d5a1b3
Branch: yt
User: MatthewTurk
Date: 2013-09-12 21:25:58
Summary: Merged in MatthewTurk/yt (pull request #596)
Relicensing to BSD 3-clause
Feels like kind of a big deal. Thanks to everybody who participated, and hopefully things only go up from here.
Affected #: 402 files
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -5156,3 +5156,4 @@
0000000000000000000000000000000000000000 mpi-opaque
f15825659f5af3ce64aaad30062aff3603cbfb66 hop callback
0000000000000000000000000000000000000000 hop callback
+079e456c38a87676472a458210077e2be325dc85 last_gplv3
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 COPYING.txt
--- /dev/null
+++ b/COPYING.txt
@@ -0,0 +1,81 @@
+===============================
+ The yt project licensing terms
+===============================
+
+yt is licensed under the terms of the Modified BSD License (also known as New
+or Revised BSD), as follows:
+
+Copyright (c) 2013-, yt Development Team
+Copyright (c) 2006-2013, Matthew Turk <matthewturk at gmail.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+Neither the name of the yt Development Team nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+About the yt Development Team
+-----------------------------
+
+Matthew Turk began yt in 2006 and remains the project lead. Over time yt has
+grown to include contributions from a large number of individuals from many
+diverse institutions, scientific, and technical backgrounds.
+
+Until the fall of 2013, yt was licensed under the GPLv3. However, with consent
+from all developers and on a public mailing list, yt has been relicensed under
+the BSD 3-clause under a shared copyright model. For more information, see:
+http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2013-July/003239.html
+All versions of yt prior to this licensing change are available under the
+GPLv3; all subsequent versions are available under the BSD 3-clause license.
+
+The yt Development Team is the set of all contributors to the yt project. This
+includes all of the yt subprojects.
+
+The core team that coordinates development on BitBucket can be found here:
+http://bitbucket.org/yt_analysis/
+
+
+Our Copyright Policy
+--------------------
+
+yt uses a shared copyright model. Each contributor maintains copyright
+over their contributions to yt. But, it is important to note that these
+contributions are typically only changes to the repositories. Thus, the yt
+source code, in its entirety is not the copyright of any single person or
+institution. Instead, it is the collective copyright of the entire yt
+Development Team. If individual contributors want to maintain a record of what
+changes/contributions they have specific copyright on, they should indicate
+their copyright in the commit message of the change, when they commit the
+change to one of the yt repositories.
+
+With this in mind, the following banner should be used in any source code file
+to indicate the copyright and license terms:
+
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 CREDITS
--- a/CREDITS
+++ b/CREDITS
@@ -1,51 +1,55 @@
-YT is a group effort.
+yt is a group effort.
-Contributors: Tom Abel (tabel at stanford.edu)
- David Collins (dcollins at physics.ucsd.edu)
- Brian Crosby (crosby.bd at gmail.com)
- Andrew Cunningham (ajcunn at gmail.com)
- Nathan Goldbaum (goldbaum at ucolick.org)
- Markus Haider (markus.haider at uibk.ac.at)
- Cameron Hummels (chummels at gmail.com)
- Christian Karch (chiffre at posteo.de)
- Ji-hoon Kim (me at jihoonkim.org)
- Steffen Klemer (sklemer at phys.uni-goettingen.de)
- Kacper Kowalik (xarthisius.kk at gmail.com)
- Michael Kuhlen (mqk at astro.berkeley.edu)
- Eve Lee (elee at cita.utoronto.ca)
- Yuan Li (yuan at astro.columbia.edu)
- Chris Malone (chris.m.malone at gmail.com)
- Josh Maloney (joshua.moloney at colorado.edu)
- Chris Moody (cemoody at ucsc.edu)
- Andrew Myers (atmyers at astro.berkeley.edu)
- Jeff Oishi (jsoishi at gmail.com)
- Jean-Claude Passy (jcpassy at uvic.ca)
- Mark Richardson (Mark.L.Richardson at asu.edu)
- Thomas Robitaille (thomas.robitaille at gmail.com)
- Anna Rosen (rosen at ucolick.org)
- Anthony Scopatz (scopatz at gmail.com)
- Devin Silvia (devin.silvia at colorado.edu)
- Sam Skillman (samskillman at gmail.com)
- Stephen Skory (s at skory.us)
- Britton Smith (brittonsmith at gmail.com)
- Geoffrey So (gsiisg at gmail.com)
- Casey Stark (caseywstark at gmail.com)
- Elizabeth Tasker (tasker at astro1.sci.hokudai.ac.jp)
- Stephanie Tonnesen (stonnes at gmail.com)
- Matthew Turk (matthewturk at gmail.com)
- Rich Wagner (rwagner at physics.ucsd.edu)
- John Wise (jwise at physics.gatech.edu)
- John ZuHone (jzuhone at gmail.com)
+Contributors:
+ Tom Abel (tabel at stanford.edu)
+ David Collins (dcollins at physics.ucsd.edu)
+ Brian Crosby (crosby.bd at gmail.com)
+ Andrew Cunningham (ajcunn at gmail.com)
+ Hilary Egan (hilaryye at gmail.com)
+ John Forces (jforbes at ucolick.org)
+ Nathan Goldbaum (goldbaum at ucolick.org)
+ Markus Haider (markus.haider at uibk.ac.at)
+ Cameron Hummels (chummels at gmail.com)
+ Christian Karch (chiffre at posteo.de)
+ Ji-hoon Kim (me at jihoonkim.org)
+ Steffen Klemer (sklemer at phys.uni-goettingen.de)
+ Kacper Kowalik (xarthisius.kk at gmail.com)
+ Michael Kuhlen (mqk at astro.berkeley.edu)
+ Eve Lee (elee at cita.utoronto.ca)
+ Sam Leitner (sam.leitner at gmail.com)
+ Yuan Li (yuan at astro.columbia.edu)
+ Chris Malone (chris.m.malone at gmail.com)
+ Josh Maloney (joshua.moloney at colorado.edu)
+ Chris Moody (cemoody at ucsc.edu)
+ Andrew Myers (atmyers at astro.berkeley.edu)
+ Jill Naiman (jnaiman at ucolick.org)
+ Kaylea Nelson (kaylea.nelson at yale.edu)
+ Jeff Oishi (jsoishi at gmail.com)
+ Jean-Claude Passy (jcpassy at uvic.ca)
+ Mark Richardson (Mark.L.Richardson at asu.edu)
+ Thomas Robitaille (thomas.robitaille at gmail.com)
+ Anna Rosen (rosen at ucolick.org)
+ Douglas Rudd (drudd at uchicago.edu)
+ Anthony Scopatz (scopatz at gmail.com)
+ Noel Scudder (noel.scudder at stonybrook.edu)
+ Devin Silvia (devin.silvia at colorado.edu)
+ Sam Skillman (samskillman at gmail.com)
+ Stephen Skory (s at skory.us)
+ Britton Smith (brittonsmith at gmail.com)
+ Geoffrey So (gsiisg at gmail.com)
+ Casey Stark (caseywstark at gmail.com)
+ Elizabeth Tasker (tasker at astro1.sci.hokudai.ac.jp)
+ Stephanie Tonnesen (stonnes at gmail.com)
+ Matthew Turk (matthewturk at gmail.com)
+ Rich Wagner (rwagner at physics.ucsd.edu)
+ Andrew Wetzel (andrew.wetzel at yale.edu)
+ John Wise (jwise at physics.gatech.edu)
+ John ZuHone (jzuhone at gmail.com)
-We also include the Delaunay Triangulation module written by Robert Kern of
-Enthought, the cmdln.py module by Trent Mick, and the progressbar module by
+Several items included in the yt/extern directory were written by other
+individuals and may bear their own license, including the progressbar module by
Nilton Volpato. The PasteBin interface code (as well as the PasteBin itself)
-was written by the Pocoo collective (pocoo.org). The RamsesRead++ library was
-developed by Oliver Hahn. yt also includes a slightly-modified version of
-libconfig (http://www.hyperrealm.com/libconfig/) and an unmodified version of
-several routines from HEALpix (http://healpix.jpl.nasa.gov/).
-
-Large parts of development of yt were guided by discussions with Tom Abel, Ralf
-Kaehler, Mike Norman and Greg Bryan.
+was written by the Pocoo collective (pocoo.org).
+developed by Oliver Hahn.
Thanks to everyone for all your contributions!
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 FUNDING
--- a/FUNDING
+++ /dev/null
@@ -1,35 +0,0 @@
-The development of yt has benefited from funding from many different sources
-and institutions. Here is an incomplete list of these sources:
-
- * NSF grant OCI-1048505
- * NSF grant AST-0239709
- * NSF grant AST-0707474
- * NSF grant AST-0708960
- * NSF grant AST-0808184
- * NSF grant AST-0807215
- * NSF grant AST-0807312
- * NSF grant AST-0807075
- * NSF grant AST-0908199
- * NSF grant AST-0908553
- * NASA grant ATFP NNX08-AH26G
- * NASA grant ATFP NNX09-AD80G
- * NASA grant ATFP NNZ07-AG77G
- * DOE Computational Science Graduate Fellowship under grant number DE-FG02-97ER25308
-
-Additionally, development of yt has benefited from the hospitality and hosting
-of the following institutions:
-
- * Columbia University
- * Harvard-Smithsonian Center for Astrophysics
- * Institute for Advanced Study
- * Kavli Institute for Particle Astrophysics and Cosmology
- * Kavli Institute for Theoretical Physics
- * Los Alamos National Lab
- * Michigan State University
- * Princeton University
- * Stanford University
- * University of California High-Performance Astro-Computing Center
- * University of California at Berkeley
- * University of California at San Diego
- * University of California at Santa Cruz
- * University of Colorado at Boulder
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 LICENSE.txt
--- a/LICENSE.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year><name of author>
-
- This program 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year><name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 doc/how_to_develop_yt.txt
--- a/doc/how_to_develop_yt.txt
+++ b/doc/how_to_develop_yt.txt
@@ -25,7 +25,7 @@
Licenses
--------
-All code in yt should be under the GPL-3 (preferred) or a compatible license.
+All code in yt should be under the BSD 3-clause license.
How To Get The Source Code
--------------------------
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 setup.py
--- a/setup.py
+++ b/setup.py
@@ -248,7 +248,7 @@
classifiers=["Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
- "License :: OSI Approved :: GNU General Public License (GPL)",
+ "License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: AIX",
"Operating System :: POSIX :: Linux",
@@ -269,7 +269,7 @@
author="Matthew J. Turk",
author_email="matthewturk at gmail.com",
url="http://yt-project.org/",
- license="GPL-3",
+ license="BSD",
configuration=configuration,
zip_safe=False,
data_files=REASON_FILES,
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/__init__.py
--- a/yt/__init__.py
+++ b/yt/__init__.py
@@ -60,27 +60,17 @@
All broadly useful code that doesn't clearly fit in one of the other
categories goes here.
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2007-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
__version__ = "2.5-dev"
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/absorption_spectrum/__init__.py
--- a/yt/analysis_modules/absorption_spectrum/__init__.py
+++ b/yt/analysis_modules/absorption_spectrum/__init__.py
@@ -1,24 +1,14 @@
"""
Import stuff for light cone generator.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/absorption_spectrum/absorption_line.py
--- a/yt/analysis_modules/absorption_spectrum/absorption_line.py
+++ b/yt/analysis_modules/absorption_spectrum/absorption_line.py
@@ -1,27 +1,17 @@
"""
Absorption line generating functions.
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: Michigan State University
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import numpy as np
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
--- a/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
+++ b/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
@@ -1,27 +1,17 @@
"""
AbsorptionSpectrum class and member functions.
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: Michigan State University
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import h5py
import numpy as np
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/absorption_spectrum/api.py
--- a/yt/analysis_modules/absorption_spectrum/api.py
+++ b/yt/analysis_modules/absorption_spectrum/api.py
@@ -1,33 +1,18 @@
"""
API for absorption_spectrum
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .absorption_spectrum import \
AbsorptionSpectrum
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/api.py
--- a/yt/analysis_modules/api.py
+++ b/yt/analysis_modules/api.py
@@ -1,33 +1,18 @@
"""
API for yt.analysis_modules
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .absorption_spectrum.api import \
AbsorptionSpectrum
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/coordinate_transformation/api.py
--- a/yt/analysis_modules/coordinate_transformation/api.py
+++ b/yt/analysis_modules/coordinate_transformation/api.py
@@ -1,32 +1,17 @@
"""
API for coordinate_transformation
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .transforms import \
spherical_regrid
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/coordinate_transformation/transforms.py
--- a/yt/analysis_modules/coordinate_transformation/transforms.py
+++ b/yt/analysis_modules/coordinate_transformation/transforms.py
@@ -1,29 +1,17 @@
"""
Transformations between coordinate systems
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: JS Oishi <jsoishi at astro.berkeley.edu>
-Organization: UC Berkeley
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2007-2011 Matthew Turk, J. S. Oishi. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import numpy as np
from yt.funcs import *
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/api.py
--- a/yt/analysis_modules/cosmological_observation/api.py
+++ b/yt/analysis_modules/cosmological_observation/api.py
@@ -1,29 +1,18 @@
"""
API for cosmology analysis.
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: Michigan State University
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .cosmology_splice import \
CosmologySplice
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/cosmology_splice.py
--- a/yt/analysis_modules/cosmological_observation/cosmology_splice.py
+++ b/yt/analysis_modules/cosmological_observation/cosmology_splice.py
@@ -1,27 +1,17 @@
"""
CosmologyTimeSeries class and member functions.
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: Michigan State University
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2012 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import numpy as np
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/__init__.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/__init__.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/__init__.py
@@ -1,24 +1,14 @@
"""
Import stuff for light cone generator.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/api.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/api.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/api.py
@@ -1,33 +1,18 @@
"""
API for lightcone
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .light_cone import \
LightCone
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/common_n_volume.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/common_n_volume.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/common_n_volume.py
@@ -2,27 +2,17 @@
Function to calculate volume in common between two n-cubes, with optional
periodic boundary conditions.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import numpy as np
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/halo_mask.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/halo_mask.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/halo_mask.py
@@ -1,27 +1,17 @@
"""
Light cone halo mask functions.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import copy
import h5py
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/light_cone.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/light_cone.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/light_cone.py
@@ -1,27 +1,17 @@
"""
LightCone class and member functions.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2012 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import copy
import h5py
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/light_cone_projection.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/light_cone_projection.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/light_cone_projection.py
@@ -1,27 +1,17 @@
"""
Create randomly centered, tiled projections to be used in light cones.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import numpy as np
import copy
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_cone/unique_solution.py
--- a/yt/analysis_modules/cosmological_observation/light_cone/unique_solution.py
+++ b/yt/analysis_modules/cosmological_observation/light_cone/unique_solution.py
@@ -1,27 +1,17 @@
"""
Functions to generate unique light cone solutions.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import copy
import numpy as np
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_ray/api.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/api.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/api.py
@@ -1,32 +1,17 @@
"""
API for light_ray
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .light_ray import \
LightRay
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -1,27 +1,17 @@
"""
LightRay class and member functions.
-Author: Britton Smith <brittons at origins.colorado.edu>
-Affiliation: CASA/University of CO, Boulder
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2012 Britton Smith. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import copy
import h5py
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/halo_finding/api.py
--- a/yt/analysis_modules/halo_finding/api.py
+++ b/yt/analysis_modules/halo_finding/api.py
@@ -1,33 +1,18 @@
"""
API for halo_finding
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: UCSD
-Author: J.S. Oishi <jsoishi at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith at gmail.com>
-Affiliation: MSU
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2010-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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from halo_objects import \
Halo, \
HOPHalo, \
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/halo_finding/fof/EnzoFOF.c
--- a/yt/analysis_modules/halo_finding/fof/EnzoFOF.c
+++ b/yt/analysis_modules/halo_finding/fof/EnzoFOF.c
@@ -1,22 +1,10 @@
-/************************************************************************
-* 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
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* 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 <http://www.gnu.org/licenses/>.
-*
-************************************************************************/
+/*******************************************************************************
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+*******************************************************************************/
//
// EnzoFOF
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 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
@@ -1,31 +1,17 @@
"""
HOP-output data handling
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Stephen Skory <s at skory.us>
-Affiliation: UCSD Physics/CASS
-Author: Geoffrey So <gsiisg at gmail.com> (Ellipsoidal functions)
-Affiliation: UCSD Physics/CASS
-Homepage: http://yt-project.org/
-License:
- 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
import gc
import h5py
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/halo_finding/hop/EnzoHop.c
--- a/yt/analysis_modules/halo_finding/hop/EnzoHop.c
+++ b/yt/analysis_modules/halo_finding/hop/EnzoHop.c
@@ -1,22 +1,10 @@
-/************************************************************************
-* 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
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* 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 <http://www.gnu.org/licenses/>.
-*
-************************************************************************/
+/*******************************************************************************
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+*******************************************************************************/
//
// EnzoHop
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py
--- a/yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py
+++ b/yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py
@@ -1,27 +1,17 @@
"""
A implementation of the HOP algorithm that runs in parallel.
-Author: Stephen Skory <s at skory.us>
-Affiliation: UCSD/CASS
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 2008-2011 Stephen Skory. 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
from collections import defaultdict
import itertools, sys
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 yt/analysis_modules/halo_finding/rockstar/api.py
--- a/yt/analysis_modules/halo_finding/rockstar/api.py
+++ b/yt/analysis_modules/halo_finding/rockstar/api.py
@@ -1,27 +1,16 @@
"""
API for Rockstar halo finding
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: Columbia
-Homepage: http://yt-project.org/
-License:
- Copyright (C) 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
from .rockstar import RockstarHaloFinder
diff -r 5d426da7bdb0fc4769b4e613de81a9f169d98a2c -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 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
@@ -1,27 +1,17 @@
"""
Operations to get Rockstar loaded up
-Author: Matthew Turk <matthewturk at gmail.com>
-Affiliation: Columbia University
-Homepage: http://yt.enzotools.org/
-License:
- Copyright (C) 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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 <http://www.gnu.org/licenses/>.
-"""
+#-----------------------------------------------------------------------------
+# Copyright (c) 2013, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
from yt.mods import *
from yt.utilities.parallel_tools.parallel_analysis_interface import \
This diff is so big that we needed to truncate the remainder.
https://bitbucket.org/yt_analysis/yt-3.0/commits/0b52b74efc3c/
Changeset: 0b52b74efc3c
Branch: yt
User: MatthewTurk
Date: 2013-09-10 14:59:34
Summary: Adding alternate data source for annotate_contour
Affected #: 1 file
diff -r 9651b830f049931de6fa3813eb2ee2e15bfdb17c -r 0b52b74efc3c0c8b4da64b86654ac9c669680635 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -232,17 +232,20 @@
class ContourCallback(PlotCallback):
"""
annotate_contour(field, ncont=5, factor=4, take_log=None, clim=None,
- plot_args=None, label=False, label_args=None):
+ plot_args=None, label=False, label_args=None,
+ data_source=None):
Add contours in *field* to the plot. *ncont* governs the number of
contours generated, *factor* governs the number of points used in the
interpolation, *take_log* governs how it is contoured and *clim* gives
- the (upper, lower) limits for contouring.
+ the (upper, lower) limits for contouring. An alternate data source can be
+ specified with *data_source*, but by default the plot being annotated will
+ be queried.
"""
_type_name = "contour"
def __init__(self, field, ncont=5, factor=4, clim=None,
plot_args = None, label = False, take_log = None,
- label_args = None):
+ label_args = None, data_source = None):
PlotCallback.__init__(self)
self.ncont = ncont
self.field = field
@@ -257,6 +260,7 @@
if label_args is None:
label_args = {}
self.label_args = label_args
+ self.data_source = data_source
def __call__(self, plot):
x0, x1 = plot.xlim
@@ -277,26 +281,27 @@
# We want xi, yi in plot coordinates
xi, yi = np.mgrid[xx0:xx1:numPoints_x/(self.factor*1j),
yy0:yy1:numPoints_y/(self.factor*1j)]
+ data = self.data_source or plot.data
if plot._type_name in ['CuttingPlane','Projection','Slice']:
if plot._type_name == 'CuttingPlane':
- x = plot.data["px"]*dx
- y = plot.data["py"]*dy
- z = plot.data[self.field]
+ x = data["px"]*dx
+ y = data["py"]*dy
+ z = data[self.field]
elif plot._type_name in ['Projection','Slice']:
#Makes a copy of the position fields "px" and "py" and adds the
#appropriate shift to the copied field.
- AllX = np.zeros(plot.data["px"].size, dtype='bool')
- AllY = np.zeros(plot.data["py"].size, dtype='bool')
- XShifted = plot.data["px"].copy()
- YShifted = plot.data["py"].copy()
+ AllX = np.zeros(data["px"].size, dtype='bool')
+ AllY = np.zeros(data["py"].size, dtype='bool')
+ XShifted = data["px"].copy()
+ YShifted = data["py"].copy()
dom_x, dom_y = plot._period
for shift in np.mgrid[-1:1:3j]:
- xlim = ((plot.data["px"] + shift*dom_x >= x0) &
- (plot.data["px"] + shift*dom_x <= x1))
- ylim = ((plot.data["py"] + shift*dom_y >= y0) &
- (plot.data["py"] + shift*dom_y <= y1))
+ xlim = ((data["px"] + shift*dom_x >= x0) &
+ (data["px"] + shift*dom_x <= x1))
+ ylim = ((data["py"] + shift*dom_y >= y0) &
+ (data["py"] + shift*dom_y <= y1))
XShifted[xlim] += shift * dom_x
YShifted[ylim] += shift * dom_y
AllX |= xlim
@@ -309,7 +314,7 @@
# This converts XShifted and YShifted into plot coordinates
x = (XShifted[wI]-x0)*dx + xx0
y = (YShifted[wI]-y0)*dy + yy0
- z = plot.data[self.field][wI]
+ z = data[self.field][wI]
# Both the input and output from the triangulator are in plot
# coordinates
https://bitbucket.org/yt_analysis/yt-3.0/commits/a00e9c0b72fe/
Changeset: a00e9c0b72fe
Branch: yt
User: MatthewTurk
Date: 2013-09-10 20:04:51
Summary: Fixing wording.
Affected #: 1 file
diff -r 0b52b74efc3c0c8b4da64b86654ac9c669680635 -r a00e9c0b72fe33a82b264a1d4f74afffad11533a yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -239,8 +239,8 @@
contours generated, *factor* governs the number of points used in the
interpolation, *take_log* governs how it is contoured and *clim* gives
the (upper, lower) limits for contouring. An alternate data source can be
- specified with *data_source*, but by default the plot being annotated will
- be queried.
+ specified with *data_source*, but by default the plot's data source will be
+ queried.
"""
_type_name = "contour"
def __init__(self, field, ncont=5, factor=4, clim=None,
https://bitbucket.org/yt_analysis/yt-3.0/commits/c65d8184a73c/
Changeset: c65d8184a73c
Branch: yt
User: MatthewTurk
Date: 2013-09-12 21:52:05
Summary: Somehow a few of these changes were stripped.
Affected #: 2 files
diff -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 -r c65d8184a73c0e457459b703f713392e5d79e426 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -214,17 +214,20 @@
class ContourCallback(PlotCallback):
"""
annotate_contour(field, ncont=5, factor=4, take_log=None, clim=None,
- plot_args=None, label=False, label_args=None):
+ plot_args=None, label=False, label_args=None,
+ data_source=None):
Add contours in *field* to the plot. *ncont* governs the number of
contours generated, *factor* governs the number of points used in the
interpolation, *take_log* governs how it is contoured and *clim* gives
- the (upper, lower) limits for contouring.
+ the (upper, lower) limits for contouring. An alternate data source can be
+ specified with *data_source*, but by default the plot's data source will be
+ queried.
"""
_type_name = "contour"
def __init__(self, field, ncont=5, factor=4, clim=None,
plot_args = None, label = False, take_log = None,
- label_args = None):
+ label_args = None, data_source = None):
PlotCallback.__init__(self)
self.ncont = ncont
self.field = field
@@ -239,6 +242,7 @@
if label_args is None:
label_args = {}
self.label_args = label_args
+ self.data_source = data_source
def __call__(self, plot):
x0, x1 = plot.xlim
@@ -259,26 +263,27 @@
# We want xi, yi in plot coordinates
xi, yi = np.mgrid[xx0:xx1:numPoints_x/(self.factor*1j),
yy0:yy1:numPoints_y/(self.factor*1j)]
+ data = self.data_source or plot.data
if plot._type_name in ['CuttingPlane','Projection','Slice']:
if plot._type_name == 'CuttingPlane':
- x = plot.data["px"]*dx
- y = plot.data["py"]*dy
- z = plot.data[self.field]
+ x = data["px"]*dx
+ y = data["py"]*dy
+ z = data[self.field]
elif plot._type_name in ['Projection','Slice']:
#Makes a copy of the position fields "px" and "py" and adds the
#appropriate shift to the copied field.
- AllX = np.zeros(plot.data["px"].size, dtype='bool')
- AllY = np.zeros(plot.data["py"].size, dtype='bool')
- XShifted = plot.data["px"].copy()
- YShifted = plot.data["py"].copy()
+ AllX = np.zeros(data["px"].size, dtype='bool')
+ AllY = np.zeros(data["py"].size, dtype='bool')
+ XShifted = data["px"].copy()
+ YShifted = data["py"].copy()
dom_x, dom_y = plot._period
for shift in np.mgrid[-1:1:3j]:
- xlim = ((plot.data["px"] + shift*dom_x >= x0) &
- (plot.data["px"] + shift*dom_x <= x1))
- ylim = ((plot.data["py"] + shift*dom_y >= y0) &
- (plot.data["py"] + shift*dom_y <= y1))
+ xlim = ((data["px"] + shift*dom_x >= x0) &
+ (data["px"] + shift*dom_x <= x1))
+ ylim = ((data["py"] + shift*dom_y >= y0) &
+ (data["py"] + shift*dom_y <= y1))
XShifted[xlim] += shift * dom_x
YShifted[ylim] += shift * dom_y
AllX |= xlim
@@ -291,7 +296,7 @@
# This converts XShifted and YShifted into plot coordinates
x = (XShifted[wI]-x0)*dx + xx0
y = (YShifted[wI]-y0)*dy + yy0
- z = plot.data[self.field][wI]
+ z = data[self.field][wI]
# Both the input and output from the triangulator are in plot
# coordinates
diff -r 7a7ca4d5a1b3747a06ea76b8d090e33413717b06 -r c65d8184a73c0e457459b703f713392e5d79e426 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1072,14 +1072,16 @@
type = self._plot_type
if type in ['Projection','OffAxisProjection']:
weight = self.data_source.weight_field
+ if weight is not None:
+ weight = weight.replace(' ', '_')
if 'Cutting' in self.data_source.__class__.__name__:
type = 'OffAxisSlice'
for k, v in self.plots.iteritems():
if axis:
- n = "%s_%s_%s_%s" % (name, type, axis, k)
+ n = "%s_%s_%s_%s" % (name, type, axis, k.replace(' ', '_'))
else:
# for cutting planes
- n = "%s_%s_%s" % (name, type, k)
+ n = "%s_%s_%s" % (name, type, k.replace(' ', '_'))
if weight:
n += "_%s" % (weight)
names.append(v.save(n,mpl_kwargs))
@@ -1777,7 +1779,16 @@
def __init__(
self, data, cbname, cmap, extent, aspect, zlim, size, fontsize,
figure, axes, cax):
- fsize, axrect, caxrect = self._get_best_layout(size, fontsize)
+ self._draw_colorbar = True
+ self._draw_axes = True
+ self._cache_layout(size, fontsize)
+
+ # Make room for a colorbar
+ self.input_size = size
+ self.fsize = [size[0] + self._cbar_inches[self._draw_colorbar], size[1]]
+
+ # Compute layout
+ axrect, caxrect = self._get_best_layout(fontsize)
if np.any(np.array(axrect) < 0):
mylog.warning('The axis ratio of the requested plot is very narrow. '
'There is a good chance the plot will not look very good, '
@@ -1786,7 +1797,7 @@
axrect = (0.07, 0.10, 0.80, 0.80)
caxrect = (0.87, 0.10, 0.04, 0.80)
ImagePlotMPL.__init__(
- self, fsize, axrect, caxrect, zlim, figure, axes, cax)
+ self, self.fsize, axrect, caxrect, zlim, figure, axes, cax)
self._init_image(data, cbname, cmap, extent, aspect)
self.image.axes.ticklabel_format(scilimits=(-2,3))
if cbname == 'linear':
@@ -1794,31 +1805,74 @@
self.cb.formatter.set_powerlimits((-2,3))
self.cb.update_ticks()
- def _get_best_layout(self, size, fontsize=18):
- aspect = 1.0*size[0]/size[1]
- fontscale = fontsize / 18.0
+ def _toggle_axes(self, choice):
+ self._draw_axes = choice
+ self.axes.get_xaxis().set_visible(choice)
+ self.axes.get_yaxis().set_visible(choice)
+ axrect, caxrect = self._get_best_layout()
+ self.axes.set_position(axrect)
+ self.cax.set_position(caxrect)
- # add room for a colorbar
- cbar_inches = fontscale*0.7
- newsize = [size[0] + cbar_inches, size[1]]
+ def _toggle_colorbar(self, choice):
+ self._draw_colorbar = choice
+ self.cax.set_visible(choice)
+ self.fsize = [self.input_size[0] + self._cbar_inches[choice], self.input_size[1]]
+ axrect, caxrect = self._get_best_layout()
+ self.axes.set_position(axrect)
+ self.cax.set_position(caxrect)
+
+ def hide_axes(self):
+ self._toggle_axes(False)
+ return self
+
+ def show_axes(self):
+ self._toggle_axes(True)
+ return self
+
+ def hide_colorbar(self):
+ self._toggle_colorbar(False)
+ return self
+
+ def show_colorbar(self):
+ self._toggle_colorbar(True)
+ return self
+
+ def _cache_layout(self, size, fontsize):
+ self._cbar_inches = {}
+ self._text_buffx = {}
+ self._text_bottomy = {}
+ self._text_topy = {}
+
+ self._aspect = 1.0*size[0]/size[1]
+ self._fontscale = fontsize / 18.0
+
+ # Leave room for a colorbar, if we are drawing it.
+ self._cbar_inches[True] = self._fontscale*0.7
+ self._cbar_inches[False] = 0
# add buffers for text, and a bit of whitespace on top
- text_buffx = fontscale * 1.0/(newsize[0])
- text_bottomy = fontscale * 0.7/size[1]
- text_topy = fontscale * 0.3/size[1]
+ self._text_buffx[True] = self._fontscale * 1.0/(size[0] + self._cbar_inches[True])
+ self._text_bottomy[True] = self._fontscale * 0.7/size[1]
+ self._text_topy[True] = self._fontscale * 0.3/size[1]
+ # No buffer for text if we're not drawing axes
+ self._text_buffx[False] = 0
+ self._text_bottomy[False] = 0
+ self._text_topy[False] = 0
+
+ def _get_best_layout(self, fontsize=18):
# calculate how much room the colorbar takes
- cbar_frac = cbar_inches/newsize[0]
+ cbar_frac = self._cbar_inches[self._draw_colorbar]/self.fsize[0]
# Calculate y fraction, then use to make x fraction.
- yfrac = 1.0-text_bottomy-text_topy
- ysize = yfrac*size[1]
- xsize = aspect*ysize
- xfrac = xsize/newsize[0]
+ yfrac = 1.0-self._text_bottomy[self._draw_axes]-self._text_topy[self._draw_axes]
+ ysize = yfrac*self.fsize[1]
+ xsize = self._aspect*ysize
+ xfrac = xsize/self.fsize[0]
# Now make sure it all fits!
- xbig = xfrac + text_buffx + 2.0*cbar_frac
- ybig = yfrac + text_bottomy + text_topy
+ xbig = xfrac + self._text_buffx[self._draw_axes] + 2.0*cbar_frac
+ ybig = yfrac + self._text_bottomy[self._draw_axes] + self._text_topy[self._draw_axes]
if xbig > 1:
xsize /= xbig
@@ -1826,9 +1880,20 @@
if ybig > 1:
xsize /= ybig
ysize /= ybig
- xfrac = xsize/newsize[0]
- yfrac = ysize/newsize[1]
+ xfrac = xsize/self.fsize[0]
+ yfrac = ysize/self.fsize[1]
- axrect = (text_buffx, text_bottomy, xfrac, yfrac )
- caxrect = (text_buffx+xfrac, text_bottomy, cbar_frac/4., yfrac )
- return newsize, axrect, caxrect
+ axrect = (
+ self._text_buffx[self._draw_axes],
+ self._text_bottomy[self._draw_axes],
+ xfrac,
+ yfrac
+ )
+
+ caxrect = (
+ self._text_buffx[self._draw_axes]+xfrac,
+ self._text_bottomy[self._draw_axes],
+ cbar_frac/4.,
+ yfrac
+ )
+ return axrect, caxrect
https://bitbucket.org/yt_analysis/yt-3.0/commits/81c2f6f5f983/
Changeset: 81c2f6f5f983
Branch: yt
User: MatthewTurk
Date: 2013-09-13 18:17:08
Summary: Disabling _ramses_reader import for ART.
Affected #: 1 file
diff -r c65d8184a73c0e457459b703f713392e5d79e426 -r 81c2f6f5f983e90ec58e4d1d9da48a7a4a810832 yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -54,7 +54,7 @@
from io import b2t
-import yt.frontends.ramses._ramses_reader as _ramses_reader
+#import yt.frontends.ramses._ramses_reader as _ramses_reader
from .fields import ARTFieldInfo, KnownARTFields
from yt.utilities.definitions import \
https://bitbucket.org/yt_analysis/yt-3.0/commits/629b16f59319/
Changeset: 629b16f59319
Branch: yt
User: brittonsmith
Date: 2013-09-16 13:01:49
Summary: Adding citation file.
Affected #: 1 file
diff -r 81c2f6f5f983e90ec58e4d1d9da48a7a4a810832 -r 629b16f593192d87c080f969236bca9c0881a366 CITATION
--- /dev/null
+++ b/CITATION
@@ -0,0 +1,31 @@
+To cite yt in publications, please use:
+
+Turk, M. J., Smith, B. D., Oishi, J. S., et al. 2011, ApJS, 192, 9
+
+In the body of the text, please add a footnote to the yt webpage:
+
+http://yt-project.org/
+
+For LaTex and BibTex users:
+
+\bibitem[Turk et al.(2011)]{2011ApJS..192....9T} Turk, M.~J., Smith, B.~D.,
+Oishi, J.~S., et al.\ 2011, \apjs, 192, 9
+
+ at ARTICLE{2011ApJS..192....9T,
+ author = {{Turk}, M.~J. and {Smith}, B.~D. and {Oishi}, J.~S. and {Skory}, S. and
+{Skillman}, S.~W. and {Abel}, T. and {Norman}, M.~L.},
+ title = "{yt: A Multi-code Analysis Toolkit for Astrophysical Simulation Data}",
+ journal = {\apjs},
+archivePrefix = "arXiv",
+ eprint = {1011.3514},
+ primaryClass = "astro-ph.IM",
+ keywords = {cosmology: theory, methods: data analysis, methods: numerical},
+ year = 2011,
+ month = jan,
+ volume = 192,
+ eid = {9},
+ pages = {9},
+ doi = {10.1088/0067-0049/192/1/9},
+ adsurl = {http://adsabs.harvard.edu/abs/2011ApJS..192....9T},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
https://bitbucket.org/yt_analysis/yt-3.0/commits/7105b3894df9/
Changeset: 7105b3894df9
Branch: yt
User: ngoldbaum
Date: 2013-09-18 22:27:50
Summary: Making all user-accessible plot window modifying functions return self.
This makes pretty display in the notebook happen whenever a modifying function
is called.
Affected #: 1 file
diff -r 81c2f6f5f983e90ec58e4d1d9da48a7a4a810832 -r 7105b3894df977fe5df009d0d75f12972482759b yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -104,7 +104,7 @@
def newfunc(*args, **kwargs):
rv = f(*args[1:], **kwargs)
args[0]._callbacks.append((f.__name__,(args,kwargs)))
- return rv
+ return args[0]
return newfunc
field_transforms = {}
@@ -515,6 +515,7 @@
mw = max([width[0][0], width[1][0]])
self.zlim = (centerz - mw/2.,
centerz + mw/2.)
+ return self
@invalidate_data
def set_center(self, new_center, unit = '1'):
@@ -537,6 +538,7 @@
new_center = [c / self.pf[unit] for c in new_center]
self.center = new_center
self.set_window(self.bounds)
+ return self
@invalidate_data
def set_antialias(self,aa):
@@ -556,6 +558,7 @@
self.buff_size = size
else:
self.buff_size = (size, size)
+ return self
@invalidate_plot
@invalidate_figure
@@ -569,11 +572,12 @@
including the margins but not the colorbar.
"""
self.window_size = float(size)
+ return self
@invalidate_data
def refresh(self):
# invalidate_data will take care of everything
- pass
+ return self
class PWViewer(PlotWindow):
"""A viewer for PlotWindows.
@@ -619,12 +623,14 @@
self._field_transform[field] = log_transform
else:
self._field_transform[field] = linear_transform
+ return self
@invalidate_plot
def set_transform(self, field, name):
if name not in field_transforms:
raise KeyError(name)
self._field_transform[field] = field_transforms[name]
+ return self
@invalidate_plot
def set_cmap(self, field, cmap_name):
@@ -647,6 +653,7 @@
for field in fields:
self._colorbar_valid = False
self._colormaps[field] = cmap_name
+ return self
@invalidate_plot
def set_zlim(self, field, zmin, zmax, dynamic_range=None):
@@ -693,6 +700,7 @@
self.plots[field].zmin = myzmin
self.plots[field].zmax = myzmax
+ return self
def setup_callbacks(self):
for key in callback_registry:
@@ -754,6 +762,7 @@
except KeyError:
raise YTUnitNotRecognized(un)
self._axes_unit_names = unit_name
+ return self
class PWViewerMPL(PWViewer):
"""Viewer using matplotlib as a backend via the WindowPlotMPL.
@@ -1007,7 +1016,7 @@
self._font_color = font_dict.pop('color')
self._font_properties = \
FontProperties(**font_dict)
-
+ return self
@invalidate_plot
def set_cmap(self, field, cmap):
@@ -1038,6 +1047,7 @@
if not is_colormap(cmap) and cmap is not None:
raise RuntimeError("Colormap '%s' does not exist!" % str(cmap))
self.plots[field].image.set_cmap(cmap)
+ return self
def save(self, name=None, mpl_kwargs=None):
"""saves the plot to disk.
https://bitbucket.org/yt_analysis/yt-3.0/commits/3a30978c25bf/
Changeset: 3a30978c25bf
Branch: yt
User: ngoldbaum
Date: 2013-09-18 22:28:13
Summary: Improving axes labels for cosmological length units.
Affected #: 1 file
diff -r 7105b3894df977fe5df009d0d75f12972482759b -r 3a30978c25bff2907e795ffe7faef158e2c7a382 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -903,10 +903,23 @@
cax)
axes_unit_labels = ['', '']
+ comoving = False
+ hinv = False
for i, un in enumerate((unit_x, unit_y)):
+ if un.endswith('cm') and un != 'cm':
+ comoving = True
+ un = un[:-2]
+ # no length units end in h so this is safe
+ if un.endswith('h'):
+ hinv = True
+ un = un[:-1]
if un in formatted_length_unit_names:
un = formatted_length_unit_names[un]
if un not in ['1', 'u', 'unitary']:
+ if hinv:
+ un = un + '\,h^{-1}'
+ if comoving:
+ un = 'Comoving\/'+un
axes_unit_labels[i] = '\/\/('+un+')'
if self.oblique:
https://bitbucket.org/yt_analysis/yt-3.0/commits/f793b5d63cb9/
Changeset: f793b5d63cb9
Branch: yt
User: samskillman
Date: 2013-09-18 23:50:57
Summary: Merged in ngoldbaum/yt (pull request #600)
Plot window improvements: cosmological length units, pretty notebook display
Affected #: 1 file
diff -r 629b16f593192d87c080f969236bca9c0881a366 -r f793b5d63cb91f99ebb7656df021da11ed474808 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -104,7 +104,7 @@
def newfunc(*args, **kwargs):
rv = f(*args[1:], **kwargs)
args[0]._callbacks.append((f.__name__,(args,kwargs)))
- return rv
+ return args[0]
return newfunc
field_transforms = {}
@@ -515,6 +515,7 @@
mw = max([width[0][0], width[1][0]])
self.zlim = (centerz - mw/2.,
centerz + mw/2.)
+ return self
@invalidate_data
def set_center(self, new_center, unit = '1'):
@@ -537,6 +538,7 @@
new_center = [c / self.pf[unit] for c in new_center]
self.center = new_center
self.set_window(self.bounds)
+ return self
@invalidate_data
def set_antialias(self,aa):
@@ -556,6 +558,7 @@
self.buff_size = size
else:
self.buff_size = (size, size)
+ return self
@invalidate_plot
@invalidate_figure
@@ -569,11 +572,12 @@
including the margins but not the colorbar.
"""
self.window_size = float(size)
+ return self
@invalidate_data
def refresh(self):
# invalidate_data will take care of everything
- pass
+ return self
class PWViewer(PlotWindow):
"""A viewer for PlotWindows.
@@ -619,12 +623,14 @@
self._field_transform[field] = log_transform
else:
self._field_transform[field] = linear_transform
+ return self
@invalidate_plot
def set_transform(self, field, name):
if name not in field_transforms:
raise KeyError(name)
self._field_transform[field] = field_transforms[name]
+ return self
@invalidate_plot
def set_cmap(self, field, cmap_name):
@@ -647,6 +653,7 @@
for field in fields:
self._colorbar_valid = False
self._colormaps[field] = cmap_name
+ return self
@invalidate_plot
def set_zlim(self, field, zmin, zmax, dynamic_range=None):
@@ -693,6 +700,7 @@
self.plots[field].zmin = myzmin
self.plots[field].zmax = myzmax
+ return self
def setup_callbacks(self):
for key in callback_registry:
@@ -754,6 +762,7 @@
except KeyError:
raise YTUnitNotRecognized(un)
self._axes_unit_names = unit_name
+ return self
class PWViewerMPL(PWViewer):
"""Viewer using matplotlib as a backend via the WindowPlotMPL.
@@ -894,10 +903,23 @@
cax)
axes_unit_labels = ['', '']
+ comoving = False
+ hinv = False
for i, un in enumerate((unit_x, unit_y)):
+ if un.endswith('cm') and un != 'cm':
+ comoving = True
+ un = un[:-2]
+ # no length units end in h so this is safe
+ if un.endswith('h'):
+ hinv = True
+ un = un[:-1]
if un in formatted_length_unit_names:
un = formatted_length_unit_names[un]
if un not in ['1', 'u', 'unitary']:
+ if hinv:
+ un = un + '\,h^{-1}'
+ if comoving:
+ un = 'Comoving\/'+un
axes_unit_labels[i] = '\/\/('+un+')'
if self.oblique:
@@ -1007,7 +1029,7 @@
self._font_color = font_dict.pop('color')
self._font_properties = \
FontProperties(**font_dict)
-
+ return self
@invalidate_plot
def set_cmap(self, field, cmap):
@@ -1038,6 +1060,7 @@
if not is_colormap(cmap) and cmap is not None:
raise RuntimeError("Colormap '%s' does not exist!" % str(cmap))
self.plots[field].image.set_cmap(cmap)
+ return self
def save(self, name=None, mpl_kwargs=None):
"""saves the plot to disk.
https://bitbucket.org/yt_analysis/yt-3.0/commits/9b39727660d2/
Changeset: 9b39727660d2
Branch: yt
User: MatthewTurk
Date: 2013-09-17 23:14:58
Summary: For some pathological cases, we can hit corners.
This helps to normalize the errors that can creep in from this. Anthony and I
were seeing problems on the order of 1e-17 or so.
Affected #: 1 file
diff -r 629b16f593192d87c080f969236bca9c0881a366 -r 9b39727660d2d9f0dcbb63cfe25b3534eb03dd92 yt/utilities/lib/grid_traversal.pyx
--- a/yt/utilities/lib/grid_traversal.pyx
+++ b/yt/utilities/lib/grid_traversal.pyx
@@ -953,6 +953,14 @@
tl = (vc.right_edge[i] - v_pos[i])*iv_dir[i]
temp_x = (v_pos[x] + tl*v_dir[x])
temp_y = (v_pos[y] + tl*v_dir[y])
+ if fabs(temp_x - vc.left_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.left_edge[x]
+ elif fabs(temp_x - vc.right_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.right_edge[x]
+ if fabs(temp_y - vc.left_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.left_edge[y]
+ elif fabs(temp_y - vc.right_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.right_edge[y]
if vc.left_edge[x] <= temp_x and temp_x <= vc.right_edge[x] and \
vc.left_edge[y] <= temp_y and temp_y <= vc.right_edge[y] and \
0.0 <= tl and tl < intersect_t:
https://bitbucket.org/yt_analysis/yt-3.0/commits/21dcf6d1ff83/
Changeset: 21dcf6d1ff83
Branch: yt
User: xarthisius
Date: 2013-09-19 09:52:54
Summary: Merged in MatthewTurk/yt (pull request #599)
Fix an issue with hitting corners in the walk_volume function
Affected #: 1 file
diff -r f793b5d63cb91f99ebb7656df021da11ed474808 -r 21dcf6d1ff83ef77cd89732d49c68ff12702f09d yt/utilities/lib/grid_traversal.pyx
--- a/yt/utilities/lib/grid_traversal.pyx
+++ b/yt/utilities/lib/grid_traversal.pyx
@@ -953,6 +953,14 @@
tl = (vc.right_edge[i] - v_pos[i])*iv_dir[i]
temp_x = (v_pos[x] + tl*v_dir[x])
temp_y = (v_pos[y] + tl*v_dir[y])
+ if fabs(temp_x - vc.left_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.left_edge[x]
+ elif fabs(temp_x - vc.right_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.right_edge[x]
+ if fabs(temp_y - vc.left_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.left_edge[y]
+ elif fabs(temp_y - vc.right_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.right_edge[y]
if vc.left_edge[x] <= temp_x and temp_x <= vc.right_edge[x] and \
vc.left_edge[y] <= temp_y and temp_y <= vc.right_edge[y] and \
0.0 <= tl and tl < intersect_t:
https://bitbucket.org/yt_analysis/yt-3.0/commits/245ae278ae8c/
Changeset: 245ae278ae8c
Branch: yt
User: ngoldbaum
Date: 2013-09-19 08:00:16
Summary: Making comoving units more mathematical. Closes #431.
Affected #: 1 file
diff -r 3a30978c25bff2907e795ffe7faef158e2c7a382 -r 245ae278ae8c49fbc179a025d4ac7c9247ff26c3 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -919,7 +919,7 @@
if hinv:
un = un + '\,h^{-1}'
if comoving:
- un = 'Comoving\/'+un
+ un = un + '\,(1+z)^{-1}'
axes_unit_labels[i] = '\/\/('+un+')'
if self.oblique:
https://bitbucket.org/yt_analysis/yt-3.0/commits/eb6828b54251/
Changeset: eb6828b54251
Branch: yt
User: MatthewTurk
Date: 2013-09-20 06:49:44
Summary: Merged in ngoldbaum/yt (pull request #601)
Making comoving units more mathematical. Closes #431.
Affected #: 1 file
diff -r 21dcf6d1ff83ef77cd89732d49c68ff12702f09d -r eb6828b542513094bce0c440343f80c34dfddbea yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -919,7 +919,7 @@
if hinv:
un = un + '\,h^{-1}'
if comoving:
- un = 'Comoving\/'+un
+ un = un + '\,(1+z)^{-1}'
axes_unit_labels[i] = '\/\/('+un+')'
if self.oblique:
https://bitbucket.org/yt_analysis/yt-3.0/commits/8abb588caef3/
Changeset: 8abb588caef3
Branch: yt
User: MatthewTurk
Date: 2013-09-07 17:21:20
Summary: First draft of a new "get_yt" script based on Conda.
Affected #: 1 file
diff -r b3b28b859b0e9d6c7699fb70768dbe08bd8a4d5a -r 8abb588caef375ce9b262a7d4812ee0bf743b929 doc/get_yt.sh
--- /dev/null
+++ b/doc/get_yt.sh
@@ -0,0 +1,270 @@
+#
+# Hi there! Welcome to the yt installation script.
+#
+# This script is designed to create a fully isolated Python installation
+# with the dependencies you need to run yt.
+#
+# This script is based on Conda, a distribution mechanism from Continuum
+# Analytics. The process is as follows:
+#
+# 1. Download the appropriate Conda installation package
+# 2. Install Conda into the specified directory
+# 3. Install yt-specific dependencies
+# 4. Install yt
+#
+# There are a few options listed below, but by default, this will install
+# everything. At the end, it will tell you what to do to use yt.
+#
+# By default this will install yt from source.
+#
+# If you experience problems, please visit the Help section at
+# http://yt-project.org.
+#
+DEST_SUFFIX="yt-conda"
+DEST_DIR="`pwd`/${DEST_SUFFIX/ /}" # Installation location
+BRANCH="yt" # This is the branch to which we will forcibly update.
+INST_YT_SOURCE=1 # Do we do a source install of yt?
+
+##################################################################
+# #
+# You will likely not have to modify anything below this region. #
+# #
+##################################################################
+
+LOG_FILE="`pwd`/yt_install.log"
+
+# Here is the idiom for redirecting to the log file:
+# ( SOMECOMMAND 2>&1 ) 1>> ${LOG_FILE} || do_exit
+
+MINICONDA_URLBASE="http://repo.continuum.io/miniconda"
+MINICONDA_VERSION="1.9.1"
+YT_RECIPE_REPO="https://bitbucket.org/yt_analysis/yt_conda/raw/default"
+
+function do_exit
+{
+ echo "********************************************"
+ echo " FAILURE REPORT:"
+ echo "********************************************"
+ echo
+ tail -n 10 ${LOG_FILE}
+ echo
+ echo "********************************************"
+ echo "********************************************"
+ echo "Failure. Check ${LOG_FILE}. The last 10 lines are above."
+ exit 1
+}
+
+function log_cmd
+{
+ echo "EXECUTING:" >> ${LOG_FILE}
+ echo " $*" >> ${LOG_FILE}
+ ( $* 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytproject
+{
+ [ -e $1 ] && return
+ echo "Downloading $1 from yt-project.org"
+ ${GETFILE} "http://yt-project.org/dependencies/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytdata
+{
+ echo "Downloading $1 from yt-project.org"
+ [ -e $1 ] && return
+ ${GETFILE} "http://yt-project.org/data/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytrecipe {
+ RDIR=${DEST_DIR}/src/yt-recipes/$1
+ mkdir -p ${RDIR}
+ pushd ${RDIR}
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/meta.yaml
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/build.sh
+ NEW_PKG=`conda build --output ${RDIR}`
+ log_cmd conda build --no-binstar-upload ${RDIR}
+ log_cmd conda install ${NEW_PKG}
+ popd
+}
+
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "Hi there! This is the yt installation script. We're going to download"
+echo "some stuff and install it to create a self-contained, isolated"
+echo "environment for yt to run within."
+echo
+echo "This will install Miniconda from Continuum Analytics, the necessary"
+echo "packages to run yt, and create a self-contained environment for you to"
+echo "use yt. Additionally, Conda itself provides the ability to install"
+echo "many other packages that can be used for other purposes."
+echo
+MYOS=`uname -s` # A guess at the OS
+if [ "${MYOS##Darwin}" != "${MYOS}" ]
+then
+ echo "Looks like you're running on Mac OSX."
+ echo
+ echo "NOTE: you must have the Xcode command line tools installed."
+ echo
+ MINICONDA_OS="MacOSX-x86_64"
+fi
+if [ "${MYOS##Linux}" != "${MYOS}" ]
+then
+ echo "Looks like you're on Linux."
+ echo
+ echo "Please make sure you have the developer tools for your OS installed."
+ echo
+ echo "For Ubuntu, Redhat variants and the like, this includes the"
+ echo "chrpath utility. This is not installed by default."
+ echo
+ echo "If you are running on a supercomputer or other module-enabled"
+ echo "system, please make sure that the GNU module has been loaded."
+ echo
+ if [ "${MYOS##x86_64}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86_64"
+ elif [ "${MYOS##i386}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86"
+ else
+ echo "Not sure which type of Linux you're on. Going with x86_64."
+ MINICONDA_OS="Linux-x86_64"
+ fi
+fi
+echo
+echo "If you'd rather not continue, hit Ctrl-C."
+echo
+echo "========================================================================"
+echo
+read -p "[hit enter] "
+echo
+echo "Awesome! Here we go."
+echo
+
+MINICONDA_PKG=Miniconda-${MINICONDA_VERSION}-${MINICONDA_OS}.sh
+
+if type -P wget &>/dev/null
+then
+ echo "Using wget"
+ export GETFILE="wget -nv"
+else
+ echo "Using curl"
+ export GETFILE="curl -sSO"
+fi
+
+echo
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}"
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}" >> ${LOG_FILE}
+echo
+
+${GETFILE} ${MINICONDA_URLBASE}/${MINICONDA_PKG} || do_exit
+
+echo "Installing the Miniconda python environment."
+
+log_cmd bash ./${MINICONDA_PKG} -b -p $DEST_DIR
+
+# I don't think we need OR want this anymore:
+#export LD_LIBRARY_PATH=${DEST_DIR}/lib:$LD_LIBRARY_PATH
+
+# This we *do* need.
+export PATH=${DEST_DIR}/bin:$PATH
+
+echo "Installing the necessary packages for yt."
+echo "This may take a while, but don't worry. yt loves you."
+
+declare -a YT_DEPS
+YT_DEPS+=('python')
+YT_DEPS+=('distribute')
+YT_DEPS+=('libpng')
+YT_DEPS+=('freetype')
+YT_DEPS+=('hdf5')
+YT_DEPS+=('numpy')
+YT_DEPS+=('pygments')
+YT_DEPS+=('jinja2')
+YT_DEPS+=('tornado')
+YT_DEPS+=('pyzmq')
+YT_DEPS+=('ipython')
+YT_DEPS+=('sphinx')
+YT_DEPS+=('h5py')
+YT_DEPS+=('matplotlib')
+YT_DEPS+=('cython')
+
+# Here is our dependency list for yt
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/free
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/dev
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/gpl
+log_cmd conda update --yes conda
+
+echo "Current dependencies: ${YT_DEPS[@]}"
+log_cmd echo "DEPENDENCIES" ${YT_DEPS[@]}
+log_cmd conda install --yes ${YT_DEPS[@]}
+
+echo "Installing mercurial."
+get_ytrecipe mercurial
+
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "Installing yt as a package."
+ get_ytrecipe yt
+else
+ # We do a source install.
+ YT_DIR="${DEST_DIR}/src/yt-hg"
+ export PNG_DIR=${DEST_DIR}
+ export FTYPE_DIR=${DEST_DIR}
+ export HDF5_DIR=${DEST_DIR}
+ log_cmd hg clone -r ${BRANCH} https://bitbucket.org/yt_analysis/yt ${YT_DIR}
+ pushd ${YT_DIR}
+ echo $DEST_DIR > hdf5.cfg
+ log_cmd python setup.py develop
+ popd
+ log_cmd cp ${YT_DIR}/doc/activate ${DEST_DIR}/bin/activate
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate
+ log_cmd cp ${YT_DIR}/doc/activate.csh ${DEST_DIR}/bin/activate.csh
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate.csh
+fi
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "yt and the Conda system are now installed in $DEST_DIR ."
+echo
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "You must now modify your PATH variable by prepending:"
+ echo
+ echo " $DEST_DIR/bin"
+else
+ echo "To run from this new installation, use the activate script for this "
+ echo "environment."
+ echo
+ echo " $ source $DEST_DIR/bin/activate"
+ echo
+ echo "This modifies the environment variables YT_DEST, PATH, PYTHONPATH, and"
+ echo "LD_LIBRARY_PATH to match your new yt install. If you use csh, just"
+ echo "append .csh to the above."
+fi
+echo
+echo "To get started with yt, check out the orientation:"
+echo
+echo " http://yt-project.org/doc/orientation/"
+echo
+echo "or just activate your environment and run 'yt serve' to bring up the"
+echo "yt GUI."
+echo
+echo "For support, see the website and join the mailing list:"
+echo
+echo " http://yt-project.org/"
+echo " http://yt-project.org/data/ (Sample data)"
+echo " http://yt-project.org/doc/ (Docs)"
+echo
+echo " http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
+echo
+echo "========================================================================"
+echo
+echo "Oh, look at me, still talking when there's science to do!"
+echo "Good luck, and email the user list if you run into any problems."
https://bitbucket.org/yt_analysis/yt-3.0/commits/5e43d59086a3/
Changeset: 5e43d59086a3
Branch: yt
User: MatthewTurk
Date: 2013-09-07 19:11:23
Summary: Responding to most of Nathan's suggestions.
Affected #: 1 file
diff -r 8abb588caef375ce9b262a7d4812ee0bf743b929 -r 5e43d59086a34fbd783e3f4f31b1958f3968574b doc/get_yt.sh
--- a/doc/get_yt.sh
+++ b/doc/get_yt.sh
@@ -110,6 +110,53 @@
echo
echo "NOTE: you must have the Xcode command line tools installed."
echo
+ echo "The instructions for obtaining these tools varies according"
+ echo "to your exact OS version. On older versions of OS X, you"
+ echo "must register for an account on the apple developer tools"
+ echo "website: https://developer.apple.com/downloads to obtain the"
+ echo "download link."
+ echo
+ echo "We have gathered some additional instructions for each"
+ echo "version of OS X below. If you have trouble installing yt"
+ echo "after following these instructions, don't hesitate to contact"
+ echo "the yt user's e-mail list."
+ echo
+ echo "You can see which version of OSX you are running by clicking"
+ echo "'About This Mac' in the apple menu on the left hand side of"
+ echo "menu bar. We're assuming that you've installed all operating"
+ echo "system updates; if you have an older version, we suggest"
+ echo "running software update and installing all available updates."
+ echo
+ echo "OS X 10.5.8: search for and download Xcode 3.1.4 from the"
+ echo "Apple developer tools website."
+ echo
+ echo "OS X 10.6.8: search for and download Xcode 3.2 from the Apple"
+ echo "developer tools website. You can either download the"
+ echo "Xcode 3.2.2 Developer Tools package (744 MB) and then use"
+ echo "Software Update to update to XCode 3.2.6 or"
+ echo "alternatively, you can download the Xcode 3.2.6/iOS SDK"
+ echo "bundle (4.1 GB)."
+ echo
+ echo "OS X 10.7.5: download Xcode 4.2 from the mac app store"
+ echo "(search for Xcode)."
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "OS X 10.8.2: download Xcode 4.6.1 from the mac app store."
+ echo "(search for Xcode)."
+ echo "Additionally, you will have to manually install the Xcode"
+ echo "command line tools, see:"
+ echo "http://stackoverflow.com/questions/9353444"
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "NOTE: It's possible that the installation will fail, if so,"
+ echo "please set the following environment variables, remove any"
+ echo "broken installation tree, and re-run this script verbatim."
+ echo
+ echo "$ export CC=gcc"
+ echo "$ export CXX=g++"
+ echo
MINICONDA_OS="MacOSX-x86_64"
fi
if [ "${MYOS##Linux}" != "${MYOS}" ]
@@ -118,8 +165,44 @@
echo
echo "Please make sure you have the developer tools for your OS installed."
echo
- echo "For Ubuntu, Redhat variants and the like, this includes the"
- echo "chrpath utility. This is not installed by default."
+ if [ -f /etc/SuSE-release ] && [ `grep --count SUSE /etc/SuSE-release` -gt 0 ]
+ then
+ echo "Looks like you're on an OpenSUSE-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * devel_C_C++"
+ echo " * libopenssl-devel"
+ echo " * libuuid-devel"
+ echo " * zip"
+ echo " * gcc-c++"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo zypper install -t pattern devel_C_C++"
+ echo "$ sudo zypper install gcc-c++ libopenssl-devel libuuid-devel zip"
+ echo "$ sudo zypper install chrpath"
+ fi
+ if [ -f /etc/lsb-release ] && [ `grep --count buntu /etc/lsb-release` -gt 0 ]
+ then
+ echo "Looks like you're on an Ubuntu-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * libssl-dev"
+ echo " * build-essential"
+ echo " * libncurses5"
+ echo " * libncurses5-dev"
+ echo " * zip"
+ echo " * uuid-dev"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo apt-get install libssl-dev build-essential libncurses5 libncurses5-dev zip uuid-dev chrpath"
+ echo
+ fi
echo
echo "If you are running on a supercomputer or other module-enabled"
echo "system, please make sure that the GNU module has been loaded."
@@ -238,6 +321,11 @@
echo "You must now modify your PATH variable by prepending:"
echo
echo " $DEST_DIR/bin"
+ echo
+ echo "For example, if you use bash, place something like this at the end"
+ echo "of your ~/.bashrc :"
+ echo
+ echo " export PATH=$DEST_DIR/bin:$PATH"
else
echo "To run from this new installation, use the activate script for this "
echo "environment."
https://bitbucket.org/yt_analysis/yt-3.0/commits/73926640e585/
Changeset: 73926640e585
Branch: yt
User: xarthisius
Date: 2013-09-23 15:25:50
Summary: Merged in MatthewTurk/yt (pull request #591)
First draft of a new "get_yt" script based on Conda.
Affected #: 1 file
diff -r eb6828b542513094bce0c440343f80c34dfddbea -r 73926640e585c3a42d32dce76e3fae4fb6405a5c doc/get_yt.sh
--- /dev/null
+++ b/doc/get_yt.sh
@@ -0,0 +1,358 @@
+#
+# Hi there! Welcome to the yt installation script.
+#
+# This script is designed to create a fully isolated Python installation
+# with the dependencies you need to run yt.
+#
+# This script is based on Conda, a distribution mechanism from Continuum
+# Analytics. The process is as follows:
+#
+# 1. Download the appropriate Conda installation package
+# 2. Install Conda into the specified directory
+# 3. Install yt-specific dependencies
+# 4. Install yt
+#
+# There are a few options listed below, but by default, this will install
+# everything. At the end, it will tell you what to do to use yt.
+#
+# By default this will install yt from source.
+#
+# If you experience problems, please visit the Help section at
+# http://yt-project.org.
+#
+DEST_SUFFIX="yt-conda"
+DEST_DIR="`pwd`/${DEST_SUFFIX/ /}" # Installation location
+BRANCH="yt" # This is the branch to which we will forcibly update.
+INST_YT_SOURCE=1 # Do we do a source install of yt?
+
+##################################################################
+# #
+# You will likely not have to modify anything below this region. #
+# #
+##################################################################
+
+LOG_FILE="`pwd`/yt_install.log"
+
+# Here is the idiom for redirecting to the log file:
+# ( SOMECOMMAND 2>&1 ) 1>> ${LOG_FILE} || do_exit
+
+MINICONDA_URLBASE="http://repo.continuum.io/miniconda"
+MINICONDA_VERSION="1.9.1"
+YT_RECIPE_REPO="https://bitbucket.org/yt_analysis/yt_conda/raw/default"
+
+function do_exit
+{
+ echo "********************************************"
+ echo " FAILURE REPORT:"
+ echo "********************************************"
+ echo
+ tail -n 10 ${LOG_FILE}
+ echo
+ echo "********************************************"
+ echo "********************************************"
+ echo "Failure. Check ${LOG_FILE}. The last 10 lines are above."
+ exit 1
+}
+
+function log_cmd
+{
+ echo "EXECUTING:" >> ${LOG_FILE}
+ echo " $*" >> ${LOG_FILE}
+ ( $* 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytproject
+{
+ [ -e $1 ] && return
+ echo "Downloading $1 from yt-project.org"
+ ${GETFILE} "http://yt-project.org/dependencies/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytdata
+{
+ echo "Downloading $1 from yt-project.org"
+ [ -e $1 ] && return
+ ${GETFILE} "http://yt-project.org/data/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytrecipe {
+ RDIR=${DEST_DIR}/src/yt-recipes/$1
+ mkdir -p ${RDIR}
+ pushd ${RDIR}
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/meta.yaml
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/build.sh
+ NEW_PKG=`conda build --output ${RDIR}`
+ log_cmd conda build --no-binstar-upload ${RDIR}
+ log_cmd conda install ${NEW_PKG}
+ popd
+}
+
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "Hi there! This is the yt installation script. We're going to download"
+echo "some stuff and install it to create a self-contained, isolated"
+echo "environment for yt to run within."
+echo
+echo "This will install Miniconda from Continuum Analytics, the necessary"
+echo "packages to run yt, and create a self-contained environment for you to"
+echo "use yt. Additionally, Conda itself provides the ability to install"
+echo "many other packages that can be used for other purposes."
+echo
+MYOS=`uname -s` # A guess at the OS
+if [ "${MYOS##Darwin}" != "${MYOS}" ]
+then
+ echo "Looks like you're running on Mac OSX."
+ echo
+ echo "NOTE: you must have the Xcode command line tools installed."
+ echo
+ echo "The instructions for obtaining these tools varies according"
+ echo "to your exact OS version. On older versions of OS X, you"
+ echo "must register for an account on the apple developer tools"
+ echo "website: https://developer.apple.com/downloads to obtain the"
+ echo "download link."
+ echo
+ echo "We have gathered some additional instructions for each"
+ echo "version of OS X below. If you have trouble installing yt"
+ echo "after following these instructions, don't hesitate to contact"
+ echo "the yt user's e-mail list."
+ echo
+ echo "You can see which version of OSX you are running by clicking"
+ echo "'About This Mac' in the apple menu on the left hand side of"
+ echo "menu bar. We're assuming that you've installed all operating"
+ echo "system updates; if you have an older version, we suggest"
+ echo "running software update and installing all available updates."
+ echo
+ echo "OS X 10.5.8: search for and download Xcode 3.1.4 from the"
+ echo "Apple developer tools website."
+ echo
+ echo "OS X 10.6.8: search for and download Xcode 3.2 from the Apple"
+ echo "developer tools website. You can either download the"
+ echo "Xcode 3.2.2 Developer Tools package (744 MB) and then use"
+ echo "Software Update to update to XCode 3.2.6 or"
+ echo "alternatively, you can download the Xcode 3.2.6/iOS SDK"
+ echo "bundle (4.1 GB)."
+ echo
+ echo "OS X 10.7.5: download Xcode 4.2 from the mac app store"
+ echo "(search for Xcode)."
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "OS X 10.8.2: download Xcode 4.6.1 from the mac app store."
+ echo "(search for Xcode)."
+ echo "Additionally, you will have to manually install the Xcode"
+ echo "command line tools, see:"
+ echo "http://stackoverflow.com/questions/9353444"
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "NOTE: It's possible that the installation will fail, if so,"
+ echo "please set the following environment variables, remove any"
+ echo "broken installation tree, and re-run this script verbatim."
+ echo
+ echo "$ export CC=gcc"
+ echo "$ export CXX=g++"
+ echo
+ MINICONDA_OS="MacOSX-x86_64"
+fi
+if [ "${MYOS##Linux}" != "${MYOS}" ]
+then
+ echo "Looks like you're on Linux."
+ echo
+ echo "Please make sure you have the developer tools for your OS installed."
+ echo
+ if [ -f /etc/SuSE-release ] && [ `grep --count SUSE /etc/SuSE-release` -gt 0 ]
+ then
+ echo "Looks like you're on an OpenSUSE-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * devel_C_C++"
+ echo " * libopenssl-devel"
+ echo " * libuuid-devel"
+ echo " * zip"
+ echo " * gcc-c++"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo zypper install -t pattern devel_C_C++"
+ echo "$ sudo zypper install gcc-c++ libopenssl-devel libuuid-devel zip"
+ echo "$ sudo zypper install chrpath"
+ fi
+ if [ -f /etc/lsb-release ] && [ `grep --count buntu /etc/lsb-release` -gt 0 ]
+ then
+ echo "Looks like you're on an Ubuntu-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * libssl-dev"
+ echo " * build-essential"
+ echo " * libncurses5"
+ echo " * libncurses5-dev"
+ echo " * zip"
+ echo " * uuid-dev"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo apt-get install libssl-dev build-essential libncurses5 libncurses5-dev zip uuid-dev chrpath"
+ echo
+ fi
+ echo
+ echo "If you are running on a supercomputer or other module-enabled"
+ echo "system, please make sure that the GNU module has been loaded."
+ echo
+ if [ "${MYOS##x86_64}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86_64"
+ elif [ "${MYOS##i386}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86"
+ else
+ echo "Not sure which type of Linux you're on. Going with x86_64."
+ MINICONDA_OS="Linux-x86_64"
+ fi
+fi
+echo
+echo "If you'd rather not continue, hit Ctrl-C."
+echo
+echo "========================================================================"
+echo
+read -p "[hit enter] "
+echo
+echo "Awesome! Here we go."
+echo
+
+MINICONDA_PKG=Miniconda-${MINICONDA_VERSION}-${MINICONDA_OS}.sh
+
+if type -P wget &>/dev/null
+then
+ echo "Using wget"
+ export GETFILE="wget -nv"
+else
+ echo "Using curl"
+ export GETFILE="curl -sSO"
+fi
+
+echo
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}"
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}" >> ${LOG_FILE}
+echo
+
+${GETFILE} ${MINICONDA_URLBASE}/${MINICONDA_PKG} || do_exit
+
+echo "Installing the Miniconda python environment."
+
+log_cmd bash ./${MINICONDA_PKG} -b -p $DEST_DIR
+
+# I don't think we need OR want this anymore:
+#export LD_LIBRARY_PATH=${DEST_DIR}/lib:$LD_LIBRARY_PATH
+
+# This we *do* need.
+export PATH=${DEST_DIR}/bin:$PATH
+
+echo "Installing the necessary packages for yt."
+echo "This may take a while, but don't worry. yt loves you."
+
+declare -a YT_DEPS
+YT_DEPS+=('python')
+YT_DEPS+=('distribute')
+YT_DEPS+=('libpng')
+YT_DEPS+=('freetype')
+YT_DEPS+=('hdf5')
+YT_DEPS+=('numpy')
+YT_DEPS+=('pygments')
+YT_DEPS+=('jinja2')
+YT_DEPS+=('tornado')
+YT_DEPS+=('pyzmq')
+YT_DEPS+=('ipython')
+YT_DEPS+=('sphinx')
+YT_DEPS+=('h5py')
+YT_DEPS+=('matplotlib')
+YT_DEPS+=('cython')
+
+# Here is our dependency list for yt
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/free
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/dev
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/gpl
+log_cmd conda update --yes conda
+
+echo "Current dependencies: ${YT_DEPS[@]}"
+log_cmd echo "DEPENDENCIES" ${YT_DEPS[@]}
+log_cmd conda install --yes ${YT_DEPS[@]}
+
+echo "Installing mercurial."
+get_ytrecipe mercurial
+
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "Installing yt as a package."
+ get_ytrecipe yt
+else
+ # We do a source install.
+ YT_DIR="${DEST_DIR}/src/yt-hg"
+ export PNG_DIR=${DEST_DIR}
+ export FTYPE_DIR=${DEST_DIR}
+ export HDF5_DIR=${DEST_DIR}
+ log_cmd hg clone -r ${BRANCH} https://bitbucket.org/yt_analysis/yt ${YT_DIR}
+ pushd ${YT_DIR}
+ echo $DEST_DIR > hdf5.cfg
+ log_cmd python setup.py develop
+ popd
+ log_cmd cp ${YT_DIR}/doc/activate ${DEST_DIR}/bin/activate
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate
+ log_cmd cp ${YT_DIR}/doc/activate.csh ${DEST_DIR}/bin/activate.csh
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate.csh
+fi
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "yt and the Conda system are now installed in $DEST_DIR ."
+echo
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "You must now modify your PATH variable by prepending:"
+ echo
+ echo " $DEST_DIR/bin"
+ echo
+ echo "For example, if you use bash, place something like this at the end"
+ echo "of your ~/.bashrc :"
+ echo
+ echo " export PATH=$DEST_DIR/bin:$PATH"
+else
+ echo "To run from this new installation, use the activate script for this "
+ echo "environment."
+ echo
+ echo " $ source $DEST_DIR/bin/activate"
+ echo
+ echo "This modifies the environment variables YT_DEST, PATH, PYTHONPATH, and"
+ echo "LD_LIBRARY_PATH to match your new yt install. If you use csh, just"
+ echo "append .csh to the above."
+fi
+echo
+echo "To get started with yt, check out the orientation:"
+echo
+echo " http://yt-project.org/doc/orientation/"
+echo
+echo "or just activate your environment and run 'yt serve' to bring up the"
+echo "yt GUI."
+echo
+echo "For support, see the website and join the mailing list:"
+echo
+echo " http://yt-project.org/"
+echo " http://yt-project.org/data/ (Sample data)"
+echo " http://yt-project.org/doc/ (Docs)"
+echo
+echo " http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
+echo
+echo "========================================================================"
+echo
+echo "Oh, look at me, still talking when there's science to do!"
+echo "Good luck, and email the user list if you run into any problems."
https://bitbucket.org/yt_analysis/yt-3.0/commits/ec2ca5ad3fe3/
Changeset: ec2ca5ad3fe3
Branch: yt
User: ngoldbaum
Date: 2013-09-23 05:13:22
Summary: Removing an errant print statement and moving get_multi_plot into base_plot_types.py.
Affected #: 3 files
diff -r 245ae278ae8c49fbc179a025d4ac7c9247ff26c3 -r ec2ca5ad3fe3a124f742085a720912f4577e844a yt/visualization/api.py
--- a/yt/visualization/api.py
+++ b/yt/visualization/api.py
@@ -20,8 +20,7 @@
from plot_collection import \
PlotCollection, \
PlotCollectionInteractive, \
- concatenate_pdfs, \
- get_multi_plot
+ concatenate_pdfs
from fixed_resolution import \
FixedResolutionBuffer, \
@@ -54,5 +53,7 @@
OffAxisSlicePlot, \
ProjectionPlot, \
OffAxisProjectionPlot
-
+from base_plot_types import \
+ get_multi_plot
+
diff -r 245ae278ae8c49fbc179a025d4ac7c9247ff26c3 -r ec2ca5ad3fe3a124f742085a720912f4577e844a yt/visualization/base_plot_types.py
--- a/yt/visualization/base_plot_types.py
+++ b/yt/visualization/base_plot_types.py
@@ -94,3 +94,86 @@
canvas.print_figure(f)
f.seek(0)
return f.read()
+
+def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
+ cbar_padding = 0.4):
+ r"""Construct a multiple axes plot object, with or without a colorbar, into
+ which multiple plots may be inserted.
+
+ This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
+ a grid, which are then returned to the user and which can be used to plot
+ multiple plots on a single figure.
+
+ Parameters
+ ----------
+ nx : int
+ Number of axes to create along the x-direction
+ ny : int
+ Number of axes to create along the y-direction
+ colorbar : {'vertical', 'horizontal', None}, optional
+ Should Axes objects for colorbars be allocated, and if so, should they
+ correspond to the horizontal or vertical set of axes?
+ bw : number
+ The base height/width of an axes object inside the figure, in inches
+ dpi : number
+ The dots per inch fed into the Figure instantiation
+
+ Returns
+ -------
+ fig : :class:`matplotlib.figure.Figure`
+ The figure created inside which the axes reside
+ tr : list of list of :class:`matplotlib.axes.Axes` objects
+ This is a list, where the inner list is along the x-axis and the outer
+ is along the y-axis
+ cbars : list of :class:`matplotlib.axes.Axes` objects
+ Each of these is an axes onto which a colorbar can be placed.
+
+ Notes
+ -----
+ This is a simple implementation for a common use case. Viewing the source
+ can be instructure, and is encouraged to see how to generate more
+ complicated or more specific sets of multiplots for your own purposes.
+ """
+ hf, wf = 1.0/ny, 1.0/nx
+ fudge_x = fudge_y = 1.0
+ if colorbar is None:
+ fudge_x = fudge_y = 1.0
+ elif colorbar.lower() == 'vertical':
+ fudge_x = nx/(cbar_padding+nx)
+ fudge_y = 1.0
+ elif colorbar.lower() == 'horizontal':
+ fudge_x = 1.0
+ fudge_y = ny/(cbar_padding+ny)
+ fig = matplotlib.figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
+ from _mpl_imports import FigureCanvasAgg
+ fig.set_canvas(FigureCanvasAgg(fig))
+ fig.subplots_adjust(wspace=0.0, hspace=0.0,
+ top=1.0, bottom=0.0,
+ left=0.0, right=1.0)
+ tr = []
+ for j in range(ny):
+ tr.append([])
+ for i in range(nx):
+ left = i*wf*fudge_x
+ bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
+ ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
+ tr[-1].append(ax)
+ cbars = []
+ if colorbar is None:
+ pass
+ elif colorbar.lower() == 'horizontal':
+ for i in range(nx):
+ # left, bottom, width, height
+ # Here we want 0.10 on each side of the colorbar
+ # We want it to be 0.05 tall
+ # And we want a buffer of 0.15
+ ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
+ wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
+ cbars.append(ax)
+ elif colorbar.lower() == 'vertical':
+ for j in range(ny):
+ ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
+ wf*fudge_x*0.05, hf*fudge_y*0.90])
+ ax.clear()
+ cbars.append(ax)
+ return fig, tr, cbars
diff -r 245ae278ae8c49fbc179a025d4ac7c9247ff26c3 -r ec2ca5ad3fe3a124f742085a720912f4577e844a yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -1728,90 +1728,6 @@
canvas = FigureCanvasAgg(plot._figure)
send_figure(plot._figure)
-def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
- cbar_padding = 0.4):
- r"""Construct a multiple axes plot object, with or without a colorbar, into
- which multiple plots may be inserted.
-
- This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
- a grid, which are then returned to the user and which can be used to plot
- multiple plots on a single figure.
-
- Parameters
- ----------
- nx : int
- Number of axes to create along the x-direction
- ny : int
- Number of axes to create along the y-direction
- colorbar : {'vertical', 'horizontal', None}, optional
- Should Axes objects for colorbars be allocated, and if so, should they
- correspond to the horizontal or vertical set of axes?
- bw : number
- The base height/width of an axes object inside the figure, in inches
- dpi : number
- The dots per inch fed into the Figure instantiation
-
- Returns
- -------
- fig : :class:`matplotlib.figure.Figure`
- The figure created inside which the axes reside
- tr : list of list of :class:`matplotlib.axes.Axes` objects
- This is a list, where the inner list is along the x-axis and the outer
- is along the y-axis
- cbars : list of :class:`matplotlib.axes.Axes` objects
- Each of these is an axes onto which a colorbar can be placed.
-
- Notes
- -----
- This is a simple implementation for a common use case. Viewing the source
- can be instructure, and is encouraged to see how to generate more
- complicated or more specific sets of multiplots for your own purposes.
- """
- hf, wf = 1.0/ny, 1.0/nx
- fudge_x = fudge_y = 1.0
- if colorbar is None:
- fudge_x = fudge_y = 1.0
- elif colorbar.lower() == 'vertical':
- fudge_x = nx/(cbar_padding+nx)
- fudge_y = 1.0
- elif colorbar.lower() == 'horizontal':
- fudge_x = 1.0
- fudge_y = ny/(cbar_padding+ny)
- fig = figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
- from _mpl_imports import FigureCanvasAgg
- fig.set_canvas(FigureCanvasAgg(fig))
- fig.subplots_adjust(wspace=0.0, hspace=0.0,
- top=1.0, bottom=0.0,
- left=0.0, right=1.0)
- tr = []
- print fudge_x, fudge_y
- for j in range(ny):
- tr.append([])
- for i in range(nx):
- left = i*wf*fudge_x
- bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
- ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
- tr[-1].append(ax)
- cbars = []
- if colorbar is None:
- pass
- elif colorbar.lower() == 'horizontal':
- for i in range(nx):
- # left, bottom, width, height
- # Here we want 0.10 on each side of the colorbar
- # We want it to be 0.05 tall
- # And we want a buffer of 0.15
- ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
- wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
- cbars.append(ax)
- elif colorbar.lower() == 'vertical':
- for j in range(ny):
- ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
- wf*fudge_x*0.05, hf*fudge_y*0.90])
- ax.clear()
- cbars.append(ax)
- return fig, tr, cbars
-
def _MPLFixImage(data_source, image_obj, field, cbar, cls):
nx, ny = image_obj.get_size()
def f(axes):
https://bitbucket.org/yt_analysis/yt-3.0/commits/493804c7cebb/
Changeset: 493804c7cebb
Branch: yt
User: MatthewTurk
Date: 2013-09-23 15:43:18
Summary: Merged in ngoldbaum/yt (pull request #603)
Removing an errant print statement and moving get_multi_plot into base_plot_types.py.
Affected #: 3 files
diff -r 73926640e585c3a42d32dce76e3fae4fb6405a5c -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 yt/visualization/api.py
--- a/yt/visualization/api.py
+++ b/yt/visualization/api.py
@@ -20,8 +20,7 @@
from plot_collection import \
PlotCollection, \
PlotCollectionInteractive, \
- concatenate_pdfs, \
- get_multi_plot
+ concatenate_pdfs
from fixed_resolution import \
FixedResolutionBuffer, \
@@ -54,5 +53,7 @@
OffAxisSlicePlot, \
ProjectionPlot, \
OffAxisProjectionPlot
-
+from base_plot_types import \
+ get_multi_plot
+
diff -r 73926640e585c3a42d32dce76e3fae4fb6405a5c -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 yt/visualization/base_plot_types.py
--- a/yt/visualization/base_plot_types.py
+++ b/yt/visualization/base_plot_types.py
@@ -94,3 +94,86 @@
canvas.print_figure(f)
f.seek(0)
return f.read()
+
+def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
+ cbar_padding = 0.4):
+ r"""Construct a multiple axes plot object, with or without a colorbar, into
+ which multiple plots may be inserted.
+
+ This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
+ a grid, which are then returned to the user and which can be used to plot
+ multiple plots on a single figure.
+
+ Parameters
+ ----------
+ nx : int
+ Number of axes to create along the x-direction
+ ny : int
+ Number of axes to create along the y-direction
+ colorbar : {'vertical', 'horizontal', None}, optional
+ Should Axes objects for colorbars be allocated, and if so, should they
+ correspond to the horizontal or vertical set of axes?
+ bw : number
+ The base height/width of an axes object inside the figure, in inches
+ dpi : number
+ The dots per inch fed into the Figure instantiation
+
+ Returns
+ -------
+ fig : :class:`matplotlib.figure.Figure`
+ The figure created inside which the axes reside
+ tr : list of list of :class:`matplotlib.axes.Axes` objects
+ This is a list, where the inner list is along the x-axis and the outer
+ is along the y-axis
+ cbars : list of :class:`matplotlib.axes.Axes` objects
+ Each of these is an axes onto which a colorbar can be placed.
+
+ Notes
+ -----
+ This is a simple implementation for a common use case. Viewing the source
+ can be instructure, and is encouraged to see how to generate more
+ complicated or more specific sets of multiplots for your own purposes.
+ """
+ hf, wf = 1.0/ny, 1.0/nx
+ fudge_x = fudge_y = 1.0
+ if colorbar is None:
+ fudge_x = fudge_y = 1.0
+ elif colorbar.lower() == 'vertical':
+ fudge_x = nx/(cbar_padding+nx)
+ fudge_y = 1.0
+ elif colorbar.lower() == 'horizontal':
+ fudge_x = 1.0
+ fudge_y = ny/(cbar_padding+ny)
+ fig = matplotlib.figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
+ from _mpl_imports import FigureCanvasAgg
+ fig.set_canvas(FigureCanvasAgg(fig))
+ fig.subplots_adjust(wspace=0.0, hspace=0.0,
+ top=1.0, bottom=0.0,
+ left=0.0, right=1.0)
+ tr = []
+ for j in range(ny):
+ tr.append([])
+ for i in range(nx):
+ left = i*wf*fudge_x
+ bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
+ ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
+ tr[-1].append(ax)
+ cbars = []
+ if colorbar is None:
+ pass
+ elif colorbar.lower() == 'horizontal':
+ for i in range(nx):
+ # left, bottom, width, height
+ # Here we want 0.10 on each side of the colorbar
+ # We want it to be 0.05 tall
+ # And we want a buffer of 0.15
+ ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
+ wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
+ cbars.append(ax)
+ elif colorbar.lower() == 'vertical':
+ for j in range(ny):
+ ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
+ wf*fudge_x*0.05, hf*fudge_y*0.90])
+ ax.clear()
+ cbars.append(ax)
+ return fig, tr, cbars
diff -r 73926640e585c3a42d32dce76e3fae4fb6405a5c -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -1728,90 +1728,6 @@
canvas = FigureCanvasAgg(plot._figure)
send_figure(plot._figure)
-def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
- cbar_padding = 0.4):
- r"""Construct a multiple axes plot object, with or without a colorbar, into
- which multiple plots may be inserted.
-
- This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
- a grid, which are then returned to the user and which can be used to plot
- multiple plots on a single figure.
-
- Parameters
- ----------
- nx : int
- Number of axes to create along the x-direction
- ny : int
- Number of axes to create along the y-direction
- colorbar : {'vertical', 'horizontal', None}, optional
- Should Axes objects for colorbars be allocated, and if so, should they
- correspond to the horizontal or vertical set of axes?
- bw : number
- The base height/width of an axes object inside the figure, in inches
- dpi : number
- The dots per inch fed into the Figure instantiation
-
- Returns
- -------
- fig : :class:`matplotlib.figure.Figure`
- The figure created inside which the axes reside
- tr : list of list of :class:`matplotlib.axes.Axes` objects
- This is a list, where the inner list is along the x-axis and the outer
- is along the y-axis
- cbars : list of :class:`matplotlib.axes.Axes` objects
- Each of these is an axes onto which a colorbar can be placed.
-
- Notes
- -----
- This is a simple implementation for a common use case. Viewing the source
- can be instructure, and is encouraged to see how to generate more
- complicated or more specific sets of multiplots for your own purposes.
- """
- hf, wf = 1.0/ny, 1.0/nx
- fudge_x = fudge_y = 1.0
- if colorbar is None:
- fudge_x = fudge_y = 1.0
- elif colorbar.lower() == 'vertical':
- fudge_x = nx/(cbar_padding+nx)
- fudge_y = 1.0
- elif colorbar.lower() == 'horizontal':
- fudge_x = 1.0
- fudge_y = ny/(cbar_padding+ny)
- fig = figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
- from _mpl_imports import FigureCanvasAgg
- fig.set_canvas(FigureCanvasAgg(fig))
- fig.subplots_adjust(wspace=0.0, hspace=0.0,
- top=1.0, bottom=0.0,
- left=0.0, right=1.0)
- tr = []
- print fudge_x, fudge_y
- for j in range(ny):
- tr.append([])
- for i in range(nx):
- left = i*wf*fudge_x
- bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
- ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
- tr[-1].append(ax)
- cbars = []
- if colorbar is None:
- pass
- elif colorbar.lower() == 'horizontal':
- for i in range(nx):
- # left, bottom, width, height
- # Here we want 0.10 on each side of the colorbar
- # We want it to be 0.05 tall
- # And we want a buffer of 0.15
- ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
- wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
- cbars.append(ax)
- elif colorbar.lower() == 'vertical':
- for j in range(ny):
- ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
- wf*fudge_x*0.05, hf*fudge_y*0.90])
- ax.clear()
- cbars.append(ax)
- return fig, tr, cbars
-
def _MPLFixImage(data_source, image_obj, field, cbar, cls):
nx, ny = image_obj.get_size()
def f(axes):
https://bitbucket.org/yt_analysis/yt-3.0/commits/3ba017a2fc1b/
Changeset: 3ba017a2fc1b
Branch: yt
User: MatthewTurk
Date: 2013-09-23 20:49:10
Summary: Fixing mass_electron_cgs.
Affected #: 1 file
diff -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 -r 3ba017a2fc1b2f8790d5ebc18703a87a87959aa8 yt/utilities/physical_constants.py
--- a/yt/utilities/physical_constants.py
+++ b/yt/utilities/physical_constants.py
@@ -8,7 +8,7 @@
# http://physics.nist.gov/cuu/Constants/index.html
# Masses
-mass_electron_cgs = 9.109382-28 # g
+mass_electron_cgs = 9.109382e-28 # g
amu_cgs = 1.660538921e-24 # g
mass_hydrogen_cgs = 1.007947*amu_cgs # g
mass_sun_cgs = 1.98841586e33 # g
https://bitbucket.org/yt_analysis/yt-3.0/commits/3a5b71a11af5/
Changeset: 3a5b71a11af5
Branch: yt
User: jsoishi
Date: 2013-09-23 23:06:28
Summary: The GhostZone IO handler for enzo now handles arbitrary numbers of ghost zones.
Affected #: 2 files
diff -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 -r 3a5b71a11af542c4c7105523bdc05f6f74e9ab4f yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -40,6 +40,7 @@
from yt.utilities.definitions import \
mpc_conversion, sec_conversion
from yt.utilities import hdf5_light_reader
+from yt.utilities.io_handler import io_registry
from yt.utilities.logger import ytLogger as mylog
from .definitions import parameterDict
@@ -543,6 +544,9 @@
result[p] = result[p][0:max_num]
return result
+ def _setup_data_io(self):
+ self.io = io_registry[self.data_style](self.parameter_file)
+
class EnzoHierarchyInMemory(EnzoHierarchy):
diff -r 493804c7cebbed7c214bcfe25bb6103abc3d7194 -r 3a5b71a11af542c4c7105523bdc05f6f74e9ab4f yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -32,6 +32,10 @@
_data_style = "enzo_hdf4"
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def modify(self, field):
return field.swapaxes(0,2)
@@ -61,6 +65,10 @@
_data_style = "enzo_hdf5"
_particle_reader = True
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_field_names(self, grid):
"""
Returns a list of fields associated with the filename
@@ -90,6 +98,10 @@
_data_style = "enzo_packed_3d"
_particle_reader = True
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_particles(self, fields, rtype, args, grid_list, enclosed,
conv_factors):
filenames = [g.filename for g in grid_list]
@@ -144,10 +156,18 @@
class IOHandlerPackedHDF5GhostZones(IOHandlerPackedHDF5):
_data_style = "enzo_packed_3d_gz"
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def modify(self, field):
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ sl = (slice(NGZ,-NGZ),
+ slice(NGZ,-NGZ),
+ slice(NGZ,-NGZ))
if len(field.shape) < 3:
return field
- tr = field[3:-3,3:-3,3:-3].swapaxes(0,2)
+ tr = field[sl].swapaxes(0,2)
return tr.copy() # To ensure contiguous
def _read_raw_data_set(self, grid, field):
@@ -158,7 +178,7 @@
_data_style = "enzo_inline"
- def __init__(self, ghost_zones=3):
+ def __init__(self, pf, ghost_zones=3):
import enzo
self.enzo = enzo
self.grids_in_memory = enzo.grid_data
@@ -166,6 +186,7 @@
self.my_slice = (slice(ghost_zones,-ghost_zones),
slice(ghost_zones,-ghost_zones),
slice(ghost_zones,-ghost_zones))
+ self.pf = pf
BaseIOHandler.__init__(self)
def _read_data(self, grid, field):
@@ -210,6 +231,10 @@
_data_style = "enzo_packed_2d"
_particle_reader = False
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_data(self, grid, field):
return hdf5_light_reader.ReadData(grid.filename,
"/Grid%08i/%s" % (grid.id, field)).transpose()[:,:,None]
@@ -228,6 +253,10 @@
_data_style = "enzo_packed_1d"
_particle_reader = False
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_data(self, grid, field):
return hdf5_light_reader.ReadData(grid.filename,
"/Grid%08i/%s" % (grid.id, field)).transpose()[:,None,None]
https://bitbucket.org/yt_analysis/yt-3.0/commits/4e4e453f1156/
Changeset: 4e4e453f1156
Branch: yt
User: jsoishi
Date: 2013-09-24 00:05:04
Summary: added the ability to get ghost zones for n_zones > 3. incidentally,
fixed a bug in EnzoGridGZ where if n_zones == number of ghost zones,
the grid would return an object of length zero.
Affected #: 1 file
diff -r 3a5b71a11af542c4c7105523bdc05f6f74e9ab4f -r 4e4e453f115689c5f6c898a963ed8207bc91212e yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -132,10 +132,11 @@
def retrieve_ghost_zones(self, n_zones, fields, all_levels=False,
smoothed=False):
- # We ignore smoothed in this case.
- if n_zones > 3:
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ if n_zones > NGZ:
return EnzoGrid.retrieve_ghost_zones(
self, n_zones, fields, all_levels, smoothed)
+
# ----- Below is mostly the original code, except we remove the field
# ----- access section
# We will attempt this by creating a datacube that is exactly bigger
@@ -163,7 +164,12 @@
level, new_left_edge, **kwargs)
# ----- This is EnzoGrid.get_data, duplicated here mostly for
# ---- efficiency's sake.
- sl = [slice(3 - n_zones, -(3 - n_zones)) for i in range(3)]
+ start_zone = NGZ - n_zones
+ if start_zone == 0:
+ end_zone = None
+ else:
+ end_zone = -(NGZ - n_zones)
+ sl = [slice(start_zone, end_zone) for i in range(3)]
if fields is None: return cube
for field in ensure_list(fields):
if field in self.hierarchy.field_list:
https://bitbucket.org/yt_analysis/yt-3.0/commits/fb0275961059/
Changeset: fb0275961059
Branch: yt
User: MatthewTurk
Date: 2013-09-24 02:50:25
Summary: Merged in jsoishi/yt (pull request #605)
Adding support for arbitrary numbers of ghost zones in the enzo frontend
Affected #: 2 files
diff -r 3ba017a2fc1b2f8790d5ebc18703a87a87959aa8 -r fb0275961059ae14c3ac809686f03edd8dbd6cca yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -40,6 +40,7 @@
from yt.utilities.definitions import \
mpc_conversion, sec_conversion
from yt.utilities import hdf5_light_reader
+from yt.utilities.io_handler import io_registry
from yt.utilities.logger import ytLogger as mylog
from .definitions import parameterDict
@@ -131,10 +132,11 @@
def retrieve_ghost_zones(self, n_zones, fields, all_levels=False,
smoothed=False):
- # We ignore smoothed in this case.
- if n_zones > 3:
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ if n_zones > NGZ:
return EnzoGrid.retrieve_ghost_zones(
self, n_zones, fields, all_levels, smoothed)
+
# ----- Below is mostly the original code, except we remove the field
# ----- access section
# We will attempt this by creating a datacube that is exactly bigger
@@ -162,7 +164,12 @@
level, new_left_edge, **kwargs)
# ----- This is EnzoGrid.get_data, duplicated here mostly for
# ---- efficiency's sake.
- sl = [slice(3 - n_zones, -(3 - n_zones)) for i in range(3)]
+ start_zone = NGZ - n_zones
+ if start_zone == 0:
+ end_zone = None
+ else:
+ end_zone = -(NGZ - n_zones)
+ sl = [slice(start_zone, end_zone) for i in range(3)]
if fields is None: return cube
for field in ensure_list(fields):
if field in self.hierarchy.field_list:
@@ -543,6 +550,9 @@
result[p] = result[p][0:max_num]
return result
+ def _setup_data_io(self):
+ self.io = io_registry[self.data_style](self.parameter_file)
+
class EnzoHierarchyInMemory(EnzoHierarchy):
diff -r 3ba017a2fc1b2f8790d5ebc18703a87a87959aa8 -r fb0275961059ae14c3ac809686f03edd8dbd6cca yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -32,6 +32,10 @@
_data_style = "enzo_hdf4"
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def modify(self, field):
return field.swapaxes(0,2)
@@ -61,6 +65,10 @@
_data_style = "enzo_hdf5"
_particle_reader = True
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_field_names(self, grid):
"""
Returns a list of fields associated with the filename
@@ -90,6 +98,10 @@
_data_style = "enzo_packed_3d"
_particle_reader = True
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_particles(self, fields, rtype, args, grid_list, enclosed,
conv_factors):
filenames = [g.filename for g in grid_list]
@@ -144,10 +156,18 @@
class IOHandlerPackedHDF5GhostZones(IOHandlerPackedHDF5):
_data_style = "enzo_packed_3d_gz"
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def modify(self, field):
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ sl = (slice(NGZ,-NGZ),
+ slice(NGZ,-NGZ),
+ slice(NGZ,-NGZ))
if len(field.shape) < 3:
return field
- tr = field[3:-3,3:-3,3:-3].swapaxes(0,2)
+ tr = field[sl].swapaxes(0,2)
return tr.copy() # To ensure contiguous
def _read_raw_data_set(self, grid, field):
@@ -158,7 +178,7 @@
_data_style = "enzo_inline"
- def __init__(self, ghost_zones=3):
+ def __init__(self, pf, ghost_zones=3):
import enzo
self.enzo = enzo
self.grids_in_memory = enzo.grid_data
@@ -166,6 +186,7 @@
self.my_slice = (slice(ghost_zones,-ghost_zones),
slice(ghost_zones,-ghost_zones),
slice(ghost_zones,-ghost_zones))
+ self.pf = pf
BaseIOHandler.__init__(self)
def _read_data(self, grid, field):
@@ -210,6 +231,10 @@
_data_style = "enzo_packed_2d"
_particle_reader = False
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_data(self, grid, field):
return hdf5_light_reader.ReadData(grid.filename,
"/Grid%08i/%s" % (grid.id, field)).transpose()[:,:,None]
@@ -228,6 +253,10 @@
_data_style = "enzo_packed_1d"
_particle_reader = False
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_data(self, grid, field):
return hdf5_light_reader.ReadData(grid.filename,
"/Grid%08i/%s" % (grid.id, field)).transpose()[:,None,None]
https://bitbucket.org/yt_analysis/yt-3.0/commits/f810c7b20b1b/
Changeset: f810c7b20b1b
Branch: yt
User: ngoldbaum
Date: 2013-09-24 07:13:16
Summary: Making it possible to plot excluded fields. Closes #467.
Affected #: 1 file
diff -r fb0275961059ae14c3ac809686f03edd8dbd6cca -r f810c7b20b1bc633d6aaa49046862db22565f017 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -290,7 +290,8 @@
_vector_info = None
_frb = None
def __init__(self, data_source, bounds, buff_size=(800,800), antialias=True,
- periodic=True, origin='center-window', oblique=False, window_size=10.0):
+ periodic=True, origin='center-window', oblique=False,
+ window_size=10.0, fields=None):
if not hasattr(self, "pf"):
self.pf = data_source.pf
ts = self._initialize_dataset(self.pf)
@@ -304,8 +305,13 @@
self.buff_size = buff_size
self.window_size = window_size
self.antialias = antialias
+ skip = list(FixedResolutionBuffer._exclude_fields) + data_source._key_fields
+ if fields is None:
+ fields = []
+ self.override_fields = list(np.intersect1d(fields, skip))
self.set_window(bounds) # this automatically updates the data and plot
self.origin = origin
+
if self.data_source.center is not None and oblique == False:
center = [self.data_source.center[i] for i in range(len(self.data_source.center))
if i != self.data_source.axis]
@@ -359,6 +365,8 @@
self._frb._get_data_source_fields()
else:
for key in old_fields: self._frb[key]
+ for key in self.override_fields:
+ self._frb[key]
self._data_valid = True
def _setup_plots(self):
@@ -366,7 +374,7 @@
@property
def fields(self):
- return self._frb.data.keys()
+ return self._frb.data.keys() + self.override_fields
@property
def width(self):
@@ -1274,7 +1282,8 @@
axes_unit = units
if field_parameters is None: field_parameters = {}
slc = pf.h.slice(axis, center[axis], center=center, fields=fields, **field_parameters)
- PWViewerMPL.__init__(self, slc, bounds, origin=origin, fontsize=fontsize)
+ PWViewerMPL.__init__(self, slc, bounds, origin=origin,
+ fontsize=fontsize, fields=fields)
self.set_axes_unit(axes_unit)
class ProjectionPlot(PWViewerMPL):
@@ -1391,7 +1400,8 @@
if field_parameters is None: field_parameters = {}
proj = pf.h.proj(axis, fields, weight_field=weight_field, max_level=max_level,
center=center, source=data_source, **field_parameters)
- PWViewerMPL.__init__(self, proj, bounds, origin=origin, fontsize=fontsize)
+ PWViewerMPL.__init__(self, proj, bounds, origin=origin,
+ fontsize=fontsize, fields=fields)
self.set_axes_unit(axes_unit)
class OffAxisSlicePlot(PWViewerMPL):
@@ -1450,8 +1460,9 @@
cutting = pf.h.cutting(normal, center, fields=fields, north_vector=north_vector, **field_parameters)
# Hard-coding the origin keyword since the other two options
# aren't well-defined for off-axis data objects
- PWViewerMPL.__init__(self, cutting, bounds, origin='center-window', periodic=False,
- oblique=True, fontsize=fontsize)
+ PWViewerMPL.__init__(self, cutting, bounds, origin='center-window',
+ periodic=False, oblique=True, fontsize=fontsize,
+ fields=fields)
self.set_axes_unit(axes_unit)
class OffAxisProjectionDummyDataSource(object):
https://bitbucket.org/yt_analysis/yt-3.0/commits/ac2f89323c45/
Changeset: ac2f89323c45
Branch: yt
User: ngoldbaum
Date: 2013-09-24 07:28:47
Summary: Need to ensure that fields is a list.
Affected #: 1 file
diff -r f810c7b20b1bc633d6aaa49046862db22565f017 -r ac2f89323c453e701672d44b2dfc0e669b3e2454 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -308,6 +308,8 @@
skip = list(FixedResolutionBuffer._exclude_fields) + data_source._key_fields
if fields is None:
fields = []
+ else:
+ fields = ensure_list(fields)
self.override_fields = list(np.intersect1d(fields, skip))
self.set_window(bounds) # this automatically updates the data and plot
self.origin = origin
https://bitbucket.org/yt_analysis/yt-3.0/commits/b154dfce6acc/
Changeset: b154dfce6acc
Branch: yt
User: ngoldbaum
Date: 2013-09-24 07:34:04
Summary: Removing an extraneous carriage return.
Affected #: 1 file
diff -r ac2f89323c453e701672d44b2dfc0e669b3e2454 -r b154dfce6acc5a293d7abfe20d64acc542919627 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -313,7 +313,6 @@
self.override_fields = list(np.intersect1d(fields, skip))
self.set_window(bounds) # this automatically updates the data and plot
self.origin = origin
-
if self.data_source.center is not None and oblique == False:
center = [self.data_source.center[i] for i in range(len(self.data_source.center))
if i != self.data_source.axis]
https://bitbucket.org/yt_analysis/yt-3.0/commits/08d537fcc713/
Changeset: 08d537fcc713
Branch: yt-3.0
User: MatthewTurk
Date: 2013-09-25 20:54:06
Summary: Merging from 2.X.
Affected #: 13 files
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b CITATION
--- /dev/null
+++ b/CITATION
@@ -0,0 +1,31 @@
+To cite yt in publications, please use:
+
+Turk, M. J., Smith, B. D., Oishi, J. S., et al. 2011, ApJS, 192, 9
+
+In the body of the text, please add a footnote to the yt webpage:
+
+http://yt-project.org/
+
+For LaTex and BibTex users:
+
+\bibitem[Turk et al.(2011)]{2011ApJS..192....9T} Turk, M.~J., Smith, B.~D.,
+Oishi, J.~S., et al.\ 2011, \apjs, 192, 9
+
+ at ARTICLE{2011ApJS..192....9T,
+ author = {{Turk}, M.~J. and {Smith}, B.~D. and {Oishi}, J.~S. and {Skory}, S. and
+{Skillman}, S.~W. and {Abel}, T. and {Norman}, M.~L.},
+ title = "{yt: A Multi-code Analysis Toolkit for Astrophysical Simulation Data}",
+ journal = {\apjs},
+archivePrefix = "arXiv",
+ eprint = {1011.3514},
+ primaryClass = "astro-ph.IM",
+ keywords = {cosmology: theory, methods: data analysis, methods: numerical},
+ year = 2011,
+ month = jan,
+ volume = 192,
+ eid = {9},
+ pages = {9},
+ doi = {10.1088/0067-0049/192/1/9},
+ adsurl = {http://adsabs.harvard.edu/abs/2011ApJS..192....9T},
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b doc/get_yt.sh
--- /dev/null
+++ b/doc/get_yt.sh
@@ -0,0 +1,358 @@
+#
+# Hi there! Welcome to the yt installation script.
+#
+# This script is designed to create a fully isolated Python installation
+# with the dependencies you need to run yt.
+#
+# This script is based on Conda, a distribution mechanism from Continuum
+# Analytics. The process is as follows:
+#
+# 1. Download the appropriate Conda installation package
+# 2. Install Conda into the specified directory
+# 3. Install yt-specific dependencies
+# 4. Install yt
+#
+# There are a few options listed below, but by default, this will install
+# everything. At the end, it will tell you what to do to use yt.
+#
+# By default this will install yt from source.
+#
+# If you experience problems, please visit the Help section at
+# http://yt-project.org.
+#
+DEST_SUFFIX="yt-conda"
+DEST_DIR="`pwd`/${DEST_SUFFIX/ /}" # Installation location
+BRANCH="yt" # This is the branch to which we will forcibly update.
+INST_YT_SOURCE=1 # Do we do a source install of yt?
+
+##################################################################
+# #
+# You will likely not have to modify anything below this region. #
+# #
+##################################################################
+
+LOG_FILE="`pwd`/yt_install.log"
+
+# Here is the idiom for redirecting to the log file:
+# ( SOMECOMMAND 2>&1 ) 1>> ${LOG_FILE} || do_exit
+
+MINICONDA_URLBASE="http://repo.continuum.io/miniconda"
+MINICONDA_VERSION="1.9.1"
+YT_RECIPE_REPO="https://bitbucket.org/yt_analysis/yt_conda/raw/default"
+
+function do_exit
+{
+ echo "********************************************"
+ echo " FAILURE REPORT:"
+ echo "********************************************"
+ echo
+ tail -n 10 ${LOG_FILE}
+ echo
+ echo "********************************************"
+ echo "********************************************"
+ echo "Failure. Check ${LOG_FILE}. The last 10 lines are above."
+ exit 1
+}
+
+function log_cmd
+{
+ echo "EXECUTING:" >> ${LOG_FILE}
+ echo " $*" >> ${LOG_FILE}
+ ( $* 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytproject
+{
+ [ -e $1 ] && return
+ echo "Downloading $1 from yt-project.org"
+ ${GETFILE} "http://yt-project.org/dependencies/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytdata
+{
+ echo "Downloading $1 from yt-project.org"
+ [ -e $1 ] && return
+ ${GETFILE} "http://yt-project.org/data/$1" || do_exit
+ ( ${SHASUM} -c $1.sha512 2>&1 ) 1>> ${LOG_FILE} || do_exit
+}
+
+function get_ytrecipe {
+ RDIR=${DEST_DIR}/src/yt-recipes/$1
+ mkdir -p ${RDIR}
+ pushd ${RDIR}
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/meta.yaml
+ log_cmd ${GETFILE} ${YT_RECIPE_REPO}/$1/build.sh
+ NEW_PKG=`conda build --output ${RDIR}`
+ log_cmd conda build --no-binstar-upload ${RDIR}
+ log_cmd conda install ${NEW_PKG}
+ popd
+}
+
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "Hi there! This is the yt installation script. We're going to download"
+echo "some stuff and install it to create a self-contained, isolated"
+echo "environment for yt to run within."
+echo
+echo "This will install Miniconda from Continuum Analytics, the necessary"
+echo "packages to run yt, and create a self-contained environment for you to"
+echo "use yt. Additionally, Conda itself provides the ability to install"
+echo "many other packages that can be used for other purposes."
+echo
+MYOS=`uname -s` # A guess at the OS
+if [ "${MYOS##Darwin}" != "${MYOS}" ]
+then
+ echo "Looks like you're running on Mac OSX."
+ echo
+ echo "NOTE: you must have the Xcode command line tools installed."
+ echo
+ echo "The instructions for obtaining these tools varies according"
+ echo "to your exact OS version. On older versions of OS X, you"
+ echo "must register for an account on the apple developer tools"
+ echo "website: https://developer.apple.com/downloads to obtain the"
+ echo "download link."
+ echo
+ echo "We have gathered some additional instructions for each"
+ echo "version of OS X below. If you have trouble installing yt"
+ echo "after following these instructions, don't hesitate to contact"
+ echo "the yt user's e-mail list."
+ echo
+ echo "You can see which version of OSX you are running by clicking"
+ echo "'About This Mac' in the apple menu on the left hand side of"
+ echo "menu bar. We're assuming that you've installed all operating"
+ echo "system updates; if you have an older version, we suggest"
+ echo "running software update and installing all available updates."
+ echo
+ echo "OS X 10.5.8: search for and download Xcode 3.1.4 from the"
+ echo "Apple developer tools website."
+ echo
+ echo "OS X 10.6.8: search for and download Xcode 3.2 from the Apple"
+ echo "developer tools website. You can either download the"
+ echo "Xcode 3.2.2 Developer Tools package (744 MB) and then use"
+ echo "Software Update to update to XCode 3.2.6 or"
+ echo "alternatively, you can download the Xcode 3.2.6/iOS SDK"
+ echo "bundle (4.1 GB)."
+ echo
+ echo "OS X 10.7.5: download Xcode 4.2 from the mac app store"
+ echo "(search for Xcode)."
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "OS X 10.8.2: download Xcode 4.6.1 from the mac app store."
+ echo "(search for Xcode)."
+ echo "Additionally, you will have to manually install the Xcode"
+ echo "command line tools, see:"
+ echo "http://stackoverflow.com/questions/9353444"
+ echo "Alternatively, download the Xcode command line tools from"
+ echo "the Apple developer tools website."
+ echo
+ echo "NOTE: It's possible that the installation will fail, if so,"
+ echo "please set the following environment variables, remove any"
+ echo "broken installation tree, and re-run this script verbatim."
+ echo
+ echo "$ export CC=gcc"
+ echo "$ export CXX=g++"
+ echo
+ MINICONDA_OS="MacOSX-x86_64"
+fi
+if [ "${MYOS##Linux}" != "${MYOS}" ]
+then
+ echo "Looks like you're on Linux."
+ echo
+ echo "Please make sure you have the developer tools for your OS installed."
+ echo
+ if [ -f /etc/SuSE-release ] && [ `grep --count SUSE /etc/SuSE-release` -gt 0 ]
+ then
+ echo "Looks like you're on an OpenSUSE-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * devel_C_C++"
+ echo " * libopenssl-devel"
+ echo " * libuuid-devel"
+ echo " * zip"
+ echo " * gcc-c++"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo zypper install -t pattern devel_C_C++"
+ echo "$ sudo zypper install gcc-c++ libopenssl-devel libuuid-devel zip"
+ echo "$ sudo zypper install chrpath"
+ fi
+ if [ -f /etc/lsb-release ] && [ `grep --count buntu /etc/lsb-release` -gt 0 ]
+ then
+ echo "Looks like you're on an Ubuntu-compatible machine."
+ echo
+ echo "You need to have these packages installed:"
+ echo
+ echo " * libssl-dev"
+ echo " * build-essential"
+ echo " * libncurses5"
+ echo " * libncurses5-dev"
+ echo " * zip"
+ echo " * uuid-dev"
+ echo " * chrpath"
+ echo
+ echo "You can accomplish this by executing:"
+ echo
+ echo "$ sudo apt-get install libssl-dev build-essential libncurses5 libncurses5-dev zip uuid-dev chrpath"
+ echo
+ fi
+ echo
+ echo "If you are running on a supercomputer or other module-enabled"
+ echo "system, please make sure that the GNU module has been loaded."
+ echo
+ if [ "${MYOS##x86_64}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86_64"
+ elif [ "${MYOS##i386}" != "${MYOS}" ]
+ then
+ MINICONDA_OS="Linux-x86"
+ else
+ echo "Not sure which type of Linux you're on. Going with x86_64."
+ MINICONDA_OS="Linux-x86_64"
+ fi
+fi
+echo
+echo "If you'd rather not continue, hit Ctrl-C."
+echo
+echo "========================================================================"
+echo
+read -p "[hit enter] "
+echo
+echo "Awesome! Here we go."
+echo
+
+MINICONDA_PKG=Miniconda-${MINICONDA_VERSION}-${MINICONDA_OS}.sh
+
+if type -P wget &>/dev/null
+then
+ echo "Using wget"
+ export GETFILE="wget -nv"
+else
+ echo "Using curl"
+ export GETFILE="curl -sSO"
+fi
+
+echo
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}"
+echo "Downloading ${MINICONDA_URLBASE}/${MINICONDA_PKG}" >> ${LOG_FILE}
+echo
+
+${GETFILE} ${MINICONDA_URLBASE}/${MINICONDA_PKG} || do_exit
+
+echo "Installing the Miniconda python environment."
+
+log_cmd bash ./${MINICONDA_PKG} -b -p $DEST_DIR
+
+# I don't think we need OR want this anymore:
+#export LD_LIBRARY_PATH=${DEST_DIR}/lib:$LD_LIBRARY_PATH
+
+# This we *do* need.
+export PATH=${DEST_DIR}/bin:$PATH
+
+echo "Installing the necessary packages for yt."
+echo "This may take a while, but don't worry. yt loves you."
+
+declare -a YT_DEPS
+YT_DEPS+=('python')
+YT_DEPS+=('distribute')
+YT_DEPS+=('libpng')
+YT_DEPS+=('freetype')
+YT_DEPS+=('hdf5')
+YT_DEPS+=('numpy')
+YT_DEPS+=('pygments')
+YT_DEPS+=('jinja2')
+YT_DEPS+=('tornado')
+YT_DEPS+=('pyzmq')
+YT_DEPS+=('ipython')
+YT_DEPS+=('sphinx')
+YT_DEPS+=('h5py')
+YT_DEPS+=('matplotlib')
+YT_DEPS+=('cython')
+
+# Here is our dependency list for yt
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/free
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/dev
+log_cmd conda config --system --add channels http://repo.continuum.io/pkgs/gpl
+log_cmd conda update --yes conda
+
+echo "Current dependencies: ${YT_DEPS[@]}"
+log_cmd echo "DEPENDENCIES" ${YT_DEPS[@]}
+log_cmd conda install --yes ${YT_DEPS[@]}
+
+echo "Installing mercurial."
+get_ytrecipe mercurial
+
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "Installing yt as a package."
+ get_ytrecipe yt
+else
+ # We do a source install.
+ YT_DIR="${DEST_DIR}/src/yt-hg"
+ export PNG_DIR=${DEST_DIR}
+ export FTYPE_DIR=${DEST_DIR}
+ export HDF5_DIR=${DEST_DIR}
+ log_cmd hg clone -r ${BRANCH} https://bitbucket.org/yt_analysis/yt ${YT_DIR}
+ pushd ${YT_DIR}
+ echo $DEST_DIR > hdf5.cfg
+ log_cmd python setup.py develop
+ popd
+ log_cmd cp ${YT_DIR}/doc/activate ${DEST_DIR}/bin/activate
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate
+ log_cmd cp ${YT_DIR}/doc/activate.csh ${DEST_DIR}/bin/activate.csh
+ log_cmd sed -i.bak -e "s,__YT_DIR__,${DEST_DIR}," ${DEST_DIR}/bin/activate.csh
+fi
+
+echo
+echo
+echo "========================================================================"
+echo
+echo "yt and the Conda system are now installed in $DEST_DIR ."
+echo
+if [ $INST_YT_SOURCE -eq 0 ]
+then
+ echo "You must now modify your PATH variable by prepending:"
+ echo
+ echo " $DEST_DIR/bin"
+ echo
+ echo "For example, if you use bash, place something like this at the end"
+ echo "of your ~/.bashrc :"
+ echo
+ echo " export PATH=$DEST_DIR/bin:$PATH"
+else
+ echo "To run from this new installation, use the activate script for this "
+ echo "environment."
+ echo
+ echo " $ source $DEST_DIR/bin/activate"
+ echo
+ echo "This modifies the environment variables YT_DEST, PATH, PYTHONPATH, and"
+ echo "LD_LIBRARY_PATH to match your new yt install. If you use csh, just"
+ echo "append .csh to the above."
+fi
+echo
+echo "To get started with yt, check out the orientation:"
+echo
+echo " http://yt-project.org/doc/orientation/"
+echo
+echo "or just activate your environment and run 'yt serve' to bring up the"
+echo "yt GUI."
+echo
+echo "For support, see the website and join the mailing list:"
+echo
+echo " http://yt-project.org/"
+echo " http://yt-project.org/data/ (Sample data)"
+echo " http://yt-project.org/doc/ (Docs)"
+echo
+echo " http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
+echo
+echo "========================================================================"
+echo
+echo "Oh, look at me, still talking when there's science to do!"
+echo "Good luck, and email the user list if you run into any problems."
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -39,6 +39,7 @@
from yt.utilities.definitions import \
mpc_conversion, sec_conversion
from yt.utilities import hdf5_light_reader
+from yt.utilities.io_handler import io_registry
from yt.utilities.logger import ytLogger as mylog
from .definitions import parameterDict
@@ -143,10 +144,11 @@
def retrieve_ghost_zones(self, n_zones, fields, all_levels=False,
smoothed=False):
- # We ignore smoothed in this case.
- if n_zones > 3:
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ if n_zones > NGZ:
return EnzoGrid.retrieve_ghost_zones(
self, n_zones, fields, all_levels, smoothed)
+
# ----- Below is mostly the original code, except we remove the field
# ----- access section
# We will attempt this by creating a datacube that is exactly bigger
@@ -174,7 +176,12 @@
level, new_left_edge, **kwargs)
# ----- This is EnzoGrid.get_data, duplicated here mostly for
# ---- efficiency's sake.
- sl = [slice(3 - n_zones, -(3 - n_zones)) for i in range(3)]
+ start_zone = NGZ - n_zones
+ if start_zone == 0:
+ end_zone = None
+ else:
+ end_zone = -(NGZ - n_zones)
+ sl = [slice(start_zone, end_zone) for i in range(3)]
if fields is None: return cube
for field in ensure_list(fields):
if field in self.hierarchy.field_list:
@@ -565,6 +572,9 @@
result[p] = result[p][0:max_num]
return result
+ def _setup_data_io(self):
+ self.io = io_registry[self.data_style](self.parameter_file)
+
class EnzoHierarchyInMemory(EnzoHierarchy):
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -35,6 +35,10 @@
_data_style = "enzo_packed_3d"
_base = slice(None)
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+
def _read_field_names(self, grid):
return hdf5_light_reader.ReadListOfDatasets(
grid.filename, "/Grid%08i" % grid.id)
@@ -198,7 +202,14 @@
class IOHandlerPackedHDF5GhostZones(IOHandlerPackedHDF5):
_data_style = "enzo_packed_3d_gz"
- _base = (slice(3, -3), slice(3, -3), slice(3, -3))
+
+ def __init__(self, pf, *args, **kwargs):
+ BaseIOHandler.__init__(self, *args, **kwargs)
+ self.pf = pf
+ NGZ = self.pf.parameters.get("NumberOfGhostZones", 3)
+ self._base = (slice(NGZ, -NGZ),
+ slice(NGZ, -NGZ),
+ slice(NGZ, -NGZ))
def _read_raw_data_set(self, grid, field):
return hdf5_light_reader.ReadData(grid.filename,
@@ -208,7 +219,8 @@
_data_style = "enzo_inline"
- def __init__(self, ghost_zones=3):
+ def __init__(self, pf, ghost_zones=3):
+ self.pf = pf
import enzo
self.enzo = enzo
self.grids_in_memory = enzo.grid_data
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/utilities/physical_constants.py
--- a/yt/utilities/physical_constants.py
+++ b/yt/utilities/physical_constants.py
@@ -8,7 +8,7 @@
# http://physics.nist.gov/cuu/Constants/index.html
# Masses
-mass_electron_cgs = 9.109382-28 # g
+mass_electron_cgs = 9.109382e-28 # g
amu_cgs = 1.660538921e-24 # g
mass_hydrogen_cgs = 1.007947*amu_cgs # g
mass_sun_cgs = 1.98841586e33 # g
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/visualization/api.py
--- a/yt/visualization/api.py
+++ b/yt/visualization/api.py
@@ -20,8 +20,7 @@
from plot_collection import \
PlotCollection, \
PlotCollectionInteractive, \
- concatenate_pdfs, \
- get_multi_plot
+ concatenate_pdfs
from fixed_resolution import \
FixedResolutionBuffer, \
@@ -54,5 +53,7 @@
OffAxisSlicePlot, \
ProjectionPlot, \
OffAxisProjectionPlot
-
+from base_plot_types import \
+ get_multi_plot
+
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/visualization/base_plot_types.py
--- a/yt/visualization/base_plot_types.py
+++ b/yt/visualization/base_plot_types.py
@@ -95,3 +95,85 @@
f.seek(0)
return f.read()
+def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
+ cbar_padding = 0.4):
+ r"""Construct a multiple axes plot object, with or without a colorbar, into
+ which multiple plots may be inserted.
+
+ This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
+ a grid, which are then returned to the user and which can be used to plot
+ multiple plots on a single figure.
+
+ Parameters
+ ----------
+ nx : int
+ Number of axes to create along the x-direction
+ ny : int
+ Number of axes to create along the y-direction
+ colorbar : {'vertical', 'horizontal', None}, optional
+ Should Axes objects for colorbars be allocated, and if so, should they
+ correspond to the horizontal or vertical set of axes?
+ bw : number
+ The base height/width of an axes object inside the figure, in inches
+ dpi : number
+ The dots per inch fed into the Figure instantiation
+
+ Returns
+ -------
+ fig : :class:`matplotlib.figure.Figure`
+ The figure created inside which the axes reside
+ tr : list of list of :class:`matplotlib.axes.Axes` objects
+ This is a list, where the inner list is along the x-axis and the outer
+ is along the y-axis
+ cbars : list of :class:`matplotlib.axes.Axes` objects
+ Each of these is an axes onto which a colorbar can be placed.
+
+ Notes
+ -----
+ This is a simple implementation for a common use case. Viewing the source
+ can be instructure, and is encouraged to see how to generate more
+ complicated or more specific sets of multiplots for your own purposes.
+ """
+ hf, wf = 1.0/ny, 1.0/nx
+ fudge_x = fudge_y = 1.0
+ if colorbar is None:
+ fudge_x = fudge_y = 1.0
+ elif colorbar.lower() == 'vertical':
+ fudge_x = nx/(cbar_padding+nx)
+ fudge_y = 1.0
+ elif colorbar.lower() == 'horizontal':
+ fudge_x = 1.0
+ fudge_y = ny/(cbar_padding+ny)
+ fig = matplotlib.figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
+ from _mpl_imports import FigureCanvasAgg
+ fig.set_canvas(FigureCanvasAgg(fig))
+ fig.subplots_adjust(wspace=0.0, hspace=0.0,
+ top=1.0, bottom=0.0,
+ left=0.0, right=1.0)
+ tr = []
+ for j in range(ny):
+ tr.append([])
+ for i in range(nx):
+ left = i*wf*fudge_x
+ bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
+ ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
+ tr[-1].append(ax)
+ cbars = []
+ if colorbar is None:
+ pass
+ elif colorbar.lower() == 'horizontal':
+ for i in range(nx):
+ # left, bottom, width, height
+ # Here we want 0.10 on each side of the colorbar
+ # We want it to be 0.05 tall
+ # And we want a buffer of 0.15
+ ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
+ wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
+ cbars.append(ax)
+ elif colorbar.lower() == 'vertical':
+ for j in range(ny):
+ ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
+ wf*fudge_x*0.05, hf*fudge_y*0.90])
+ ax.clear()
+ cbars.append(ax)
+ return fig, tr, cbars
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -1699,90 +1699,6 @@
canvas = FigureCanvasAgg(plot._figure)
send_figure(plot._figure)
-def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
- cbar_padding = 0.4):
- r"""Construct a multiple axes plot object, with or without a colorbar, into
- which multiple plots may be inserted.
-
- This will create a set of :class:`matplotlib.axes.Axes`, all lined up into
- a grid, which are then returned to the user and which can be used to plot
- multiple plots on a single figure.
-
- Parameters
- ----------
- nx : int
- Number of axes to create along the x-direction
- ny : int
- Number of axes to create along the y-direction
- colorbar : {'vertical', 'horizontal', None}, optional
- Should Axes objects for colorbars be allocated, and if so, should they
- correspond to the horizontal or vertical set of axes?
- bw : number
- The base height/width of an axes object inside the figure, in inches
- dpi : number
- The dots per inch fed into the Figure instantiation
-
- Returns
- -------
- fig : :class:`matplotlib.figure.Figure`
- The figure created inside which the axes reside
- tr : list of list of :class:`matplotlib.axes.Axes` objects
- This is a list, where the inner list is along the x-axis and the outer
- is along the y-axis
- cbars : list of :class:`matplotlib.axes.Axes` objects
- Each of these is an axes onto which a colorbar can be placed.
-
- Notes
- -----
- This is a simple implementation for a common use case. Viewing the source
- can be instructure, and is encouraged to see how to generate more
- complicated or more specific sets of multiplots for your own purposes.
- """
- hf, wf = 1.0/ny, 1.0/nx
- fudge_x = fudge_y = 1.0
- if colorbar is None:
- fudge_x = fudge_y = 1.0
- elif colorbar.lower() == 'vertical':
- fudge_x = nx/(cbar_padding+nx)
- fudge_y = 1.0
- elif colorbar.lower() == 'horizontal':
- fudge_x = 1.0
- fudge_y = ny/(cbar_padding+ny)
- fig = figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
- from _mpl_imports import FigureCanvasAgg
- fig.set_canvas(FigureCanvasAgg(fig))
- fig.subplots_adjust(wspace=0.0, hspace=0.0,
- top=1.0, bottom=0.0,
- left=0.0, right=1.0)
- tr = []
- print fudge_x, fudge_y
- for j in range(ny):
- tr.append([])
- for i in range(nx):
- left = i*wf*fudge_x
- bottom = fudge_y*(1.0-(j+1)*hf) + (1.0-fudge_y)
- ax = fig.add_axes([left, bottom, wf*fudge_x, hf*fudge_y])
- tr[-1].append(ax)
- cbars = []
- if colorbar is None:
- pass
- elif colorbar.lower() == 'horizontal':
- for i in range(nx):
- # left, bottom, width, height
- # Here we want 0.10 on each side of the colorbar
- # We want it to be 0.05 tall
- # And we want a buffer of 0.15
- ax = fig.add_axes([wf*(i+0.10)*fudge_x, hf*fudge_y*0.20,
- wf*(1-0.20)*fudge_x, hf*fudge_y*0.05])
- cbars.append(ax)
- elif colorbar.lower() == 'vertical':
- for j in range(ny):
- ax = fig.add_axes([wf*(nx+0.05)*fudge_x, hf*fudge_y*(ny-(j+0.95)),
- wf*fudge_x*0.05, hf*fudge_y*0.90])
- ax.clear()
- cbars.append(ax)
- return fig, tr, cbars
-
def _MPLFixImage(data_source, image_obj, field, cbar, cls):
nx, ny = image_obj.get_size()
def f(axes):
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -214,17 +214,20 @@
class ContourCallback(PlotCallback):
"""
annotate_contour(field, ncont=5, factor=4, take_log=None, clim=None,
- plot_args=None, label=False, label_args=None):
+ plot_args=None, label=False, label_args=None,
+ data_source=None):
Add contours in *field* to the plot. *ncont* governs the number of
contours generated, *factor* governs the number of points used in the
interpolation, *take_log* governs how it is contoured and *clim* gives
- the (upper, lower) limits for contouring.
+ the (upper, lower) limits for contouring. An alternate data source can be
+ specified with *data_source*, but by default the plot's data source will be
+ queried.
"""
_type_name = "contour"
def __init__(self, field, ncont=5, factor=4, clim=None,
plot_args = None, label = False, take_log = None,
- label_args = None):
+ label_args = None, data_source = None):
PlotCallback.__init__(self)
self.ncont = ncont
self.field = field
@@ -239,6 +242,7 @@
if label_args is None:
label_args = {}
self.label_args = label_args
+ self.data_source = data_source
def __call__(self, plot):
x0, x1 = plot.xlim
@@ -259,26 +263,27 @@
# We want xi, yi in plot coordinates
xi, yi = np.mgrid[xx0:xx1:numPoints_x/(self.factor*1j),
yy0:yy1:numPoints_y/(self.factor*1j)]
+ data = self.data_source or plot.data
if plot._type_name in ['CuttingPlane','Projection','Slice']:
if plot._type_name == 'CuttingPlane':
- x = plot.data["px"]*dx
- y = plot.data["py"]*dy
- z = plot.data[self.field]
+ x = data["px"]*dx
+ y = data["py"]*dy
+ z = data[self.field]
elif plot._type_name in ['Projection','Slice']:
#Makes a copy of the position fields "px" and "py" and adds the
#appropriate shift to the copied field.
- AllX = np.zeros(plot.data["px"].size, dtype='bool')
- AllY = np.zeros(plot.data["py"].size, dtype='bool')
- XShifted = plot.data["px"].copy()
- YShifted = plot.data["py"].copy()
+ AllX = np.zeros(data["px"].size, dtype='bool')
+ AllY = np.zeros(data["py"].size, dtype='bool')
+ XShifted = data["px"].copy()
+ YShifted = data["py"].copy()
dom_x, dom_y = plot._period
for shift in np.mgrid[-1:1:3j]:
- xlim = ((plot.data["px"] + shift*dom_x >= x0) &
- (plot.data["px"] + shift*dom_x <= x1))
- ylim = ((plot.data["py"] + shift*dom_y >= y0) &
- (plot.data["py"] + shift*dom_y <= y1))
+ xlim = ((data["px"] + shift*dom_x >= x0) &
+ (data["px"] + shift*dom_x <= x1))
+ ylim = ((data["py"] + shift*dom_y >= y0) &
+ (data["py"] + shift*dom_y <= y1))
XShifted[xlim] += shift * dom_x
YShifted[ylim] += shift * dom_y
AllX |= xlim
@@ -291,7 +296,7 @@
# This converts XShifted and YShifted into plot coordinates
x = (XShifted[wI]-x0)*dx + xx0
y = (YShifted[wI]-y0)*dy + yy0
- z = plot.data[self.field][wI]
+ z = data[self.field][wI]
# Both the input and output from the triangulator are in plot
# coordinates
diff -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e -r 08d537fcc7133a7203c2d418218bc928c13ae08b yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -52,6 +52,7 @@
from yt.utilities.exceptions import \
YTUnitNotRecognized, YTInvalidWidthError, YTCannotParseUnitDisplayName, \
YTNotInsideNotebook
+
from yt.data_objects.time_series import \
TimeSeriesData
@@ -104,7 +105,7 @@
def newfunc(*args, **kwargs):
rv = f(*args[1:], **kwargs)
args[0]._callbacks.append((f.__name__,(args,kwargs)))
- return rv
+ return args[0]
return newfunc
field_transforms = {}
@@ -294,7 +295,7 @@
_frb = None
def __init__(self, data_source, bounds, buff_size=(800,800), antialias=True,
periodic=True, origin='center-window', oblique=False,
- window_size=10.0):
+ window_size=10.0, fields=None):
if not hasattr(self, "pf"):
self.pf = data_source.pf
ts = self._initialize_dataset(self.pf)
@@ -308,6 +309,12 @@
self.buff_size = buff_size
self.window_size = window_size
self.antialias = antialias
+ skip = list(FixedResolutionBuffer._exclude_fields) + data_source._key_fields
+ if fields is None:
+ fields = []
+ else:
+ fields = ensure_list(fields)
+ self.override_fields = list(np.intersect1d(fields, skip))
self.set_window(bounds) # this automatically updates the data and plot
self.origin = origin
if self.data_source.center is not None and oblique == False:
@@ -364,6 +371,8 @@
self._frb._get_data_source_fields()
else:
for key in old_fields: self._frb[key]
+ for key in self.override_fields:
+ self._frb[key]
self._data_valid = True
def _setup_plots(self):
@@ -371,7 +380,7 @@
@property
def fields(self):
- return self._frb.data.keys()
+ return self._frb.data.keys() + self.override_fields
@property
def width(self):
@@ -522,6 +531,7 @@
mw = max([width[0][0], width[1][0]])
self.zlim = (centerz - mw/2.,
centerz + mw/2.)
+ return self
@invalidate_data
def set_center(self, new_center, unit = '1'):
@@ -544,6 +554,7 @@
new_center = [c / self.pf[unit] for c in new_center]
self.center = new_center
self.set_window(self.bounds)
+ return self
@invalidate_data
def set_antialias(self,aa):
@@ -563,6 +574,7 @@
self.buff_size = size
else:
self.buff_size = (size, size)
+ return self
@invalidate_plot
@invalidate_figure
@@ -576,11 +588,12 @@
including the margins but not the colorbar.
"""
self.window_size = float(size)
+ return self
@invalidate_data
def refresh(self):
# invalidate_data will take care of everything
- pass
+ return self
class PWViewer(PlotWindow):
"""A viewer for PlotWindows.
@@ -627,6 +640,7 @@
self._field_transform[field] = log_transform
else:
self._field_transform[field] = linear_transform
+ return self
@invalidate_plot
def set_transform(self, field, name):
@@ -634,6 +648,7 @@
if name not in field_transforms:
raise KeyError(name)
self._field_transform[field] = field_transforms[name]
+ return self
@invalidate_plot
def set_cmap(self, field, cmap_name):
@@ -656,6 +671,7 @@
for field in self._field_check(fields):
self._colorbar_valid = False
self._colormaps[field] = cmap_name
+ return self
@invalidate_plot
def set_zlim(self, field, zmin, zmax, dynamic_range=None):
@@ -702,6 +718,7 @@
self.plots[field].zmin = myzmin
self.plots[field].zmax = myzmax
+ return self
def setup_callbacks(self):
for key in callback_registry:
@@ -922,10 +939,23 @@
cax)
axes_unit_labels = ['', '']
+ comoving = False
+ hinv = False
for i, un in enumerate((unit_x, unit_y)):
+ if un.endswith('cm') and un != 'cm':
+ comoving = True
+ un = un[:-2]
+ # no length units end in h so this is safe
+ if un.endswith('h'):
+ hinv = True
+ un = un[:-1]
if un in formatted_length_unit_names:
un = formatted_length_unit_names[un]
if un not in ['1', 'u', 'unitary']:
+ if hinv:
+ un = un + '\,h^{-1}'
+ if comoving:
+ un = un + '\,(1+z)^{-1}'
axes_unit_labels[i] = '\/\/('+un+')'
if self.oblique:
@@ -1035,7 +1065,7 @@
self._font_color = font_dict.pop('color')
self._font_properties = \
FontProperties(**font_dict)
-
+ return self
@invalidate_plot
def set_cmap(self, field, cmap):
@@ -1066,6 +1096,7 @@
if not is_colormap(cmap) and cmap is not None:
raise RuntimeError("Colormap '%s' does not exist!" % str(cmap))
self.plots[field].image.set_cmap(cmap)
+ return self
def save(self, name=None, mpl_kwargs=None):
"""saves the plot to disk.
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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