diff --git a/LICENSE b/LICENSE index 9da73b7..8b9e4fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 Jussi Leinonen +Copyright (c) 2013-2015 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/MANIFEST b/MANIFEST index 21cd03c..d0d28a5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,5 +1,6 @@ # file GENERATED by distutils, do NOT edit README +setup.cfg setup.py pytmatrix/__init__.py pytmatrix/ice_refr.dat diff --git a/pytmatrix/orientation.py b/pytmatrix/orientation.py index 7930536..13e56ed 100644 --- a/pytmatrix/orientation.py +++ b/pytmatrix/orientation.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pytmatrix/psd.py b/pytmatrix/psd.py index bce3bbb..5ab9262 100644 --- a/pytmatrix/psd.py +++ b/pytmatrix/psd.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -176,10 +177,10 @@ def __call__(self, D): d = (D/self.D0) psd = self.nf * np.exp(self.mu*np.log(d)-(3.67+self.mu)*d) if np.shape(D) == (): - if D > self.D_max: + if (D > self.D_max) or (D==0.0): return 0.0 else: - psd[D > self.D_max] = 0.0 + psd[(D > self.D_max) | (D==0.0)] = 0.0 return psd def __eq__(self, other): diff --git a/pytmatrix/quadrature/quadrature.py b/pytmatrix/quadrature/quadrature.py index 24b2a56..e14188b 100644 --- a/pytmatrix/quadrature/quadrature.py +++ b/pytmatrix/quadrature/quadrature.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pytmatrix/radar.py b/pytmatrix/radar.py index 7723553..b6f64f6 100644 --- a/pytmatrix/radar.py +++ b/pytmatrix/radar.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pytmatrix/refractive.py b/pytmatrix/refractive.py index 31f9554..3034f81 100644 --- a/pytmatrix/refractive.py +++ b/pytmatrix/refractive.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pytmatrix/scatter.py b/pytmatrix/scatter.py index 71cc56b..945ddb5 100644 --- a/pytmatrix/scatter.py +++ b/pytmatrix/scatter.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pytmatrix/tmatrix.py b/pytmatrix/tmatrix.py index 9b56536..09ac925 100644 --- a/pytmatrix/tmatrix.py +++ b/pytmatrix/tmatrix.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -48,15 +49,20 @@ class Scatterer(object): Attributes: radius: Equivalent radius. - radius_type: If rat==Scatterer.RADIUS_EQUAL_VOLUME (default), radius - is the equivalent volume radius. - If rat==Scatterer.RADIUS_MAXIMUM, radius is the maximum radius. - Otherwise, radius is the equivalent area radius. + radius_type: If radius_type==Scatterer.RADIUS_EQUAL_VOLUME (default), + radius is the equivalent volume radius. + If radius_type==Scatterer.RADIUS_MAXIMUM, radius is the maximum + radius. + If radius_type==Scatterer.RADIUS_EQUAL_AREA, + radius is the equivalent area radius. wavelength: The wavelength of incident light (same units as axi). m: The complex refractive index. axis_ratio: The horizontal-to-rotational axis ratio. - shape: Particle shape. -1: spheroids; -2: cylinders; - n > 0: nth degree Chebyshev particles (not fully supported). + shape: Particle shape. + Scatterer.SHAPE_SPHEROID: spheroid + Scatterer.SHAPE_CYLINDER: cylinders; + Scatterer.SHAPE_CHEBYSHEV: Chebyshev particles (not yet + supported). alpha, beta: The Euler angles of the particle orientation (degrees). thet0, thet: The zenith angles of incident and scattered radiation (degrees). @@ -79,16 +85,18 @@ class Scatterer(object): effect if psd_integrator is None. """ - _attr_list = set(["radius", "radius_type", "wavelength", "m", "axis_ratio", - "shape", "np", "ddelt", "ndgs", "alpha", "beta", "thet0", "thet", - "phi0", "phi", "Kw_sqr", "orient", "or_pdf", "n_alpha", "n_beta", - "psd_integrator", "psd"]) + _attr_list = set(["radius", "radius_type", "wavelength", "m", + "axis_ratio", "shape", "np", "ddelt", "ndgs", "alpha", + "beta", "thet0", "thet", "phi0", "phi", "Kw_sqr", "orient", + "scatter", "or_pdf", "n_alpha", "n_beta", "psd_integrator", + "psd"]) _deprecated_aliases = {"axi": "radius", "lam": "wavelength", "eps": "axis_ratio", "rat": "radius_type", - "np": "shape" + "np": "shape", + "scatter": "orient" } RADIUS_EQUAL_VOLUME = 1.0 diff --git a/pytmatrix/tmatrix_aux.py b/pytmatrix/tmatrix_aux.py index e877608..01a3888 100644 --- a/pytmatrix/tmatrix_aux.py +++ b/pytmatrix/tmatrix_aux.py @@ -1,5 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -20,7 +21,7 @@ """ #current version -VERSION = "0.2.1" +VERSION = "0.3.0" #typical wavelengths [mm] at different bands wl_S = 111.0 diff --git a/pytmatrix/tmatrix_psd.py b/pytmatrix/tmatrix_psd.py index e87e270..a53e803 100644 --- a/pytmatrix/tmatrix_psd.py +++ b/pytmatrix/tmatrix_psd.py @@ -1,6 +1,6 @@ """ -Copyright (C) 2009-2013 Jussi Leinonen - +Copyright (C) 2009-2013 Jussi LeinonenCopyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index 019f4b8..2e967aa 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- """ -Copyright (C) 2009-2013 Jussi Leinonen +Copyright (C) 2009-2015 Jussi Leinonen, Finnish Meteorological Institute, +California Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -33,14 +34,14 @@ def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('pytmatrix', parent_package, top_path, - version = '0.2.1', + version = '0.3.0', author = "Jussi Leinonen", author_email = "jsleinonen@gmail.com", description = "T-matrix scattering computations", license = "MIT", url = 'https://github.com/jleinonen/pytmatrix', download_url = \ - 'https://github.com/jleinonen/pytmatrix/releases/download/0.2.1/pytmatrix-0.2.1.zip', + 'https://github.com/jleinonen/pytmatrix/releases/download/0.3.0/pytmatrix-0.3.0.zip', long_description = long_description, classifiers = [ "Development Status :: 4 - Beta",