Browse Source

Station.station changed to Station.name. Replaced along the full code.

master
Benito Marcote 3 years ago
parent
commit
894cad8a22
  1. 6
      main.py
  2. 2
      sources.py
  3. 2
      stations.py

6
main.py

@ -105,7 +105,7 @@ def update_data(attrname, old, new):
vs = np.zeros_like(ys) + counter*u.deg
condition = np.where(ys >= elevation_limit.value*u.deg)
data[a_station].data = dict(x=times_obs.datetime[condition], y=ys[condition],
v=vs[condition], station=[all_stations[a_station].station]*len(ys[condition]),
v=vs[condition], station=[all_stations[a_station].name]*len(ys[condition]),
code=[all_stations[a_station].code]*len(ys[condition]))
# Remove stations that are not anymore in the selected_stations
@ -137,10 +137,10 @@ for a_station in selected_all_stations:
vs = np.zeros_like(ys) + counter*u.deg
condition = np.where(ys >= elevation_limit.value*u.deg)
data[a_station] = ColumnDataSource(data=dict(x=times_obs.datetime[condition], y=ys[condition],
v=vs[condition], station=[all_stations[a_station].station]*len(ys[condition]),
v=vs[condition], station=[all_stations[a_station].name]*len(ys[condition]),
code=[all_stations[a_station].code]*len(ys[condition])))
# data[a_station] = ColumnDataSource(data=dict(x=times_obs.datetime, y=ys, #v=vs,
# station=[all_stations[a_station].station]*len(ys)))
# station=[all_stations[a_station].name]*len(ys)))
counter -= 1

2
sources.py

@ -49,7 +49,7 @@ class Source:
ax.set_xlabel("Time")
for station in stations:
els = station.source_elevation(self.coord, obsTimes).deg
ax.plot(obsTimes.datetime, els, label=station.station)
ax.plot(obsTimes.datetime, els, label=station.name)
plt.legend()
plt.show()

2
stations.py

@ -23,7 +23,7 @@ class Station:
in cm. The values will be given in Jy. If a wavelngth is given, a correct
SEFD is assumed (i.e. no empty or n/a values are expected to be found).
"""
self.station = name
self.name = name
self.code = codename
self.location = location
self.sefd = sefds

Loading…
Cancel
Save