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.
|
|