# Cyclic\_time\_shift

**URL:** <https://ask.igwn.org/t/cyclic-time-shift/1009>\
**Category:** Uncategorized\
**Created:** [April 19, 2024, 9:17am UTC](https://ask.igwn.org/t/cyclic-time-shift/1009 "2024-04-19T09:17:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rao](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@Rao](https://ask.igwn.org/u/Rao)\
**Post date:** [April 19, 2024, 9:17am UTC](https://ask.igwn.org/t/cyclic-time-shift/1009/1 "2024-04-19T09:17:57Z")

</div>

Hi all,

We are using `cyclic_time_shift` function in the tutorial 2.2 for shifting the wave-form(template). what is the science behind it how it calculate the approximate merger location, for calculating the SNR shifting is needed? i’m a bit confused about it anyone help me to understand it properly.

---

<div class="post-metadata">

**Author:** ![Agata](https://yyz1.discourse-cdn.com/flex031/user_avatar/ask.igwn.org/agata/32/77_2.png) [@Agata](https://ask.igwn.org/u/Agata)\
**Post date:** [April 19, 2024, 12:38pm UTC](https://ask.igwn.org/t/cyclic-time-shift/1009/2 "2024-04-19T12:38:58Z")

</div>

Hi @Rao , the use of `cyclic_time_shift` is required because of the way in which the `matched_filter` works. Using the `cyclic_time_shift` you ensure that the merger is at the beginning of your template so that the peak on the `snr` plot is at the time of the merger. If you don’t do the cyclic shift, the code will tell you that there is a match between tha data and the template at the starting of the template so about 1 s before the merger time.

A way to help the intuition is to calculate the snr both with `hp` and with `tempate` (i.e. hp after the cyclic\_time\_shift). You will find a similar plot but the time of the merger is different: 1126259462.4 s when you use the `template` and 1126259461.8 when you use `hp`, so earlier as expected.

Hope this helps 🙂  
Agata
