Problems with Beginning the Data Challenge

Hey, I’ve been trying to work through the data challenge but I can’t get beyond the point where I’ve downloaded the data into a notebook. In the tutorials throughout the workshop, almost everything was done in reference to a GPS time that was given by a specific event. In the data challenge, I don’t believe the GWF file has any sort of time (or I just haven’t been able to figure out how to get it). How do I get from the point where I’ve downloaded the data onto my notebook as a GWF file to where I’m able to begin working through the first steps? I think this block has something to do with the lack of my coding knowledge at the moment so I may not be understanding the nature of the GWF file that’s given or may not know of any sort of conversion method (if this even makes sense).

1 Like

@AndrewValentini Great question!

There are hints at the bottom of the Data Challenge

! pip install -q lalsuite
! pip install -q gwpy
! pip install -q pycbc
# -- Click "restart runtime" in the runtime menu

# -- download data
! wget https://www.gw-openscience.org/s/workshop3/challenge/challenge3.gwf

# -- for gwpy 
from gwpy.timeseries import TimeSeries
gwpy_strain = TimeSeries.read('challenge3.gwf', channel="H1:CHALLENGE3")

# -- for pycbc
from pycbc import frame
pycbc_strain = frame.read_frame('challenge3.gwf', 'H1:CHALLENGE3')

Alright. Thank you! I didn’t code in the second “frame.read_frame” part so that must have been where my error was. Is it possible to convert these events to the GPS domain? I feel like the majority of the software uses GPS throughout. Or can I work around this?

@AndrewValentini I’m sorry, I don’t understand the question about “GPS domain”. These files already have a time vector, which is in units of seconds. No conversion should be needed.

For example, I’m looking at the spectrographs. In the tutorials, we were given a GPS time and could then select a certain range of values from it to limit our spectrograph: outseg=(gps-3,gps+0.5) and ax.set_epoch(gps). How would I write the code with the file we’re given by the challenge so that I can use these same methods without using GPS? Do I have to declare a start and end time?

Well … you could leave out the start and end time, and I think the spectrograph will plot the whole time interval by default. You could also plot the time series, and then read off the start and end times from the x-axis.

Hey Andrew I don’t know if you solved this but I had the same problem as you. If anyone else is having problems with this check Tutorial 2.2.

1 Like

when I am trying to plot the spectrogram or qtransform, it is showing that the module ‘matplotlib.pyplot’ has no attribute ‘FigureManagerBase’. Can anybody please help me with this?

1 Like

@AndrewValentini For challenge 1, you can focus near a GPS time of 0.

2 Likes

@Rishav For more more detailed help, you’d need to post some details of what code you are using. Also, be sure to check that you are using the recommended software versions.

I posted some hints on how to plot q_transforms.

Thanks. I ended up working around the problem.