How to crop the spectogram

Hello, I am wondering how the time and frequency bounds for the spectograms on the website are determined. I am attempting to programmatically center on the event and determine frequency and time bounds to show the just the event, but I am running into issues with bright noise causing my algorithm to include unnecessary parts of the data. Did you find the right bounds for each event’s spectogram individually, or do you have your own statistical method for determining the right bounding?

Hi @Jorianta Thank you for your question. Are you asking about the spectrograms in the Event Portal?

For those plots, the time bounds are set based on the estimated mass of the source. For the frequency range, we go from 20 Hz to 1024 Hz, which is the most sensitive band of the detectors.

          # -- Set parameters based on event type
          if bns:
              dt = 2
          else: 
              dt = 0.3

          # -- Make q-scan and save to disk
          print("MAKING Q-SCAN")
          try:
              hq = strain.q_transform(outseg=(gps-dt, gps+dt), qrange=qrange)
fig4 = hq.plot(vmin=0, vmax=25)
              ax = fig4.gca()
              fig4.colorbar(label="Normalised energy")
              ax.grid(False)
              ax.set_yscale('log')
              ax.set_ylim(ymin=20, ymax=1024)
1 Like

Yes, and the full tutorial is in GW workshop 7’s tutorial 1.3, might be there in newer versions but this is the one I had attended.
Here is the code from a saved code file I kept.

https://github.com/Shantanu909/Ligolearner909/blob/main/QT.ipynb