40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log, Page 279 of 346 Not logged in
ID Date Author Type Category Subject
215   Thu Dec 27 12:12:02 2007 pkpUpdate Update on GigE Camera
So I finally got the linux software to compile on mafalda. I got the software to dump all the information regarding the camera onto a file. I tried to take a tiff snap and came up empty. So I looked at the configuration file and realized that the camera thinks that the frame-rate is a nan. Am reading up the manual to fix the frame-rate manually and then will attempt to take another snap.

All the files are in a folder called Prosilica in /home/controls/ on mafalda. All the executables are in /home/controls/Prosilica/bin-pc/x86/* . On another note, I am looking for a name for the camera. Any suggestions are welcome.
218   Sun Dec 30 02:36:35 2007 pkpUpdateGeneralAnother update
So I followed suggestions 1 and 3 so far and have started writing up what all needs to be done in order to compile and use the camera. I wrote a program to ping the camera and get its properties and am working on a program to get an image. The reason why I want to write my own programs to do this, is that it will be easier to reuse and also to compile/use in the first place. The programs currently rest in /cvs/cds/caltech/target/Prosilica/ . Unfortunately I will be away for the next couple of days and will have another update on the 2nd.
236   Fri Jan 11 17:01:51 2008 pkpUpdateCamerasGigE again
So, here I detail all the efforts on the GigE so far

(1) The GiGE camera requires a minimum of 9 kb packet size, which is not available on mafalda or on my laptop ( both of which run Ubuntu and the Camera programs compile there). The programs which require smaller sizes work perfectly fine on these machines. I tried to statically compile the files on these machines so that I could then port them to the other machines. But that fails because the static libraries given by the company dont work.

(2) On Linux2, which lets me set a packet size as high as 9 Kb, it doesnt compile because of a GLIBC error. I tried updating the glibc and it tells me that the version already existing is the latest ( which it clearly is not). So I tried to uninstall GLIBC and reinstall it, but it wont let me uninstall (it == rpm) glibc, since there are a lot of dependencies. A dead end in essence.

Steps being taken

(1) Locally installing the whole library suites on linux2. Essentially install another version of gcc and g++ and see if that helps.
(2) IF this doesnt work, then the only course of action I can take is to cannibalize linux2's GigE card and put it on mafalda. ( I need permission for this ).

Once again any suggestions welcome.
13874   Mon May 21 17:36:00 2018 poojaUpdateCamerasGigE camera image of ETMX

Today Steve and I tried to to capture the image of scattering of light by dust particles on the surface of ETMX using GigE camera. The image ( at gain =100, exposure time = 125000) obtained has been attached. Unlike the previous images, a creepy shape of bright spots was seen. Gautam helped us lock infrared light and see the image. A similar less intense shape was seen. This may be because of the dust on the lens.

Attachment 1: Image__2018-05-21__17-34-15_125k100g.tiff
13909   Fri Jun 1 19:25:11 2018 poojaUpdateCamerasSynchronizing video data with the applied motion to the mirror

Aim: To synchronize data from the captured video and the signal applied to ETMX

In order to correlate the intensity fluctuations of the scattered light with the motion of the test mass, we are planning to use the technique of neural network. For this, we need a synchronised video of scattered light with the signal applied to the test mass. Gautam helped me capture 60sec video of scattering of infrared laser light after ETMX was dithered in PITCH at ~0.2Hz..

I developed a python program to capture the video and convert it into a time series of the sum of pixel values in each frame using OpenCV to see the variation. Initially we had tried the same with green laser light and signal of approximately 11.12Hz. But in order to see the variation clearly, we repeated with a lower frequency signal after locking IR laser today. I have attached the plots that we got below. The first graph gives the intensity fluctuations from the video. The third and fourth graphs are that of transmitted light and the signal applied to ETMX to shake it. Since the video captured using the camera was very noisy and intensity fluctuations in the scattered light had twice the frequency of the signal applied, we captured a video after turning off the laser. The second plot gives the background noise probably from the camera. Since camera noise is very high, it may not be possible to train this data set in neural network.

Since the videos captured consume a lot of memory I haven't uploaded it here. I have uploaded the python code 'sync_plots.py' in github (https://github.com/CaltechExperimentalGravity/GigEcamera/tree/master/Pooja%20Sekhar/PythonCode).

Attachment 1: camera_mirror_motion_plots.pdf
13928   Thu Jun 7 20:19:53 2018 poojaUpdate

Just to inform, I'm working in optimus to develop python code to train the neural network since it requires a lot of memory.

13937   Sun Jun 10 15:04:33 2018 poojaUpdateCamerasDeveloping neural network

Aim: To develop a neural network in order to correlate the intensity fluctuations in the scattered light to the angular motion of the test mass. A block diagram of the technique employed is given in Attachment 1.

I have used Keras to implement supervised learning using neural network (NN). Initially I had developed a python code that converts a video (59 sec) of scattered light, after an excitation (sine wave of frequency 0.2 Hz) is applied to ETMX pitch, to image frames (of size 480*720)  and stores the 2D pixel values of 1791 images frames captured into an hdf5 file. This array of shape (1791,36500) is given as an input to the neural network. I have tried to implement regular NN only, not convolution or recurrent NN. I have used sequential model in Keras to do this. I have tried with various number of dense layers and varied the number of nodes in each layer. I got test accuracy of approximately 7% using the following network. There are two dense layers, first one with 750 nodes with a dropout of 0.1 ( 10% of the nodes not used) and second one with 500 nodes. To add nonlinearity to the network, both the layers are given an activation function of tanh. The output layer has 1 node and expects an output of shape (1791,1). This model has been compiled with a loss function of categorical crossentropy, optimizer = RMSprop. We have used these since they have been mostly used in the image analysis examples. Then the model is trained against the dataset of mirror motion. This has been obtained by sampling the cosine wave fit to the mirror motion so that the shapes of the input and output of NN are consistent. I have used a batch size ( number of samples per gradient update) = 32 and epochs (number of times entire dataset passes through NN) = 20. However, using this we got an accuracy of only 7.6%.

I think that the above technique gives overfitting since dense layers use all the nodes during training apart from giving a dropout. Also, the beam spot moves in the video. So it may be necessary to use convolution NN to extract the information.

Gabriele told us that he had used the beam spot motion to train the neural network. Also he informed that GPUs are necessary for this. So we have to figure out a better way to train the network.

gautam noon 11Jun: This link explains why the straight-up fully connected NN architecture is ill-suited for the kind of application we have in mind. Discussing with Gabriele, he informed us that training on a GPU machine with 1000 images took a few hours. I'm not sure what the CPU/GPU scaling is for this application, but given that he trained for 10000 epochs, and we see that training for 20 epochs on Optimus already takes ~30minutes, seems like a futile exercise to keep trying on CPU machines.

Attachment 1: nn_block_diag_2.pdf
13940   Mon Jun 11 17:18:39 2018 poojaUpdateCamerasCCD calibration

Aim: To calibrate CCD of GigE using LED1050E.

The following table shows some of the specifications for LED1050E as given in Thorlabs datasheet.

 Specifications Typical maximum ratings DC forward current (mA) 100 Forward voltage (V) @ 20mA (VF) 1.25 1.55 Forward optical power (mW) 1.6 Total optical power (mW) 2.5 Power dissipation (mW) 130

The circuit diagram is given in Attachment 1.

Considering a power supply voltage Vcc = 15V, current I = 20mA & forward voltage of led VF = 1.25V, resistance in the circuit is calculated as,

R = (Vcc - VF)/I = 687.5$\ohm$$\ohms$$\Omega$

Attachment 2 gives a plot of resistance (R) vs input voltage (Vcc) when a current of 20mA flows through the circuit. I hope I can proceed with this setup soon.

Attachment 1: led_circuit.pdf
Attachment 2: R_vs_V.pdf
13951   Tue Jun 12 19:27:25 2018 poojaUpdateCamerasCCD calibration

Today I made the led (1050nm) circuit inside a box as given in my previous elog. Steve drilled a 1mm hole in the box as an aperture for led light.

Resistance (R) used = 665 $\Omega$.

We connected a power supply and IR has been detected using the card.

Later we changed the input voltage and measured the optical power using a powermeter.

 Input voltage (Vcc in V) Optical power 0 (dark reading) 60 nW 15 68 $\mu$W 18 82.5 $\mu$W 20 92 $\mu$W

Since the optical power values are very less, we may need to drill a larger hole.

Now the hole is approximately 7mm from led, therefore aperture angle is approximately 2*tan-1(0.5/7) = 8deg. From radiometric curve given in the datasheet of LED1050E, most of the power is within 20 deg. So a hole of size 2* tan(10) *7 = 2.5mm may be required.

I have also attached a photo of the led beam spot on the IR detection card.

Attachment 1: IMG_20180612_163831.jpg
13972   Fri Jun 15 09:51:55 2018 poojaUpdateCamerasDeveloping neural network

Aim : To develop a neural network on simulated data.

I developed a python code that generates a 64*64 image of a white Gaussian beam spot at the centre of black background. I gave a sine wave of frequency 0.2Hz that moves the spot vertically (i.e. in pitch). Then I simulated this video at 10 frames/sec for 10 seconds. Then I saved this data into an hdf5 file, reshaped it to a 1D array and gave as input to a neural network. Out of the 100 image frames, 75 were taken as training dataset and 25 as test data. I varied several hyperparameters like learning rate of the optimizer, number of layers, nodes, activation function etc. Finally, I was successful in reducing the mean squared error with the following network model:

• Sequential model of 2 fully connected layers with 256 nodes each and a dropout of 0.1
• loss function = mean squared error, optimizer = RMSprop (learning rate = 0.00001) and activation function that adds nonlinearity = relu
• batch size = 32 and number of epochs = 1000

I have attached the plot of the output of neural network (NN) as well as sine signal applied to simulate the video and their residula error in Attachment 1. The plot of variation in mean squared error (in log scale) as number of epochs increases is given in Attachment 2.

I think this network worked easily since there is no noise in the input. Gautam suggested to try the working of this network on simulated data with a noisy background.

Attachment 1: nn_1.pdf
Attachment 2: nn_2.pdf
13986   Tue Jun 19 14:08:37 2018 poojaUpdateCamerasCCD calibration using LED1050E

Aim: To measure the optical power from led using a powermeter.

Yesterday Gautam drilled a larger hole of diameter 5mm in the box as an aperture for led (aperture angle is approximately 2*tan-1(2.5/7) = 39 deg). I repeated the measurements that I had done before (https://nodus.ligo.caltech.edu:8081/40m/13951). The measurents of optical power measured using a powermeter and the corresponding input voltages are listed below.

 Input voltage (Vcc in V) Optical power 0 (dark reading) 0.8 nW 10 1.05 mW 12 1.15 mW 15 1.47 mW 16 1.56 mW 18 1.81 mW

So we are able to receive optical power close to the value (1.6mW) given in Thorlabs datasheet for LED1050E (https://www.thorlabs.com/drawings/e6da1d5608eefd5c-035CFFE5-C317-209E-7686CA23F717638B/LED1050E-SpecSheet.pdf). I hope we can proceed to BRDF measurements for CCD calibration.

Steve: did you center the LED ?

13991   Wed Jun 20 20:39:36 2018 poojaUpdateCamerasCCD calibration using LED1050E

Quote:

Aim: To measure the optical power from led using a powermeter.

Yesterday Gautam drilled a larger hole of diameter 5mm in the box as an aperture for led (aperture angle is approximately 2*tan-1(2.5/7) = 39 deg). I repeated the measurements that I had done before (https://nodus.ligo.caltech.edu:8081/40m/13951). The measurents of optical power measured using a powermeter and the corresponding input voltages are listed below.

 Input voltage (Vcc in V) Optical power 0 (dark reading) 0.8 nW 10 1.05 mW 12 1.15 mW 15 1.47 mW 16 1.56 mW 18 1.81 mW

So we are able to receive optical power close to the value (1.6mW) given in Thorlabs datasheet for LED1050E (https://www.thorlabs.com/drawings/e6da1d5608eefd5c-035CFFE5-C317-209E-7686CA23F717638B/LED1050E-SpecSheet.pdf). I hope we can proceed to BRDF measurements for CCD calibration.

Steve: did you center the LED ?

Yes.

14005   Fri Jun 22 10:42:52 2018 poojaUpdate Developing neural networks

Aim: To find a model that trains the simulated data of Gaussian beam spot moving in a vertical direction by the application of a sinusoidal signal.

All the attachments are in the zip folder.

The simulated video of beam spot motion without noise (amplitude of sinusoidal signal given = 20 pixels) is given in this link https://drive.google.com/file/d/1oCqd0Ki7wUm64QeFxmF3jRQ7gDUnuAfx/view?usp=sharing

I tried several cases:

Case 1:

I added random uniform noise (ranging from 0 to 25.5 i.e. 10% of the maximum pixel value 255) using opencv to 64*64 simulated images made in the last case( https://nodus.ligo.caltech.edu:8081/40m/13972), clipped the pixel values from 0 to 255 & trained using the same network as in the previous elog and it worked well. The variation in mean squared error with epochs is given in Attachment 1 & applied signal and output of the neural network (NN) (magnitude of the signal vs time) as well as the residual error is given in Attachment 2.

Case 2:

I simulated images 128*128 at 10 frames/sec by applying a sine wave of frequency 0.2Hz that moves the beam spot & resized it using opencv to 64*64. Then I trained 300cycles & tested with 1000 cycles with the following sequential model:

(i) Layers and number of nodes in each:

4096 (dropout = 0.1) -> 1024 (dropout = 0.1) -> 512 (dropout = 0.1) -> 256  ->  64 ->  8   ->   1

Activation :                        selu                   ->                 selu             ->         selu                -> selu ->  selu -> selu -> linear

(ii) loss function = mean squared error ( I used mean squared error to easily comprehend the result. Initially I had tried log(cosh) also but unfortunately I had stopped the run in between when test loss value had no improvement), optimizer = Nadam with default learning rate = 0.002

(iii) batch size = 32, no. of epochs = 400

I have attached the variation in loss function with epochs (Attachment 3). It was found that test loss value increases after ~50 epochs. To avoid overfitting, I added dropout to the layer of 256 nodes in the next model and removed the layer of 4096 nodes.

Case 3

Same simulated data as case 2 trained with the following model,

(i) Layers and number of nodes in each:

1024 (dropout = 0.1) -> 512 (dropout = 0.1) -> 256 (dropout = 0.1) ->  64 ->  8   ->   1

Activation :                              selu             ->         selu                ->              selu ->             selu -> selu -> linear

(ii) changed the learning rate from default value of 0.002 to 0.001. Rest of the hyperparameters same.

The variation in mean squared error in attachment 4  & NN output, applied signal & residual error (zoomed) in attachment 5. Here also test loss value increases after ~65 epochs but this fits better than the previous model as loss value is less.

Case 4:

Since in most of the examples in keras, training dataset was more than test dataset, I tried training 1000 cycles & testing with 300 cycles. The respective plots are attached as attachment 6 & 7. Here also, there is no significant improvement except that the test loss is increasing at a slower rate with epochs as compared to the last case.

Case 5:

Since most of the above cases were like overfitting (https://machinelearningmastery.com/diagnose-overfitting-underfitting-lstm-models/, https://github.com/keras-team/keras/issues/3755) except that test loss is less than train loss value in the beginning , I tried implementing case 4 with the initial model of 2 layers of 256 nodes each but with Nadam optimizer. Respective graphs in attachment 8, 9 & 10(zoomed). The loss value is slightly higher than the previous models as seen from the graph but test & train loss values converge after some epochs.

I have forgot to give ylabel in some of the graphs. It's the magnitude of the applied sine signal to move the beam spot. In most of the cases, the network almost correctly fits the data and test loss value is lower in the initial epochs. I think it's because of the dropout we added in the model & also we are training on the clean dataset.

Attachment 1: NN_fig.zip
14018   Tue Jun 26 10:50:14 2018 poojaUpdateCamerasBeam spot tracking using OpenCV

Aim: To track the motion of beam spot in simulated video.

I simulated a video that moves the beam spot at the centre of the image initially by applying a sinusoidal signal of frequency 0.2Hz and amplitude 1 i.e. it moves maximum by 1 pixel. It can be found in this shared google drive link (https://drive.google.com/file/d/1GYxPbsi3o9W0VXybPfPSigZtWnVn7656/view?usp=sharing). I found a program that uses Kernelized Correlation Filter (KCF) to track object motion from the video. In the program we can initially define the bounding box (rectangle) that encloses the object we want to track in the video or select the bounding box by dragging in GUI platform. Then I saved the bounding box parameters in the program (x & y coordinates of the left corner point, width & height) and plotted the variation in the y coordinates. I have yet to figure out how this tracker works since the program reads 64*64 image frames in video as 480*640 frames with 3 colour channels and frame rate also randomly changes. The plot of the output of this tracking program & the applied signal has been attached below. The output is not exactly sinusoidal because it may not be able to track very slight movement especially at the peaks where the slope = 0.

Attachment 1: cv2_track_fig.pdf
14021   Tue Jun 26 17:54:59 2018 poojaUpdateCamerasDeveloping neural networks

Aim:  To find a model that trains the simulated data of Gaussian beam spot moving in a vertical direction by the application of a sinusoidal signal. The data also includes random uniform noise ranging from 0 to 10.

All the attachments are in the zip folder.

I simulated images 128*128 at 10 frames/sec by applying a sine wave of frequency 0.2Hz that moves the beam spot, added random uniform noise ranging from 0 to 10 & resized the image frame using opencv to 64*64. 1000 cycles of this data is taken as train & 300 cycles as test data for the following cases. Optimizer = Nadam (learning rate = 0.001), loss function used = mean squared error, batch size = 32,

Case 1:

Model topology:

256 (dropout = 0.1)  ->           256 (dropout = 0.1)   ->       1

Activation :             selu                                         selu

Number of epochs = 240.

Variation in loss value of train & test datasets is given in Attachment 1 of the attached zip folder & the applied signal as well as the output of neural network given in Attachments 2 & 3 (zoomed version of 2).

The model fits well but there is no training since test loss is lower than train loss value. I found in several sites that dropout of some of the nodes during training but retaining them during test could be the probable reason for this (https://stackoverflow.com/questions/48393438/validation-loss-when-using-dropout , http://forums.fast.ai/t/validation-loss-lower-than-training-loss/4581 ). So I removed dropout while training next time.

Case 2:

Model topology:

256 (dropout = 0.1)  ->           256 (dropout = 0.1)   ->       1

Activation :             selu                                         selu                          linear

Number of epochs = 200.

Variation in loss value of train & test datasets is given in Attachment 4 of the attached zip folder & the applied signal as well as the output of neural network given in Attachments 5 & 6 (zoomed version of 2).

But still no improvement.

Case 3:

I changed the optimizer to Adam and tried with the same model topology & hyperparameters as case 2 with no success (Attachments 7,8 & 9).

Finally I think this is because I'm training & testing on the same data. So I'm now training with the simulated video but moving it by a maximum of 2 pixels only and testing with a video of ETMY that we had captured earlier.

Attachment 1: NN_noise_diag.zip
14037   Wed Jul 4 20:48:32 2018 poojaUpdateCamerasMedm screen for GigE

(Gautam, Pooja)

Aim: To develop medm screen for GigE.

Gautam helped me set up the medm screen through which we can interact with the GigE camera. The steps adopted are as follows:

(i) Copied CUST_CAMERA.adl file from the location /opt/rtcds/userapps/release/cds/common/medm/ to /opt/rtcds/caltech/c1/medm/MISC/.

• Changed the name of file to "/cvs/cds/rtcds/caltech/c1/medm/MISC/CUST_CAMERA.adl"
• Replaced all occurences of "/ligo/apps/linux-x86_64/camera/bin/" to "/opt/rtcds/caltech/c1/scripts/GigE/SnapPy_pypylon/" & "/ligo/cds/$(site)/$(ifo)/camera/" to "/opt/rtcds/caltech/c1/scripts/GigE/SnapPy_pypylon/"

(iii) Added this .adl file as drop-out menu 'GigE' to VIDEO/LIGHTS section of sitemap (circled in Attachment 1) i.e opened Resource Palette of VIDEO/LIGHTS, clicked on Label/Name/Args & defined macros as CAMERA=C1:CAM-ETMX,CONFIG=C1-CAM-ETMX in Arguments box of Related Display Data dialog box (circled in Attachment 2) that appears. In Related Display Data dialog box, Display label is given as GigE and Display File as ./MISC/CUST_CAMERA.adl

(iv) All the channel names can be found in Jigyasa's elog https://nodus.ligo.caltech.edu:8081/40m/13023

(v) Since the slider (circled in Attachment 3) for pixel sum was not moving, changed the high limit value to 10000000 in PV Limits dialog box. This value is set such that the slider reaches the other end on setting the exposure time to maximum.

(vii) Set the Snapshot channel C1:CAM-ETMX_SNAP to off (very important!). Otherwise we cannot interact with the camera.

(vii) GigE camera gstreamer client is run in tmux session.

Now we can change the exposure time and record a video by specifying the filename and its location using medm screen. However, while recording the video, gstream video laucher of GigE stops or is stuck.

Attachment 1: sitemap.png
Attachment 2: GigE_macros.png
Attachment 3: CUST_CAMERA.png
14046   Mon Jul 9 12:36:32 2018 poojaUpdateGeneralProjector light bulb blown out

Projector light bulb blown out today.

14053   Wed Jul 11 16:50:34 2018 poojaUpdateCamerasUpdate in developing neural networks

Aim: To develop a neural network that resolves mirror motion from video.

I had created a python code to find the combination of hyperparameters that trains the neural network. The code (nn_hyperparam_opt.py) is present in the github repo. It's running in cluster since a few days. In the meanwhile I had just tried some combination of hyperparameters.

These give a low loss value of approximately 1e-5 but there is a large error bar for loss value since it fluctuates a lot even after 1500 epochs. This is unclear.

Input: 64*64 image frames of simulated video by applying beam motion sine wave of frequency 0.2Hz and at 10 frames per sec. This input data is given as an hdf5 file.

Train : 100 cycles,  Test: 300 cycles, Optimizer = Nadam (learning rate = 0.001)

Model topology:

256       ->      128    ->       1

Activation :        selu     selu           linear

Case 1: batch size = 48, epochs = 1000, loss function = mean squared error

Plots of output predicted by neural network (NN) & input signal has been shown in 1st graph & variation in loss value with epochs in 2nd graph.

Case 2: batch size = 32, epochs = 1500, loss function = mean squared logarithmic error

Plots of output predicted by neural network (NN) & input signal has been shown in 3rd graph & variation in loss value with epochs in 4th graph.

Attachment 1: graphs.pdf
14070   Fri Jul 13 23:23:49 2018 poojaUpdateCamerasUpdate in developing neural networks

Aim: To develop a neural network that resolves mirror motion from video.

I tried to reduce the overfitting problem in previous neural network by reducing the number of nodes and layers and by varying the learning rate, beta factors (exponential decay rates of moving first and second moments) of Nadam optimizer assuming error of 5% is reasonable.

Input:

32 * 32 image frames (converted to 1d array & pixel values of 0 to 255 normalized) of simulated video by applying sine signal to move beam spot in pitch with frequency 0.2Hz and at 10 frames per second.

Total: 300 cycles ,           Train: 60 cycles,    Validation: 90 cycles,    Test: 150 cycles

Model topology:

Input               -->                  Hidden layer               -->                    Output layer

4 nodes                                              1 node

Activation function:                                  selu                                             linear

Batch size = 32, Number of epochs = 128, loss function = mean squared error

Case 1:

Learning rate = 0.00001,    beta_1 = 0.8 (default value in Keras = 0.9),  beta_2 = 0.85 (default value in Keras = 0.999)

Plot of predicted output by neural network, applied input signal & residual error given in 1st attachment.

Case 2:

Changed number of nodes in hidden layer from 4 to 8. All other parameters same.

These plots show that when residual error increases basically the output of neural network has a smaller amplitude compared to the applied signal. This kind of training error is unclear to me.

When beta parameters of optimizer is changed farther from 1, error increases.

Attachment 1: nn_simulation_2_nodes4_lr0p00001_beta1_0p8_beta2_0p85.pdf
Attachment 2: nn_simulation_2_nodes8_lr0p00001_beta1_0p8_beta2_0p85.pdf
14089   Thu Jul 19 18:09:17 2018 poojaUpdateCamerasUpdate in developing neural networks

Aim: To develop a neural network that resolves mirror motion from video.

Case 1:

Input : Simulated video of beam spot motion in pitch by applying 4 sine  waves of frquencies 0.2, 0.4, 0.1, 0.3 Hz  and amplitude ratios to frame size to be 0.1, 0.04, 0.05, 0.08

The data has been split into train, validation and test datasets and I tried training on neural network with the same model topology & parameters as in my previous elog (https://nodus.ligo.caltech.edu:8081/40m/14070)

The output of NN and residual error have been shown in Attachment 1. This NN model gives a large error for this. So I think we have to increase the number of nodes and learning rate so that we get a lower error value with a single sine wave simulated video ( but not overfitting) and then try training on linear combination of sine waves.

Case 2 :

Normalized the target sine signal of NN so that it ranges from -1 to 1 and then trained on the same neural network as in my previous elog with simulated video created using single sine wave. This gave comparatively lower error (shown in Attachment 2). But if we train using this network, we can get only the frequency of test mass motion but we can't resolve the amount by which test mass moves. So I'm unclear about whether we can use this.

Attachment 1: nn_simulation_mlt_sine_nodes4_lr0p00001_beta1_0p8_beta2_0p85_marked.pdf
Attachment 2: nn_simulation_2_nodes4_target-1to1_marked.pdf
14097   Sun Jul 22 14:01:07 2018 poojaUpdateCamerasDeveloping neural networks on simulated video

Aim: To develop a neural network that resolves mirror motion from video.

Since error was high for the same input as in my previous elog http://nodus.ligo.caltech.edu:8080/40m/14089

I modified the network topology by tuning the number of nodes, layers and learning rate so that the model fitted the sum of 4 sine waves efficiently, saved weights of the final epoch and then in a different program, loaded saved weights & tested on simulated video that's produced by moving beam spot from the centre of image by sum of 4 sine waves whose frequencies and amplitudes change with time.

Input : Simulated video of beam spot motion in pitch by applying 4 sine  waves of frquencies 0.2, 0.4, 0.1, 0.3 Hz  and amplitude ratios to frame size to be 0.1, 0.04, 0.05, 0.08. This is divided into train (0.4), validation (0.1) and test (0.5).

Model topology:

Input               -->                  Hidden layer               -->                    Output layer

8 nodes                                              1 node

Activation function:                                  selu                                             linear

Batch size = 32, Number of epochs = 128, loss function = mean squared error

Optimizer: Nadam ( learning rate = 0.00001, beta_1 = 0.8, beta_2 = 0.85)

Normalized the target sine signal of NN by dividing by its maximum value.

Plot of predicted output by neural network, applied input signal & residual error given in 1st attachment. These weights of the model in the final epoch have been saved to h5 file and then loaded & tested with simulated data of 4 sine waves with amplitudes and frequencies changing with time from their initial values by random uniform noise ranging from 0 to 0.05. Plot of predicted output by neural network, target signal of sine waves & residual error given in 2nd attachment. The actual signal can be got from predicted output of NN by multiplication with normalization constant used before. However, even though network fits training  & validation sets efficiently, it gives a comparatively large error on test data of varying amplitude & frequency.

Gautam suggested to try training on this noisy data of varying amplitudes and frequencies. The results using the same model of NN is given in Attachment 3. It was found that tuning the number of nodes, layers or learning rate didn't improve fitting much in this case.

Attachment 1: nn_simulation_2_normalized_mult_sin_nodes8_128epochs_lr0p00001_beta1_0p8_beta2_0p85_0p4train_0p1valid_marked.pdf
Attachment 3: nn_simulation_2_normalized_varying_mult_sin_nodes8_128epochs_lr0p00001_beta1_0p8_beta2_0p85_0p4train_0p1valid_marked.pdf
14114   Sun Jul 29 23:15:34 2018 poojaUpdateCamerasDeveloping CNN

Aim: To develop a convolutional neural network that resolves mirror motion from video.

Input : Previous simulated video of beam spot motion in pitch by applying 4 sine  waves of frquencies 0.2, 0.4, 0.1, 0.3 Hz  and amplitude ratios to frame size to be 0.1, 0.04, 0.05, 0.08 where random uniform noise ranging 0.05 has been added to amplitudes and frequencies. This is divided into train (0.4), validation (0.1) and test (0.5).

Model topology:

• Number of filters = 2
• Kernel size = 2
• Size of pooling windows = 2
•                                        ----->         Dense layer of 4 nodes  ---->    Output layer of 1 node

Activation:                      selu                                                  linear

Batch size = 32, Number of epochs = 128, loss function = mean squared error

Optimizer: Nadam ( learning rate = 0.00001, beta_1 = 0.8, beta_2 = 0.85)

Plots of CNN output & applied signal given in Attachment 1. The variation in loss value with epochs given in Attachment 2.

This needs to be further analysed with increasing random uniform noise over the pixels and by training CNN on simulated data of varying ampltides and frequencies for sine waves.

Attachment 1: conv_nn_varying_freq_amp_1.pdf
Attachment 2: conv_nn_varying_freq_amp_2.pdf
1   Wed Oct 17 18:46:33 2007 ranaConfigurationGeneraleLog Change
This is the first entry in the new 40m eLog.

Its GWs or bust now!

[Hnull][/Hnull]
2   Thu Oct 18 14:52:35 2007 ranaRoutineASCtest
test

X-(:P;(:))
9   Tue Oct 23 09:01:00 2007 ranaOtherOMCPZT calibration/ transfer function.
Are you sure that the error signal sweep is not saturated on the top ends? This is usually the downfall
of this calibration method.
13   Thu Oct 25 00:01:21 2007 ranaSoftware InstallationCDSGEO DV => LIGO DV
Martin Hewitson of GEO600 fame has modified the cool GEO DV
to work with the LIGO NDS system with some NDS advice from Rolf (who's over in Germany this week).

I've moved it onto the 40m CDS system and installed it on the AdhikariLab computer named 'django'. It worked immediately.

I modified the main .m file to include the 40m's NDS server. When you run it you have to include the path to the NDS
client written by Ben Johnson.

The attached is a screenshot of it working on a Mac; it looks as cool on Linux.

Its installed in /cvs/cds/caltech/apps/ligoDV/. In matlab you navigate to that directory and then

Then type ligoDV to start it up. Then click away and have fun.

In the example I've selected
C1:PEM-BS_ACC_EAST_Z
and plotted its specgram.

Attachment 1: Picture_1.png
22   Sun Oct 28 03:03:42 2007 ranaConfigurationIOOThree Way Excitement
We've been trying to measure the MC mirror internal mode frequencies so that we can measure
their absorption before and after drag wiping.

It looked nearly impossible to see these modes as driven by their thermal excitation level;
we're looking at the "MC_F" or 'servo' output directly on the MC servo board.

Today, I set up a band limited noise drive into the 'Fast POS' inputs of the 3 MC coil
driver boards (turns out you can do this with either the old HP or the SR785).

Frequencies:
MC1     28.21625 kHz
MC2     28.036   kHz
MC3     28.21637 kHz


I don't really have this kind of absolute accuracy. These are just numbers read off of the SR785.

The other side of the setup is that the same "MC_F" signal is going into the SR830 Lock-In which
is set to 'lock-in' at 27.8 kHz. The resulting demodulated 'R" signal (magnitude) is going into

As you can see from the above table, MC1 and MC3 are astonishingly and annoyingly very close in
frequency. I identified mirrors with peaks by driving one at a time and measuring on the spectrum
analyzer. I repeated it several times to make sure I wasn't fooling myself; it seems like they
are really very close
but distinct peaks. I really wish we had chipped one of these mirrors
before installing them.

Because of the closeness of these drumhead modes, we will have to measure the absorption by making long
measurements of this channel.
29   Tue Oct 30 00:47:29 2007 ranaOtherIOOMC Ringdowns
I did a bunch of MC ringdown measurements using the PD that Rob set up. The idea is to put a fast PD (PDA255)
looking at the transmission through MC2 after focusing by a fast lens. The input to the MC is turned off fast
by flipping the sign of the FSS (Andri Gretarsson's technique).

With the laptop sitting on the MC can, its easy to repeat many ringdowns fast:
- Turn off the MC autolocker. Relock the MC with only the acquisition settings; no boosts
and no RGs. This makes it re-acquire fast. Turn the MC-WFS gain down to 0.001 so that
it keeps it slowly aligned but does not drift off when you lose lock.

- Use low-ish gain on the FSS. 10 dB lower than nominal is fine.

- Setup the o'scope (100 MHz BW or greater) to do single shot trigger on the MC2 trans.

- Flip FSS sign.

- Quickly flip sign back and waggle common gain to get FSS to stop oscillating. MC
should relock in seconds.

Clearly one can scriptify this all just by hooking up the scope to the ethernet port.

Attached are a bunch of PNG of the ringdowns as well as a tarball with the actual data. A sugar
napoleon to whomever can explain the 7 us period of the wiggle before the vent!
Attachment 1: tek00000.png
Attachment 2: tek00001.png
Attachment 3: tek00004.png
Attachment 4: MC2ringdown.tar.gz
34   Wed Oct 31 08:33:54 2007 ranaProblem FixedSUSVent measurements
There was a power outage during the day yesterday; whoever was around should post something here about the
exact times. Andrey and David and Tobin got the computers back up - there were some hiccups which you can

We restarted a few of the locking scripts on op340m: FSSSlowServo, MCautolocker. Along with the updates
to the cold restart procedures we have to put an entry in there for op340m and a list of what scripts
to restart.

David tuned up the FSS Slow PID parameters a little; he and Andrey will log some entry about the proper
PID recipe very soon. We tested the new settings and the step response looks good.

We got the MC locking with no fuss. The 5.6 EQ in San Francisco tripped all of the watchdogs and I upped
the trip levels to keep them OK. We should hound Rob relentlessly to put the watchdog rampdown.pl into
the crontab for op340m.
35   Wed Oct 31 08:34:35 2007 ranaOtherIOOloss measurements
In the end, we were unable to get a good scatter measurement just because we ran out of steam. The idea was to get a frame
grab image of MC2 but that involves getting an unsaturated image.

In the end we settle for the ringdowns, Rob's (so far unlogged) cavity pole measurement, and the MC transmission numbers. They
all point to ~100-150 ppm scatter loss per mirror. We'll see what happens after wiping.
36   Wed Oct 31 08:38:35 2007 ranaProblem FixedIOOMC autolocker
The MC was having some trouble staying locked yesterday. I tracked this down to some steps in the last
half of the mcup script; not sure exactly which ones.

It was doing something that made the FAST of the PSL go to a rail too fast for the SLOW to fix.
So, I broke the script in half so that the autolocker only runs the first part. We'll need to
fix this before any CM locking can occur.

We also need someone to take a look at the FSS Autolocker; its ill.
61   Sun Nov 4 23:55:24 2007 ranaUpdateIOOFriday's In-Vac work
On Friday morning when closing up we noticed that we could not get the MC to flash any modes.
We tracked this down to a misalignment of MC3. Rob went in and noticed that the stops were
still touching. Even after backing those off the beam from MC3 was hitting the east edge of
the MC tube within 12" of MC3.

This implied a misalignment of MC of ~5 mrad which is quite
large. At the end our best guess is that either I didn't put the indicator blocks in the
right place or that the MC3 tower was not slid all the way back into place. Since there
is such a strong stickiness between the table and the base of the tower its easy to
imagine the tower was misplaced.

So we looked at the beam on MC2 and twisted the MC3 tower. This got the beam back onto the
MC2 cage and required ~1/3 if the MC3 bias range to get the beam onto the center. We used
a good technique of finding that accurately: put an IR card in front of MC2 and then look
in from the south viewport of the MC2 chamber to eyeball the spot relative to the OSEMs.

Hitting MC2 in the middle instantly got us multiple round trips of the beam so we decided
to close up. First thing Monday we will put on the MC1/MC3 access connector and then
pump down.

Its possible that the MC length has changed by ~1-2 mm. So we should remeasure the length
and see if we need to reset frequencies and rephase stuff.
62   Mon Nov 5 07:29:35 2007 ranaUpdateIOOFriday's In-Vac work
Liyuan recently did some of his pencil beam scatterometer measurements measuring not the
BRDF but instead the total integrated power radiated from each surface point
of some of the spare small optics (e.g. MMT, MC1, etc.).

The results are here on the iLIGO Wiki.

So some of our loss might just be part of the coating.
91   Sun Nov 11 21:05:55 2007 ranaHowToSUSMC Touching or not
I wrote a script: SUS/freeswing-mc.csh, which gives the MC mirrors the appropriate kicks
needed to make a measurement of the free swinging peaks in the way that Sonia did.
#!/bin/csh

set ifo = C1
set sus = ${ifo}:SUS- foreach opt (MC1 MC2 MC3) set c = ezcaread -n${sus}${opt}_PD_MAX_VAR ezcastep${sus}${opt}_PD_MAX_VAR +300 ezcaswitch${sus}${opt}_ULCOIL OFFSET ON ezcawrite${sus}${opt}_ULCOIL_OFFSET 30000 sleep 1 ezcawrite${sus}${opt}_ULCOIL_OFFSET 0 sleep 1 ezcawrite${sus}${opt}_ULCOIL_OFFSET 30000 sleep 1 ezcawrite${sus}${opt}_LATCH_OFF 0 ezcawrite${sus}${opt}_ULCOIL_OFFSET 0 ezcaswitch${sus}${opt}_ULCOIL OFFSET OFF ezcawrite${sus}${opt}_PD_MAX_VAR$c

end

echo
date
echo


It basically ups the watchdog threshold, wacks it around at the pendulum frequency, and then disables the
optic so that there are no electronic forces applied to it besides the bias. The date command at the end
is so that you know when to start your DTT or mDV or lalapps code or whatever.
92   Sun Nov 11 21:21:04 2007 ranaHowToComputersNew DV
To use the new ligoDV (previously GEO DV) to look at 40m data, open up a matlab, set up for mDV as usual,
and then from the /cvs/cds/caltech/apps/ligoDV/ directory, type 'ligoDV'.

Then select which NDS server you want to look at and then start clicking to get some plots.
Attachment 1: Screenshot-1.png
128   Wed Nov 28 04:21:46 2007 ranaUpdatePSLFSS

 Quote: Rana, Tobin We looked at the RF PD signal to the FSS (siphoning off a signal via a minicircuits directional coupler) and also took an open loop transfer function of the FSS. In the transfer function we saw the step at 100 kHz (mentioned by Rob) as well as some peculiar behavior at high frequency. The high frequency behavior (with a coupling of ~ -20 dB) turns out to be bogus, as it is still present even with the beam blocked. Rearranging the cabling had no effect; the cause is apparently inside the FSS. The step at 100 kHz turns out to be a saturation effect, as it moved as we lowered the signal amplitude, disappearing as we approached -60 dBm. (Above the step, the measurement data is valid; below, bogus.) Transfer functions will be attached to this entry. Some things to check tomorrow: the RF signal to the PC, RF AM generation by the PC, LO drive level into the FSS, RF reflection from the PC, efficiency of FSS optical path, quality of RF cabling.

I would also add to Tobin's entry that we believe what Rob was seeing was saturation.

With the bi-directional coupler in there, the RF signal into the FSS board clearly went UP if moved the offset slider away from zero.
With a scope looking at the IN2 testpoint, we can see that there's less than 2 mV offset at zero slider offset.

One tangential thing we noticed with the coupler is that, in lock, the amount of reflected RF is around the same as that going in to the mixer.
I have always wanted to look at this but have only had uni-directional couplers in the past. I think that the double balanced mixer is inherently
not a 50 Ohm device during the times where the diodes are being switched. IF that's the case we might do better in the future by having an RF
buffer on board just before the mixer to isolate the PD head from these reflections.
132   Wed Nov 28 16:46:28 2007 ranaConfigurationComputersscientific linux 5.0
I tried installing Scientific Linux on Tiramisu. The installation process was so bad (really)
that I quit after 15 minutes. Its back to booting Ubuntu as if nothing had ever happened. Let
us never speak of Scientific Linux again.
133   Wed Nov 28 17:15:26 2007 ranaConfigurationSUSETMY damping / watchdogs
Steve has noted that ETMY was often tripping its watchdog. I saw this again today.

So I checked the damping settings. Someone had set the SIDE gain to +1. The gain which gives
it a Q of ~10 is +10. I set the SIDE gain to +20. I checked and the ETMX gain is -16 so now
they're at least similar. I have updated the snapshot to reflect the new value.

Hopefully now it will be more well behaved.
143   Thu Nov 29 19:35:14 2007 ranaHowToComputer Scripts / ProgramsGPIB Scripts

 Quote: I've spent a lot of time trying to configurate the GPIB-USB interface for the HP4195. After installing 1) the Agilent libraries, 2) the drivers, 3) the matlab Instrument Toolbox, 4) Jamie script, 5) Alice's script the computer can see the HP but still they can't 'talk' to each other. I give up. I asked Alice Wang how she managed to get data. I'm not sure she used the GPIB interace. Rob said she might have used the old fashion floppy disks that we can't read anymore here. I would really appreciate any suggestion by anyone who happened to have the same problems.

Alice and Jamie used the USB-GPIB interface. You should just try using the black laptop which already has this capability or ask Jamie Rollins
who actually knows something.
147   Fri Nov 30 19:11:05 2007 ranaConfigurationElectronicsETMX oplev dead again
I removed the ETMX HeNe and put in on a test table and it fired up fine. In its
previous location the light on the HeNe power supply was not lighting up. If
that's still on over the weekend we'l blame the power strip; the HeNe is a JDS
2.7 mW laser from 2002.
148   Fri Nov 30 19:29:14 2007 ranaConfigurationSUSnew screen
Andrey is working on a new screen to show us the drift of the optics by alarming on
their osem values. You can find it under SUS as 'Drift Mon' from the site map.

To aid in this I ran the following csh commands which effect all optics:
foreach opt (ETMX ETMY ITMX ITMY MC1 MC2 MC3 BS PRM SRM)
foreach dof (POS PIT YAW)
ezcawrite C1:SUS-${opt}_SUS${dof}_INMON.PREC 0
end
end


149   Fri Nov 30 19:46:58 2007 ranaConfigurationComputersEPICS Time Bad again
The time on the EPICS screens is off by 10 minutes again. Por Que?

Its because the ntpd on scipe25 wasn't restarted after the last boot. If someone
knows how to put the ntpd startup into that machine, please do so.

This time I started it up by just going sshing in as controls and then entering:

sudo /usr/sbin/ntpd -c /etc/ntp.conf

which runs it as root and points to the right file.

It takes a few minutes to get going because all of the martian machines have to first fail to
connect to the worldwide pool servers (e.g. 0.pool.ntp.org) before they move on and try linux1
which has a connection to the world. Once it gets it you'll see the time on the EPICS screens
freeze. It then waits until the ntp time catches up with its old, wrong time before updating
again.

According to the Wikipedia, this time is then good to 128 ms or less.
152   Fri Nov 30 21:27:24 2007 ranaDAQPEMweather / stacis / c1pem1
I was trying to add some Seis BLRMS channels to the c1pem1 processor so that we could have DMT trends.

Then I found that none of the Weather channels have been working for a year or so. I could also not
telnet into it. I tried resetting it but no luck. There was no entry in the Wiki for it so I added
a place holder.

Have the weather channels ever worked? Do we have those sensors? I think I've never actually looked
for this. Seems like a fine ugrad job.
153   Sun Dec 2 17:37:33 2007 ranaOmnistructureComputersNetwork Cabling in the Office
We all know that we've spent many integrated man hours trying to figure out why our network connections
in the office area don't work. Usually its because of the bad hub around the Tobin/Osamu desk.

I pried open some of the wall conduit today and it looks pretty easy to fish cables through. I think
its time we finally did that. It may be a little disruptive, but I propose we get Larry to come over
and figure out what needs to happen for us to get regular 100 Mbit ports on the walls. These can
then all go over and get connected to a switch in the rack that holds linux1.

154   Sun Dec 2 21:02:12 2007 ranaConfigurationIOOMC SUS re-alignment
The spot on MC2 was not centered, so I put it back in the center:

• Made sure MC trans was high with the WFS off.
• Moved the Sliders on the MC Align screen until spot was centered (by eye)
• Moved some more until power was maximized.
• Unlock MC
• Center spots on McWFS
• Re-enable autolocker and McWFS loops.
155   Sun Dec 2 21:07:39 2007 ranaConfigurationIOOMC SUS re-alignment
you asked for:   diff 2007/12/01,4:58:48 2007/12/03,4:58:48 utc 'MC.*COMM'
LIGO controls: differences, 2007 12/01 04:58:48 utc vs. 2007 12/03 04:58:48 utc
__Epics_Channel_Name______   __Description__________   __value1____     __value2____
C1:SUS-MC1_YAW_COMM                                    -0.273460        -0.503460
C1:SUS-MC2_PIT_COMM                                     3.624020         3.632020
C1:SUS-MC2_YAW_COMM                                    -0.936800        -1.038800
C1:SUS-MC3_YAW_COMM                                    -3.129000        -3.369000
156   Sun Dec 2 21:13:16 2007 ranaConfigurationIOOMC SUS re-alignment
Attachment 1: e.png
157   Mon Dec 3 00:10:42 2007 ranaDAQComputer Scripts / Programslinemon
I've started up one of our first Matlab based DMT processes as a test.

There's a matlab script running on Mafalda which is measuring the height of the 60 Hz peak
in the MC1 UL SENSOR and writing it to an unused EPICS channel (PZT1_PIT_OFFSET).

The purpose of this is just to see if such a thing is stable over long periods of time. Its
open on a terminal on linux3 so it can be killed at any time if it runs amok.

Right now the code just demods the channel and tracks the absolute value of the peak. The
next upgrade will have it track the actual frequency once per minute and then report that
as well. We also have to figure out how to make it a binary and then make a single script
that launches all of the binaries.

For now you can watch its progress on the StripTool on op540m; its cheap and easy DMT viewer.
160   Mon Dec 3 19:06:49 2007 ranaDAQComputer Scripts / Programslinemon
I turned up my nose at Matlab's special tools. I modified the linetracker to use the
relationship phase = 2*pi*f*t to estimate the frequency each minute. The
code uses 'polyfit' to get the mean and trend of the unwrapped phase and then determines
how far the initial frequency estimate was off. It then uses the updated number as the
initial guess for the next minute.

I looked at a couple hours of data before letting it run. It looks like the phase of the
'60 Hz' peak varies at 20 second time scales but not much faster or rather anything faster
would be a glitch and not a monotonic frequency drift.

From the attached snapshot you can see that the amplitude (PZT1_PIT) varies by ~10 %
and the frequency by ~40 mHz in a couple hour span.
Attachment 1: spd64d1.jpg
170   Wed Dec 5 19:25:07 2007 ranaDAQCDSDMF
I made a database file on C1AUX called dmf.db. It has 9 DMF EPICS channels which are also trended
so that one can now write data to those channels from a DMF Monitor and the data will be records.

New channels:
[C1:DMF-SEIS_1]
[C1:DMF-SEIS_2]
[C1:DMF-SEIS_3]
[C1:DMF-LINE_1]
[C1:DMF-LINE_2]
[C1:DMF-LINE_3]
[C1:DMF-MC_1]
[C1:DMF-MC_2]
[C1:DMF-MC_3]

I added these to C1AUX because it doesn't do much and can be booted without having much effect.
(it controls Mech Shutters, Video, and Illuminators. It used to also do the EO Shutter but I
removed that from its startup.cmd and it will no longer load those records).
ELOG V3.1.3-