Comments (13)
Looking at the code I don't see why it would be ignored. radar.Ai
calls scatter.ext_xsect
which does behave differently (uses a different element of the matrix S
) based on h_pol
. Could you post a working example of that replicates the problem?
from pytmatrix.
diam_min = 0.1
diam_max = 7.
step = 0.1
diam = np.arange(diam_min, diam_max+step, step)
num_points = diam.size
canting_angle = 10.
geom_back = (90.0, 90.0, 0.0, 180.0, 0.0, 0.0)
geom_forw = (90.0, 90.0, 0.0, 0.0, 0.0, 0.0)
wavelength = tmatrix_aux.wl_C
m = refractive.m_w_20C[wavelength]
scatterer = Scatterer(wavelength=wavelength, m=m)
scatterer.orient = orientation.orient_averaged_fixed
scatterer.or_pdf = orientation.gaussian_pdf(canting_angle)
scatterer.psd_integrator = PSDIntegrator()
scatterer.psd_integrator.axis_ratio_func = (lambda diam: 1.0/tmatrix_aux.dsr_thurai_2007(diam))
scatterer.psd_integrator.D_max = diam_max
scatterer.psd_integrator.num_points = num_points
scatterer.psd_integrator.geometries = (geom_back, geom_forw)
scatterer.psd_integrator.init_scatter_table(scatterer, angular_integration=True, verbose=True)
psd = GammaPSD(D0=3, Nw=10e3, mu=0, D_max=diam_max)
scatterer.psd = psd
scatterer.set_geometry(geom_forw)
Ah = radar.Ai(scatterer)
Av = radar.Ai(scatterer, False)
from pytmatrix.
radar.Ai(scatterer, h_pol=True) calls scatter.ext_xsect(scatterer, h_pol=h_pol)
If the PSD integrator is not None ext_xsect returns:
scatterer.psd_integrator.get_angular_integrated(
scatterer.psd, scatterer.get_geometry(), "sca_xsect")
but in this call the information of which polarization you want is lost. By default you get the horizontal polarization regardless of the intended polarization.
Am I right or I am missing something?
from pytmatrix.
Looks like there's indeed a bug. I'm working on a fix.
from pytmatrix.
Thanks a lot!
from pytmatrix.
Hi @jfigui, could you check if it works for you with the latest commit?
from pytmatrix.
Hi @jleinonen ,
It works for me now. See the output:
Could you make a new release soon? I work with the pypi package usually
from pytmatrix.
I don't manage the conda package (someone created it without my knowledge) so I have little control over it. As I understand it gets updated when I create a new release.
from pytmatrix.
I think if you create a new Pypi package you should get a new conda package at some point. At least this is how it works for us using conda-forge
from pytmatrix.
Thanks for being so reactive. Let me know when the new release is ready
from pytmatrix.
Version 0.3.3 is now on PyPI. The conda package should eventually update automatically, as mentioned.
from pytmatrix.
Great!
Thanks a lot for being so reactive. For info I am using pytmatrix in a software package to compute the scattering properties of different hydrometeors. The code is now public and you can find it here: https://github.com/openradar/hydroscatt
I would be grateful if you have a look and report any bug.
from pytmatrix.
Related Issues (20)
- vertical incidence HOT 1
- Conda packages seem to be out of date HOT 2
- Calculate Nw HOT 1
- License mismatch HOT 2
- How to get VSF with an incident radiant of none polarization
- Error in drop shape relationship function HOT 1
- Is there something wrong with this code? HOT 4
- The unit of the scattering amplitude the code defines is 'km' ?
- How to calculate snow particles'reflectivity?
- Can the psd funtion be added in the psd.py?
- How to get RCS of single particle?
- Roundoff error during test_adaptive_orient HOT 2
- How large size parameters can this code calculate? HOT 2
- What is the limitation of this code? HOT 1
- When calculating the reflectance factor in the WRF scene by PSD
- numpy issue with python >= 3.12 HOT 14
- scatterer.psd_integrator.geometries = (geom_back, geom_forw) HOT 1
- I cant get the gfortran installed in my Jypyter Lab
- The example is working but my code with different parameters isn't working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytmatrix.