rfcBand = 's' elif args.band in ['c', 'm']: rfcBand = 'c' elif args.band == 'x': rfcBand = 'x' elif args.band == 'u': rfcBand = 'u' elif args.band in ['k', 'q']: rfcBand = 'k' else: #not a known band? print("Error band {} is unknown.".format(args.band)) sys.exit(2) #load station information for all stations. stationList = Station.stations_from_file('./station_location.txt') stations = [stationList[station.upper()] for station in args.stations] obsTimes = get_obs_times(get_time(args.timeStart), args.duration) sourceCat = load_rfc_cat("./rfc_2018c_cat.txt", rfcBand, args.min_flux) sources = get_up_sources(stations, sourceCat, obsTimes, minEl=args.min_el, minFluxBand=rfcBand) #ask which source to plot while True: print() print_sources(sources)
duration = Slider(title="Duration of the observation (hours)", value=8.0, start=1.0, end=30.0, step=0.25) elevation_limit = Slider(title="Lowest elevation (degrees)", value=10.0, start=0.0, end=50.0, step=5.0) # Add checkboxes: include Ar, include eMERLIN, include VLBA, include LBA. outstations = CheckboxGroup(labels=["eMERLIN", "VLBA", "LBA", "KVN"], active=[]) # Reading all stations all_stations = Station.stations_from_file( path.dirname(__file__) + '/station_location.txt') # Default parameters source_coord = coord.SkyCoord('00h00m00s +00d00m00s') times_obs = get_obs_times(get_time('01/01/2018 00:00'), duration.value) selected_stations = copy.deepcopy(stations[type_array.value]) selected_all_stations = stations['EVN'] + stations['eMERLIN'] + stations['VLBA'] + stations['LBA']\ + stations['KVN'] # Set up callbacks def update_data(attrname, old, new): # get tge current slider values # print(outstations.active) # print(stations[type_array.value]) selected_stations = copy.deepcopy(stations[type_array.value])
elif args.band in ['c','m']: rfcBand = 'c' elif args.band == 'x': rfcBand = 'x' elif args.band == 'u': rfcBand = 'u' elif args.band in ['k','q']: rfcBand = 'k' else: #not a known band? print("Error band {} is unknown.".format(args.band)) sys.exit(2) #load station information for all stations. stationList = Station.stations_from_file(directory+'/station_location.txt') stations = [stationList[station.upper()] for station in args.stations] obsTimes = get_obs_times(get_time(args.timeStart), args.duration) sourceCat = load_rfc_cat(directory+"/rfc_2021c_cat.txt", rfcBand, args.min_flux) sources = get_up_sources(stations, sourceCat, obsTimes, minEl=args.min_el, minFluxBand=rfcBand) #ask which source to plot while True: print() print_sources(sources) srcIndex = input("Please select the source to plot (0-9, q to quit): ") if srcIndex == 'q': break try: srcIndex = int(srcIndex)