Exemple #1
0
def get_detectorlist(chosen_event):
    t0 = datasets.event_gps(chosen_event)
    detectorlist = list(datasets.event_detectors(chosen_event))
    detectorlist.sort()
    jsoninfo = fetch_event_json(chosen_event)

    return t0, detectorlist, jsoninfo
Exemple #2
0
def main():
    #init global constants
    global eventCatalog
    #gets a list of merger events that are part of the eventCatalog var
    events = catalog.events(eventCatalog)
    #making dic object where the event id points to a list of the detectors
    #that measured it
    events = {str(c): datasets.event_detectors(c) for c in events}
    with open('listOfMergerEvents.txt', 'a+') as doc:
        doc.write(eventCatalog + '\n')
        #for each merger event id
        for event in events:
            detectorString = ''
            #for each detector for each merger event
            for d in events[event]:
                detectorString += ' {}'.format(d)
            #removes the white space in the begining
            detectorString = detectorString[1:]

            doc.write('{} {}\n'.format(event, detectorString))
Exemple #3
0
    # -- Set a GPS time:
    str_t0 = st.sidebar.text_input('GPS Time', '1126259462.4')  # -- GW150914
    t0 = float(str_t0)

    st.sidebar.markdown("""
    Example times in the H1 detector:
    * 1126259462.4    (GW150914) 
    * 1187008882.4    (GW170817) 
    * 933200215       (hardware injection)
    * 1132401286.33   (Koi Fish Glitch) 
    """)

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

    st.write('### Event details for ', chosen_event)

    r1, r2, r3, r4 = st.beta_columns(4)
    with r1:
        st.write('GPS:', t0)

    # -- Experiment to display masses
    try:
        jsoninfo = fetch_event_json(chosen_event)
        for name, nameinfo in jsoninfo['events'].items():

            with r2:
                st.write('Mass 1:', nameinfo['mass_1_source'], 'M$_{\odot}$')