Skip to content

Commit 09366f7

Browse files
authored
Merge pull request #80 from tjlang/master
Updated for PyPI distribution
2 parents 6a36004 + 2bdee7c commit 09366f7

12 files changed

+56
-20
lines changed

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
include README.md
22
include LICENSE.txt
33
include CHANGELOG.md
4+
include pyproject.toml
5+
recursive-include csu_radartools *.py *.pyx *.c *.pxd
6+
recursive-include csu_radartools/beta_function_parameters *.csv
47
recursive-include notebooks *.ipynb
58
recursive-include tests *.py
9+
global-exclude __pycache__
10+
global-exclude *.py[co]
11+
global-exclude *~

csu_radartools/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
"""Version File."""
44

5-
VERSION_INFO = (1, 4, 0, 'dev0')
5+
VERSION_INFO = (1, 4, 0)
66
__version__ = '.'.join(map(str, VERSION_INFO))

csu_radartools/calc_kdp_ray_fir.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cython: boundscheck=False
22
# cython: language_level=2
33

4+
import cython
45
from libc.math cimport sqrt
56
cimport numpy as np
67
import numpy as np
@@ -190,5 +191,6 @@ def hid_beta_f(int ngates, float[:] x_arr, float a, float b, float m):
190191

191192
for i in range(ngates):
192193
beta[i] = 1.0 / (1.0 + (((x_arr[i] - m) / a)**2.0)**b)
194+
# beta[i] = 1.0 / (1.0 + np.power(np.power((x_arr[i] - m) / a, 2.0), b))
193195

194196
return beta

notebooks/CSU_RadarTools_Demo.ipynb

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
},
110110
{
111111
"cell_type": "code",
112-
"execution_count": 4,
112+
"execution_count": 3,
113113
"metadata": {},
114114
"outputs": [
115115
{
@@ -140,7 +140,7 @@
140140
},
141141
{
142142
"cell_type": "code",
143-
"execution_count": 5,
143+
"execution_count": 4,
144144
"metadata": {},
145145
"outputs": [],
146146
"source": [
@@ -159,7 +159,7 @@
159159
},
160160
{
161161
"cell_type": "code",
162-
"execution_count": 6,
162+
"execution_count": 5,
163163
"metadata": {},
164164
"outputs": [],
165165
"source": [
@@ -266,12 +266,23 @@
266266
},
267267
{
268268
"cell_type": "code",
269-
"execution_count": 13,
269+
"execution_count": 6,
270270
"metadata": {},
271-
"outputs": [],
271+
"outputs": [
272+
{
273+
"name": "stdout",
274+
"output_type": "stream",
275+
"text": [
276+
"0.8747849464416504 seconds\n"
277+
]
278+
}
279+
],
272280
"source": [
281+
"import time\n",
282+
"begin_time = time.time()\n",
273283
"fh = csu_fhc.csu_fhc_summer(dz=dz, zdr=dr, rho=rh, kdp=kd, use_temp=True, band='C',\n",
274-
" T=radar_T)"
284+
" T=radar_T)\n",
285+
"print(time.time() - begin_time, 'seconds')"
275286
]
276287
},
277288
{
@@ -297,7 +308,7 @@
297308
},
298309
{
299310
"cell_type": "code",
300-
"execution_count": 8,
311+
"execution_count": 7,
301312
"metadata": {},
302313
"outputs": [],
303314
"source": [
@@ -326,7 +337,7 @@
326337
},
327338
{
328339
"cell_type": "code",
329-
"execution_count": 17,
340+
"execution_count": 8,
330341
"metadata": {},
331342
"outputs": [],
332343
"source": [
@@ -342,7 +353,7 @@
342353
},
343354
{
344355
"cell_type": "code",
345-
"execution_count": 18,
356+
"execution_count": 9,
346357
"metadata": {},
347358
"outputs": [],
348359
"source": [
@@ -375,7 +386,7 @@
375386
},
376387
{
377388
"cell_type": "code",
378-
"execution_count": 19,
389+
"execution_count": 10,
379390
"metadata": {},
380391
"outputs": [
381392
{
@@ -2237,7 +2248,7 @@
22372248
"name": "python",
22382249
"nbconvert_exporter": "python",
22392250
"pygments_lexer": "ipython3",
2240-
"version": "3.12.3"
2251+
"version": "3.12.10"
22412252
}
22422253
},
22432254
"nbformat": 4,
0 Bytes
Binary file not shown.
16.4 KB
Binary file not shown.
-146 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
7.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)