Closed aburrell closed 4 years ago
Test!
import davitpy; import datetime as dt
stime = dt.datetime(2014, 1, 1); etime = dt.datetime(2014, 1, 1, 1)
rad = 'han'; hard = davitpy.pydarn.radar.site(code=rad, dt=stime)
file_type='fitacf'
rad_ptr = davitpy.pydarn.sdio.radDataRead.radDataOpen(stime, eTime=etime, radcode=rad, fileType=file_type)
bm = rad_ptr.readRec()
out = davitpy.pydarn.proc.fov.calc_elevation.calc_elv(bm, hard=hard)
hard.phidiff = -1
out_neg = davitpy.pydarn.proc.fov.calc_elevation.calc_elv(bm)
print out[0]
[ nan 17.62225948 14.08461472 14.13857093 nan 22.79720948
22.50723233 nan nan nan nan 28.97115884
25.81253934 nan 1.3868721 30.12459279 1.76833418 19.39947718
6.18414091 25.60871328 nan nan nan nan
nan]
print out_neg[0]
[ nan 27.70894511 29.71038192 29.68393623 nan 23.59279877
23.87010294 nan nan nan nan 15.50954806
20.26437913 nan 11.48070041 13.2058227 11.41097333 26.47591919
9.58083037 20.51899942 nan nan nan nan
nan]
Simon and I were talking about this yesterday and he doesn't actually have a definitive answer on how the phidiff
parameter should affect the elevation angle determination. It looks like that parameter was only ever set for a brief period at the Goose Bay radar (when there may not even be any available xcf data); the only other radar with a non-zero phidiff is South Pole but the PI has indicated that is a mistake in the hdw file. Sorry for causing the extra work on your end!
Well, it's good to have it just in case! I couldn't find any data with the flag set to -1, which was comforting (so nothing was processed wrong).
This pull request never got going here even though the work is certainly good to consider. Closing this now as this repo is being deprecated.
Fixed a bug in the elevation angle recalculation that didn’t check to see if the interferometer cables had been switched or not.
Found after consultation with @egthomas, who was working on an IDL implementation of Simon's elevation angle calculation.