Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing get_azimuth method in obj created from xradar #170

Closed
seoc16 opened this issue Mar 29, 2024 · 4 comments
Closed

missing get_azimuth method in obj created from xradar #170

seoc16 opened this issue Mar 29, 2024 · 4 comments
Assignees

Comments

@seoc16
Copy link

seoc16 commented Mar 29, 2024

  • xradar version: 0.4.3
  • Python version: 3.12.2
  • Operating System: linux

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
i am loading data through xradar using

radar = pyart.xradar.Xradar(tree1,  default_sweep='sweep_0')

I am able to use the gridding function in pyart, but then i am trying to use the find objects method and i get the following error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[123], line 2
      1 #attempt at tracking obj
----> 2 objDisplay = pyart.correct.find_objects(radar, "DBZH", 15,sweeps=0)

File ~/miniconda3/envs/radar/lib/python3.12/site-packages/arm_pyart-1.18.0.post5-py3.12-linux-x86_64.egg/pyart/correct/despeckle.py:70, in find_objects(radar, field, threshold, sweeps, smooth, gatefilter, delta)
     68 for iswp in sweeps:
     69     data = _get_data(radar, iswp, field, tlo, thi, smooth, gatefilter=gatefilter)
---> 70     az = radar.get_azimuth(iswp, copy=False)
     71     if _check_for_360(az, delta):
     72         # If 360 or close, account for the periodic boundary
     73         labels, nobj = _adjust_for_periodic_boundary(data)

AttributeError: 'Xradar' object has no attribute 'get_azimuth'

are there missing methods in the radar object?

What I Did

objDisplay = pyart.correct.find_objects(radar, "DBZH", 15,sweeps=0)
@zssherman
Copy link

@seoc16 I believe the despeckling algo in Py-ART is not yet able to use an xradar object. The call get_azimuth being used in the find_objects code above is found in a Py-ART radar class object. @mgrover1 Can correct me if I'm wrong, or if there is a status on that capability.

@mgrover1
Copy link
Collaborator

mgrover1 commented Apr 1, 2024

Thanks for raising this issue - this is a bug within the Py-ART/xradar bridge currently.

@mgrover1
Copy link
Collaborator

mgrover1 commented Apr 1, 2024

@seoc16 - please see ARM-DOE/pyart#1535 for more discussion about resolving this issue 👍

@kmuehlbauer
Copy link
Collaborator

Should be resolved by updating pyart to latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants