Skip to content

Commit

Permalink
Release 0.3.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jleinonen committed Apr 7, 2015
1 parent cf098f3 commit 95b6b0c
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 28 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# file GENERATED by distutils, do NOT edit
README
setup.cfg
setup.py
pytmatrix/__init__.py
pytmatrix/ice_refr.dat
Expand Down
3 changes: 2 additions & 1 deletion pytmatrix/orientation.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions pytmatrix/psd.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion pytmatrix/quadrature/quadrature.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion pytmatrix/radar.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion pytmatrix/refractive.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion pytmatrix/scatter.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 20 additions & 12 deletions pytmatrix/tmatrix.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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).
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pytmatrix/tmatrix_aux.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,7 +21,7 @@
"""

#current version
VERSION = "0.2.1"
VERSION = "0.3.0"

#typical wavelengths [mm] at different bands
wl_S = 111.0
Expand Down
4 changes: 2 additions & 2 deletions pytmatrix/tmatrix_psd.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 95b6b0c

Please sign in to comment.