mailr10952 - /1.3/generic_fns/structure/cones.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 09, 2010 - 11:44:
Author: bugman
Date: Tue Mar  9 11:44:48 2010
New Revision: 10952

URL: http://svn.gna.org/viewcvs/relax?rev=10952&view=rev
Log:
Added a new module for holding class objects defining different cone types.

This currently contains the Iso_cone class with the simple method phi_max() 
to return the cone edge.


Added:
    1.3/generic_fns/structure/cones.py

Added: 1.3/generic_fns/structure/cones.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/cones.py?rev=10952&view=auto
==============================================================================
--- 1.3/generic_fns/structure/cones.py (added)
+++ 1.3/generic_fns/structure/cones.py Tue Mar  9 11:44:48 2010
@@ -1,0 +1,51 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2010 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax 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 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax 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 relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Module containing all the different cone type classes."""
+
+
+class Iso_cone:
+    """The class for the isotropic cone."""
+
+    def __init__(self, angle):
+        """Set up the cone object.
+
+        @param angle:   The cone angle.
+        @type angle:    float
+        """
+
+        # Store the cone angle.
+        self._angle = angle
+
+
+    def phi_max(self, theta):
+        """Return the maximum polar angle phi for the given azimuthal angle 
theta.
+
+        @param theta:   The azimuthal angle.
+        @type theta:    float
+        @return:        The maximum polar angle phi for the value of theta.
+        @rtype:         float
+        """
+
+        # The polar angle is fixed!
+        return self._angle




Related Messages


Powered by MHonArc, Updated Tue Mar 09 12:00:02 2010