SuperDARN / pydarn

Python library for visualizing SuperDARN Data
GNU Lesser General Public License v3.0
31 stars 11 forks source link

Lots of little changes to customize Fan plots. #364

Closed RemingtonRohel closed 7 months ago

RemingtonRohel commented 8 months ago

Scope

issue: N/A

Approval

Number of approvals: 1

Test

matplotlib version: 3.7.2

Try making some fan plots. Test out the cax option, tolerance option when specifying scan_index by a datetime object, passing in an ax that is already a cartopy projection, and anything else you think is prudent.

RemingtonRohel commented 7 months ago

Huh that's weird, I basically just moved around the code that was already there. What is the value of scan_indices in find_records_by_scan() when you run the test?

carleyjmartin commented 7 months ago

scan_indices is a long list of zeros, matches then returns an empty list

test code:

import matplotlib.pyplot as plt
import pydarn
import datetime as dt

files = ['/Users/carley/Documents/data/20221220.2200.00.rkn.a.fitacf']
for file in files:
    SDarn_read = pydarn.SuperDARNRead(file)
    fitacf_data = SDarn_read.read_fitacf()

    pydarn.Fan.plot_fan(fitacf_data,
                              scan_index=dt.datetime(2022,12,20,22,2),
                              tolerance=dt.timedelta(seconds=120),
                              coastline=True, lowlat=70)

    plt.show()

    pydarn.Fan.plot_fan(fitacf_data, scan_index=1, coastline=True, lowlat=70)
    plt.show()

First one plots, second gets the above error for different scan index numbers and different data files with different cpids (and probs scan flag use).