Conversation
|
@dopplerchase Thanks for the PR! The errors seem to be PEP8 fixes. |
|
|
||
|
|
||
| def composite_reflectivity(radar, field="reflectivity", gatefilter=None): | ||
| def composite_reflectivity(radar, field="reflectivity", gatefilter=None,same_nyquist=True,nyquist_vector_idx=0): |
There was a problem hiding this comment.
space between between the comment and same_
| During a volume scan (i.e., file) the PRF (nyqust velocity) can change. | ||
| This can create some odd artifacts at times with if data quality is low on certain scans. | ||
| To get around this, you can change the code to only take the max of scans with the same nyquist +/- 1 m/s. | ||
| Defult this will be on (True), but folks can turn this off. |
| This can create some odd artifacts at times with if data quality is low on certain scans. | ||
| To get around this, you can change the code to only take the max of scans with the same nyquist +/- 1 m/s. | ||
| Defult this will be on (True), but folks can turn this off. | ||
| nyquist_vector_idx: int |
pyart/retrieve/comp_z.py
Outdated
|
|
||
| # Apply the interpolation | ||
| z = z_interpolator(ranges, azimuth_final) | ||
| z = z_interpolator(azimuth_final,ranges) |
| # if first sweep, create new dim, otherwise concat them up | ||
| if sweep == minimum_sweep: | ||
| z_stack = copy.deepcopy(z[np.newaxis, :, :]) | ||
| nyquist_stack = copy.deepcopy(nyquist[np.newaxis,:]) |
pyart/retrieve/comp_z.py
Outdated
| elevation, | ||
| instrument_parameters=instrument_parameters, | ||
| ) | ||
| ) No newline at end of file |
|
@dopplerchase - is there anything we can do to help here? |
|
no worries 😄 that is a good point!! |
|
I'm glad to hear that someone has encountered a similar bug. When directly using the function |
|
@mgrover1 I'm seeing the testing fail due to the depreciation of interp2d, we might need to do a PR just with the depreciation change. I can work on that. |
Removed conflicting code related to z interpolator configuration and application.
Code for issue #1559, where composite reflectivity code carried artifacts through with poor quality radar data from velocity sweeps. I also made a change to the interpolator because it was flagged as depreciated (e.g., scipy.interpolate.interp2d).
This is now open for comment from the maintainers! Happy to make changes as needed.
Example usage:
compz = pyart.retrieve.composite_reflectivity(radar, field="reflectivity")The code is flexible, and allows you to still have the old functionality through the simple bool:
compz = pyart.retrieve.composite_reflectivity(radar, field="reflectivity",same_nyquist=False)