Esempio n. 1
0
def get_eventslist():
    # -- Get list of events
    # find_datasets(catalog='GWTC-1-confident',type='events')
    eventlist = datasets.find_datasets(type='events')
    eventlist = [name.split('-')[0] for name in eventlist if name[0:2] == 'GW']
    eventset = set([name for name in eventlist])
    eventlist = list(eventset)
    eventlist.sort()
    return eventlist
Esempio n. 2
0

@st.cache  #-- Magic command to cache data
def load_gw(t0, detector):
    strain = TimeSeries.fetch_open_data(detector,
                                        t0 - 14,
                                        t0 + 14,
                                        cache=False)
    return strain


st.sidebar.markdown("## Select Data Time and Detector")

# -- Get list of events
# find_datasets(catalog='GWTC-1-confident',type='events')
eventlist = datasets.find_datasets(type='events')
eventlist = [name.split('-')[0] for name in eventlist if name[0:2] == 'GW']
eventset = set([name for name in eventlist])
eventlist = list(eventset)
eventlist.sort()

#-- Set time by GPS or event
select_event = st.sidebar.selectbox('How do you want to find data?',
                                    ['By event name', 'By GPS'])

if select_event == 'By GPS':
    # -- Set a GPS time:
    str_t0 = st.sidebar.text_input('GPS Time', '1126259462.4')  # -- GW150914
    t0 = float(str_t0)

    st.sidebar.markdown("""
Esempio n. 3
0
    key0 = list(data.keys())[0]
    try:
        dataarray = data['Overall_posterior'][()]
        waveform = 'Overall_posterior'
    except:
        dataarray = data[key0][()]
        waveform = key0

    return dataarray, waveform


st.sidebar.markdown("## Select Data Time and Detector")

# -- Get list of events
# find_datasets(catalog='GWTC-1-confident',type='events')
eventlist = datasets.find_datasets(type='events', catalog='GWTC-1-confident')
eventlist = [name.split('-')[0] for name in eventlist if name[0:2] == 'GW']
eventset = set([name for name in eventlist])
eventlist = list(eventset)
eventlist.sort()

chosen_event = st.sidebar.selectbox('Select Event', eventlist)
t0 = datasets.event_gps(chosen_event)
detectorlist = list(datasets.event_detectors(chosen_event))
detectorlist.sort()

#-- Choose detector as H1, L1, or V1
detector = st.sidebar.selectbox('Detector', detectorlist)

# Create a text element and let the reader know the data is loading.
strain_load_state = st.text('Loading data...this may take a minute')