40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  Cryo Lab eLog  Not logged in ELOG logo
Entry  Sun Mar 8 18:17:06 2020, Duo, HowTo, Qryo, General procedures to identify modes and calculate the Q ringdown.py
    Reply  Fri Mar 13 12:10:19 2020, rana, HowTo, Qryo, General procedures to identify modes and calculate the Q 
       Reply  Wed Apr 8 16:17:36 2020, Duo, HowTo, Qryo, New script calculating Q and a little thing about nds2 Mode2298Ringdown.zipringdown1.py
Message ID: 2519     Entry time: Wed Apr 8 16:17:36 2020     In reply to: 2517
Author: Duo 
Type: HowTo 
Category: Qryo 
Subject: New script calculating Q and a little thing about nds2 

In 2516, I managed to measure the Q of some modes with the ringdown method. This is a development from that post: instead of downloading data with ndscope manually, we wrote a new script and automated part of the process, getting rid of the ndscope. 

To use the script

1. Excite the mode

2. Run the script (it will keep saying "Excitation is still on")

python2 ringdown1.py <p or y>

p is for pitch; y is for yaw

3. Turn off excitation (the script will detect the excitation turning off and start the ringdown measurement)

How the script works

Once it starts,

1. It keeps getting data from the excitation channel and the QPD channel.

2. If the excitation on, it does nothing. If the excitation is off, it records the initial amplitude and keeps taking data until the amplitude falls under 30% of the initial amplitude.

3. Then it does analysis and plots like before in 2516 and zip them up.

Adapting the script

I pulled these parameters as constants at the top of the script so that they can be modified easily

- the amplitude threshold when the excitation is considered off,

- the cutoff percentage threshold of the ringdown amplitude

- the excitation/QPD channels used

Traps

Here are a couple things that could trap the script and none of them is applicable to the current Cryo lab.

1. If the initial amplitude is too small like 0.02, it means when the excitation is off, the mode is dead already. Perhaps the Q is too small or it is not a mode. The script will get stuck.

2. If the sample rate of the excitation channel and the QPD channel are different, it will print a line asking the user to improve the code.

3. If the mode frequency is below 1Hz or above 16kHz, it will print a line telling the user about this.

A little thing about nds2

Here is the documentation for nds2, which was not that easy to find online: https://www.lsc-group.phys.uwm.edu/daswg/projects/nds-client/doc/manual/index.html

This is a little thing but it got me stuck for days. To download online data(channels without _DQ), fetch is no good - you have to use nds2.iterate like this

for buf in nds2.iterate([channels]):

according to chapter 4 of the documentation (and Chris, who actually pointed this out for me). I was doing this wrong and it gave me unhelpful error messages like 'unspecified error[0]'. 

Quote:

Great! I recommend grabbing the data directly with NDS instead of NDscope so that there's no need to use an extra step.

 

Attachment 1: Mode2298Ringdown.zip  5.357 MB
Attachment 2: ringdown1.py  4 kB  | Hide | Hide all
'''
1. Excite the mode
2. Turn off excitation
3. Run this script
'''
import numpy as np
import matplotlib.pyplot as plt
import sys
import scipy.io as sio
import scipy.signal as sig
... 163 more lines ...
ELOG V3.1.3-