ID |
Date |
Author |
Type |
Category |
Subject |
131
|
Fri Apr 1 02:41:55 2011 |
Won | Computing | Hartmann sensor | exposure time and reproducibility of centroids |
Here is a brief and preliminary summary of rms of centroid displacements calculated at a number of different exposure time values. To get the results I did the following for each value of exposure time:
1. Take a set of images. I took 2000 images for shorter exposure times, 1000 images with exposure times greater than 1 second, and 200 images with exposure time 4.4 second. I tried to keep the maximum pixel count to be roughly the same (about 2430 plus/minus 40).
2. Obtain the centroids for each image frames in a set. I saved centroids as an array of n by m by 2, where n is the number of image frames that I took, m is the number of centroids in each frame, and 2 for x and y coordinates.
Then I iterated through the centroid sets to calculate total rms, using various N_av values. If N_av = 100; then reference centroids were obtained by averaging the centroids of first 50 and the last 50 frames, and remaining 100 frames are averaged to get the other (or non-reference) centroids. I think this method gives a better view of the centroid reproducibility than fixing the number of reference centroids to be, say, first 1000 and last 1000 frames and varying the number of frames to be averaged for non-reference centroid.
Datasets of centroids are labelled as spcdet_I_t, where spcdet stands for "same (maximum) pixel count (with) differen exposure times", I the value of the current that drives the light source, and t the exposure time that I used.
Here are the plots:
 
 
 
 

It can be seen from these plots that the benefit of averaging multiple frames quickly diminish once we go over 1 second. I am investigating if there is any way to improve the reproducibility while using the same sets of images.
Issues that need further investigation:
1. Effect of pixels with unusually high pixel count. Dark images that we took show that, with longer exposure times, not only overall dark noise increase (and become less uniform) but also several pixels show unusually high pixel count (even higher than 2000), without a light source on. More investigation is needed to determine how much this affects the centroids calculation and to devise an way to deal with it.
2. Extra/Duplicate centroids. As exposure time increased, I observed that duplicate centroids start to appear, i.e., HS_Centroids##centroids had duplicate entries. The number of duplicate entries increased as exposure time increased. I believe this is due to the images getting noisier as exposure time increases. So After taking initial reference centroids, I removed duplicate centroid entries before calculating rms. I am thinking about adding a method to do this in HS_Centroids class.
In addition, there were one 'false' centroid when the exposure time was 4.4 seconds. For now I chose to manually remove it myself before calculating rms.
|
22
|
Thu Apr 22 01:48:33 2010 |
Won Kim | Computing | Frame Grabber | from the manual install.pdf |
Regarding the installation of EDT software, I overlooked a note from the install.pdf file.
The gist of it is that if the scripts do not run, then remount the CD-ROM by typing the
following:
mount /mnt/cdrom -o remount,exec
which will then allow the scripts to be run. The directory /mnt/cdrom should be changed if
the cdrom is mounted somewhere else. (The note can be found in the page 1 of the file
install.pdf.)
Unfortunately I don't have linux installed at the moment so I cannot test this. My computer was
reinstalled with Windows XP, the previous CentOS system being wiped out. However if this works,
then there is probably no need to copy the files to the hard drive. |
24
|
Thu Apr 22 08:22:18 2010 |
Aidan | Computing | Frame Grabber | from the manual install.pdf |
Quote: |
Regarding the installation of EDT software, I overlooked a note from the install.pdf file.
The gist of it is that if the scripts do not run, then remount the CD-ROM by typing the
following:
mount /mnt/cdrom -o remount,exec
which will then allow the scripts to be run. The directory /mnt/cdrom should be changed if
the cdrom is mounted somewhere else. (The note can be found in the page 1 of the file
install.pdf.)
Unfortunately I don't have linux installed at the moment so I cannot test this. My computer was
reinstalled with Windows XP, the previous CentOS system being wiped out. However if this works,
then there is probably no need to copy the files to the hard drive.
|
I saw this and tried it when i was installing, but I had more flexibility when I copied the files directly to the hard drive.
|
140
|
Fri Apr 22 19:51:37 2011 |
Aidan | Computing | EPICS | pyepics installed on princess_sparkle |
I installed the pyepics package on princess_sparkle since this is much easier under Ubuntu than under CentOS.
sudo apt-get install python-dateutil python-setuptools
- make sure that LD_LIBRARY_PATH points to EPICS libraries by echo $LD_LIBRARY_PATH
- sudo ldconfig
- sudo easy_install -U pyepics
Then I started the following python script ~/start_test_channels.py in the background on princess_sparkle. The EPICS channels are actually in an IOC on tcs_daq . They are all acquired by the frame builder at 16Hz.
|
Attachment 1: start_test_channels.py
|
#!/usr/bin/python
# a short script to output low frequency sine wave to EPICS channels
import epics
import math
import time
import os
import random
a = 0
... 70 more lines ...
|
11
|
Mon Feb 8 10:45:50 2010 |
Steve O'Connor | Electronics | Pre-amplifier | replace Pot with fixed Resistor |
|
|
|
|
|
|
Preamp for Bulls eye detector |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It was felt that the Pot used at the input stage to remove offset added Noise |
|
|
|
|
|
|
|
To test this the Pot was replaced with a fixed resistor and the offset removed at the second stage |
|
|
|
|
|
Noise was measured after the first stage and at the monitor point first with the pot and then with the pot replaced with a Resistor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
First stage gain =1+500/10 |
test point 1 gain = 51 |
|
|
|
|
|
|
|
|
|
|
second stage gain=10K/1K |
test point 2 gain = 510 |
|
|
|
1K Pot (R19) is present |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chan #1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dbVrms/Hz |
|
|
|
nV/Hz |
|
|
|
Referred Input Noise |
nV/Hz |
|
|
|
|
|
|
|
|
|
|
|
|
|
gain = 51 |
|
|
|
|
|
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
|
|
Test Point #1 |
-141.1 |
-140.0 |
-136.8 |
|
88.1 |
100.0 |
144.5 |
|
1.7 |
2.0 |
2.8 |
|
|
|
|
|
|
|
|
|
|
|
|
gain = 510 |
|
|
|
|
|
Test Point #2 |
-119.4 |
-120.4 |
-118.4 |
|
1071.5 |
955.0 |
1202.3 |
|
2.1 |
1.9 |
2.4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pot replaced with Resistor (R4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chan #1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dbVrms/Hz |
|
|
|
nV/Hz |
|
|
|
RIN |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gain = 50 |
|
|
|
|
|
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
|
|
Test Point #1 |
-142.7 |
-142.7 |
-141.9 |
|
73.7 |
73.3 |
80.8 |
|
1.4 |
1.4 |
1.6 |
|
|
|
|
|
|
|
|
|
|
|
|
gain = 500 |
|
|
|
|
|
Test Point #2 |
-122.0 |
-121.1 |
-120.7 |
|
794.3 |
881.0 |
922.6 |
|
1.6 |
1.7 |
1.8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When the Pot was replaced with R4, the offset was removed with the Pot at the second gain stage |
|
|
|
|
|
|
R4 was not a thin film metal resistor |
|
|
|
|
|
|
|
|
|
|
|
12
|
Mon Feb 8 17:44:38 2010 |
Aidan | Electronics | Pre-amplifier | replace Pot with fixed Resistor |
Quote: |
|
|
|
|
|
|
Preamp for Bulls eye detector |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It was felt that the Pot used at the input stage to remove offset added Noise |
|
|
|
|
|
|
|
To test this the Pot was replaced with a fixed resistor and the offset removed at the second stage |
|
|
|
|
|
Noise was measured after the first stage and at the monitor point first with the pot and then with the pot replaced with a Resistor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
First stage gain =1+500/10 |
test point 1 gain = 51 |
|
|
|
|
|
|
|
|
|
|
second stage gain=10K/1K |
test point 2 gain = 510 |
|
|
|
1K Pot (R19) is present |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chan #1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dbVrms/Hz |
|
|
|
nV/Hz |
|
|
|
Referred Input Noise |
nV/Hz |
|
|
|
|
|
|
|
|
|
|
|
|
|
gain = 51 |
|
|
|
|
|
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
|
|
Test Point #1 |
-141.1 |
-140.0 |
-136.8 |
|
88.1 |
100.0 |
144.5 |
|
1.7 |
2.0 |
2.8 |
|
|
|
|
|
|
|
|
|
|
|
|
gain = 510 |
|
|
|
|
|
Test Point #2 |
-119.4 |
-120.4 |
-118.4 |
|
1071.5 |
955.0 |
1202.3 |
|
2.1 |
1.9 |
2.4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pot replaced with Resistor (R4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chan #1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dbVrms/Hz |
|
|
|
nV/Hz |
|
|
|
RIN |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gain = 50 |
|
|
|
|
|
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
200Hz |
100Hz |
50Hz |
|
|
|
Test Point #1 |
-142.7 |
-142.7 |
-141.9 |
|
73.7 |
73.3 |
80.8 |
|
1.4 |
1.4 |
1.6 |
|
|
|
|
|
|
|
|
|
|
|
|
gain = 500 |
|
|
|
|
|
Test Point #2 |
-122.0 |
-121.1 |
-120.7 |
|
794.3 |
881.0 |
922.6 |
|
1.6 |
1.7 |
1.8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When the Pot was replaced with R4, the offset was removed with the Pot at the second gain stage |
|
|
|
|
|
|
R4 was not a thin film metal resistor |
|
|
|
|
|
|
|
|
|
|
|
Just a note: this board was for the QPD not the Bull's eye detector.
|
61
|
Wed Jun 30 00:00:13 2010 |
Kathryn and Won | Computing | Hartmann sensor | rms of centroid position changes |
Given below is a brief overview of calculating rms of spot position changes to test the accuracy/precision of the centroiding code. Centroids are obtained by summing over the array of size 30 by 30 around peak pixels, as opposed to the old method of using matlab built-in functions only. Still peak pixel positions were obtained by using builtin matlab function. Plese see the code detect_peaks_bygrid.m for bit more details.
My apologies for codes being well modularised and bit messy...
Please unzip the attached file to find the matlab codes.
The rest of this log is mainly put together by Kathryn.
Won
(EDIT/PS) The attached codes were run with raw image data saved on the hard disk, but it should be relatively easy to edit the script to use images acquired real time. We are yet to play with real-time images, and still operating under Windows XP...
---
When calculating the rms, the code outputs the results of two
different methods. The "old" method is using the built-in matlab
method while the "new" method is one Won constructed and seems to
give a result that is closer to the expected value. In calculating
and plotting the rms, the following codes were used:
- centroid_statics_raw_bygrid.m (main script run to do the analysis)
- process_raw.m (takes raw image data and converts them into 2D array)
- detect_peaks_bygrid.m (returns centroids obtained by old and new methods)
- shuffle.m (used to shuffle the images before averaging)
The reference image frame was obtained by averaging 4000 image frames,
the test image frames were obtained by averaging 1, 2, 5, 10 ... 500,
1000 frames respectively, from the remaining 1000 images.
In order to convert rms values in units of pixels to wavefront
aberration, do the following:
aberration = rms * pixel_width * hole_spacing / lever_arm
pixel_width: 12 micrometer
hole_spacing: about 37*12 micrometer
lever_arm: 0.01 meter
rms of 0.00018 roughly corresponds to lambda over 10000.
Note: In order to get smaller rms values the images had to be shuffled
before taking averages. By setting shuffle_array (in
centroid_statics_raw_bygrid.m) to be false one can
turn off the image array shuffling.
N_av rms
1 0.004018866673087
2 0.002724680286563
5 0.002319477846009
10 0.001230553835673
20 0.000767638027270
50 0.000432681002432
100 0.000427139665006
200 0.000270955332752
500 0.000226521040455
1000 0.000153760240692
fitted_slope = -0.481436501422376
Here are some plots:
 
---
Next logs will be about centroid testing with simulated images, and wavefront changes due to the change in the camera temperature!
(PS) I uploaded the same figure twice by accident, and the site does not let me remove a copy!... |
Attachment 2: rms_plot_shuffle.jpg
|
|
Attachment 4: eLOG.zip
|
146
|
Wed May 11 18:38:47 2011 |
Aidan | Computing | Hartmann sensor | test_HS binary |
From Won: (the zip file is also on the SVN /users/won/compiled_code/test_HS.zip )
Attached is test_HS.zip file, that contains
- test_HS.prj: project file created by Matlab Compiler. This file is not
required to run the application but I included it just in case someone's
insterested.
- test_HS folder contains two subfolders src and distrib, each of which
contains the standalone application test_HS.
Usage: test_HS <path to the image folder>, for example
test_HS ~/test_images/
Make sure you create the folder prior to running the application, and the
folder name ends with "/". Running test_HS will take and save 10 images
using the camera (provided the frame grabber applications are installed in
/opt/EDTpdv), averages those 10 images and find centroids, then plots the
result.
As I put in the eLOG, one needs MCRInstaller.bin and run it to install MCR
(probably 2008b 64bit version to test my files). If there are difficulties
getting MCRInstaller, let me know.
Won
<test_HS.zip>
|
Attachment 1: test_HS.zip
|