rwlenspy 1.1.1__tar.gz → 1.1.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/PKG-INFO +1 -1
- rwlenspy-1.1.2/examples/mess_test.py +4 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/pyproject.toml +1 -1
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/lensing.pyx +31 -19
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/setup.py +1 -1
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/LICENSE +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/README.md +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/build.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/examples/example_animate_multilens.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/examples/example_animate_singlelens.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/examples/example_transfer_multilens.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/examples/example_transfer_singlelens.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/__init__.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/lensing.pxd +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/rwlens.cpp +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/rwlens.h +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/rwlenspy/utils.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/tests/__init__.py +0 -0
- {rwlenspy-1.1.1 → rwlenspy-1.1.2}/tests/test_rwlens.py +0 -0
@@ -27,7 +27,8 @@ cpdef vector[complex] RunUnitlessTransferFunc(
|
|
27
27
|
double geom_const,
|
28
28
|
double lens_const,
|
29
29
|
double freq_power,
|
30
|
-
bint nyqzone_aliased
|
30
|
+
bint nyqzone_aliased,
|
31
|
+
bint verbose = True
|
31
32
|
):
|
32
33
|
"""Get the propagation transfer function for a single lens.
|
33
34
|
|
@@ -88,11 +89,12 @@ cpdef vector[complex] RunUnitlessTransferFunc(
|
|
88
89
|
for freq_ii in prange(freq_N):
|
89
90
|
freq_val = freq_arr[freq_ii]
|
90
91
|
|
91
|
-
tfunc[freq_ii] = GetTransferFuncVal( theta_step, theta_N, theta_min
|
92
|
+
tfunc[freq_ii] = GetTransferFuncVal( theta_step, theta_N, theta_min,
|
92
93
|
freq_val, freq_ref, freq_power, lens_arr, grad_lens_arr,\
|
93
94
|
hess_lens_arr, geom_const, lens_const, \
|
94
95
|
beta_vec, nyqzone_aliased)
|
95
|
-
|
96
|
+
if verbose == True:
|
97
|
+
report(freq_mod,freq_N)
|
96
98
|
destroy() # release lock
|
97
99
|
|
98
100
|
return tfunc
|
@@ -112,9 +114,10 @@ cpdef vector[complex] RunPlasmaGravTransferFunc(
|
|
112
114
|
double freq_power,
|
113
115
|
double eins,
|
114
116
|
double beta_E_x,
|
115
|
-
double beta_E_y,
|
117
|
+
double beta_E_y,
|
116
118
|
double mass,
|
117
|
-
bint nyqzone_aliased
|
119
|
+
bint nyqzone_aliased,
|
120
|
+
bint verbose = True
|
118
121
|
):
|
119
122
|
"""Get the propagation transfer function through two lenses (any + grav).
|
120
123
|
|
@@ -190,7 +193,8 @@ cpdef vector[complex] RunPlasmaGravTransferFunc(
|
|
190
193
|
freq_ref, freq_power, lens_arr, grad_lens_arr,\
|
191
194
|
hess_lens_arr, geom_const, lens_const, mass,\
|
192
195
|
beta_E_vec, beta_vec, lens_scaling, nyqzone_aliased)
|
193
|
-
|
196
|
+
if verbose == True:
|
197
|
+
report(freq_mod,freq_N)
|
194
198
|
destroy() # release lock
|
195
199
|
return tfunc
|
196
200
|
|
@@ -214,7 +218,8 @@ cpdef vector[complex] RunMultiplaneTransferFunc(
|
|
214
218
|
double geom_const_2,
|
215
219
|
double lens_const_2,
|
216
220
|
double freq_power_2,
|
217
|
-
bint nyqzone_aliased
|
221
|
+
bint nyqzone_aliased,
|
222
|
+
bint verbose = True
|
218
223
|
):
|
219
224
|
"""Get the propagation transfer function through two lenses (any + any).
|
220
225
|
|
@@ -301,8 +306,8 @@ cpdef vector[complex] RunMultiplaneTransferFunc(
|
|
301
306
|
hess_lens_arr_1, geom_const_1, lens_const_1, freq_power_2,\
|
302
307
|
lens_arr_2, grad_lens_arr_2, hess_lens_arr_2, geom_const_2,\
|
303
308
|
lens_const_2, lens_scaling, beta_1_vec, beta_2_vec, nyqzone_aliased)
|
304
|
-
|
305
|
-
|
309
|
+
if verbose == True:
|
310
|
+
report(freq_mod,freq_N)
|
306
311
|
destroy() # release lock
|
307
312
|
return tfunc
|
308
313
|
|
@@ -311,7 +316,8 @@ cpdef vector[complex] RunGravTransferFunc(
|
|
311
316
|
double beta_x,
|
312
317
|
double beta_y,
|
313
318
|
double mass,
|
314
|
-
bint nyqzone_aliased
|
319
|
+
bint nyqzone_aliased,
|
320
|
+
bint verbose = True
|
315
321
|
):
|
316
322
|
"""Get the propagation transfer function through a gravitational lens.
|
317
323
|
|
@@ -359,8 +365,8 @@ cpdef vector[complex] RunGravTransferFunc(
|
|
359
365
|
freq_val = freq_arr[freq_ii]
|
360
366
|
|
361
367
|
tfunc[freq_ii] = GetPMGravTransferFuncVal( freq_val, mass, beta_vec, nyqzone_aliased)
|
362
|
-
|
363
|
-
|
368
|
+
if verbose == True:
|
369
|
+
report(freq_mod,freq_N)
|
364
370
|
destroy() # release lock
|
365
371
|
|
366
372
|
return tfunc
|
@@ -374,14 +380,15 @@ cpdef vector[complex] RunGravTransferFunc(
|
|
374
380
|
cpdef GetUnitlessFreqStationaryPoints( double theta_min,
|
375
381
|
double theta_max,
|
376
382
|
int theta_N,
|
377
|
-
vector[double] lens_arr,
|
383
|
+
vector[double] lens_arr,
|
378
384
|
vector[double] freq_arr,
|
379
385
|
double beta_x,
|
380
386
|
double beta_y,
|
381
387
|
double geom_const,
|
382
388
|
double lens_const,
|
383
389
|
double freq_power,
|
384
|
-
size_t max_membytes
|
390
|
+
size_t max_membytes,
|
391
|
+
bint verbose = True
|
385
392
|
):
|
386
393
|
"""Get all observables after propagation through a lens.
|
387
394
|
|
@@ -449,7 +456,8 @@ cpdef GetUnitlessFreqStationaryPoints( double theta_min,
|
|
449
456
|
hess_lens_arr, geom_const, lens_const, beta_vec, freqpnts[freq_ii])
|
450
457
|
|
451
458
|
vsize = sizeof(imagepoint) * freqpnts[freq_ii].capacity() + sizeof(freqpnts[freq_ii])
|
452
|
-
|
459
|
+
if verbose == True:
|
460
|
+
report_withsize(freq_mod,freq_N,vsize,max_membytes)
|
453
461
|
destroy() # release lock
|
454
462
|
|
455
463
|
if check_mem():
|
@@ -482,7 +490,8 @@ cpdef GetMultiplaneFreqStationaryPoints( double theta_min,
|
|
482
490
|
double geom_const_2,
|
483
491
|
double lens_const_2,
|
484
492
|
double freq_power_2,
|
485
|
-
size_t max_membytes
|
493
|
+
size_t max_membytes,
|
494
|
+
bint verbose = True
|
486
495
|
):
|
487
496
|
"""Get all observables after two lens propagation (any + any).
|
488
497
|
|
@@ -577,7 +586,8 @@ cpdef GetMultiplaneFreqStationaryPoints( double theta_min,
|
|
577
586
|
geom_const_2, lens_const_2, beta_2_vec, freqpnts[freq_ii])
|
578
587
|
|
579
588
|
vsize = sizeof(imagepoint) * freqpnts[freq_ii].capacity() + sizeof(freqpnts[freq_ii])
|
580
|
-
|
589
|
+
if verbose == True:
|
590
|
+
report_withsize(freq_mod,freq_N,vsize,max_membytes)
|
581
591
|
destroy() # release lock
|
582
592
|
|
583
593
|
if check_mem():
|
@@ -608,7 +618,8 @@ cpdef GetPlaneToPMGravFreqStationaryPoints( double theta_min,
|
|
608
618
|
double lens_scale_2,
|
609
619
|
double beta_2_x,
|
610
620
|
double beta_2_y,
|
611
|
-
size_t max_membytes
|
621
|
+
size_t max_membytes,
|
622
|
+
bint verbose = True
|
612
623
|
):
|
613
624
|
"""Get all observables after two lens propagation (any + grav).
|
614
625
|
|
@@ -702,7 +713,8 @@ cpdef GetPlaneToPMGravFreqStationaryPoints( double theta_min,
|
|
702
713
|
freqpnts[freq_ii])
|
703
714
|
|
704
715
|
vsize = sizeof(imagepoint) * freqpnts[freq_ii].capacity() + sizeof(freqpnts[freq_ii])
|
705
|
-
|
716
|
+
if verbose == True:
|
717
|
+
report_withsize(freq_mod,freq_N,vsize,max_membytes)
|
706
718
|
destroy() # release lock
|
707
719
|
|
708
720
|
if check_mem():
|
@@ -17,7 +17,7 @@ install_requires = \
|
|
17
17
|
|
18
18
|
setup_kwargs = {
|
19
19
|
'name': 'rwlenspy',
|
20
|
-
'version': '1.1.
|
20
|
+
'version': '1.1.2',
|
21
21
|
'description': 'Lensing simulation from Fermat Potenials',
|
22
22
|
'long_description': '# RWLensPy\n\nThis is a python package that generates observed morphologies and propagation transfer functions for radio wave propgation recorded by a radio telescope.\n\nThe code can be installed with:\n\n`pip install rwlenspy`\n\n## Examples\n\nFor examples see `examples/`. The image ray trace is shown in the `example_animate_*.py` files and how to get the coherent transfer function for a baseband simulation is shown in `example_transfer*.py`.\n\n<img src="./examples/plots/singelens_spatial_freqslice.gif" width=42%> <img src="./examples/plots/singlelens_baseband_spatial_arrival.gif" width=42%>\n\n## Custom/Dev Install\n\nThe package is built with Poetry and Cython using C++11 and OpenMP. This requires having a compiler like `gcc` if one is editing the code. If one requires a dev install, this can be done with:\n\n`poetry install --with test,dev`\n\n`poetry run python`\n\nOnce installed, tests can be run with:\n\n`poetry run pytest`\n',
|
23
23
|
'author': 'Zarif Kader',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|