text:
40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log, Page 141 of 339 Not logged in
ID Date Author Type Category Subject
7977   Thu Jan 31 15:56:38 2013 RijuUpdate Photodiode transimpedance

Summary: Measurement and plot of shot-noise-intercept-current for PDA10CF.

Motivation:It is to measure the shot noise intercept current for PDA10CF.

Result: The final plot is attached here. The plot suggests that the value of shot-noise-intercept current is 0.21mA

Discussion:

The plot is for the measured data of Noise voltage (V/sqrt(Hz)) vs DCcurrent(A). The fitted plot to this measured data follows the noise equation

Vnoise = gdet* sqrt[ 2e (iDC+idet)] ,  where gdet= transimpedance of the PD in RF region as described in manual of PDA255 (i.e. 5e3 when it is not in High-impedance region).

To get an approximate idea of the shot noise intercept current, we may follow the same procedure described in 7946

In the present case dark-noise is 4.3e-08 V/sqrt(Hz)

Therefore dark current(in2) ~dark noise voltage/RF transimpedance = 8.6pA/sqrt(Hz)

Therefore the approximate shot noise intercept current ~ (8.6/18)^2=0.22mA

This value matches well with the fitted data.

From PDA10CF manual, NEP=1.2e-11W/sqrt(Hz) and responsivity~0.9A/W. Therefore the noise current level will be ~10pA.

Attachment 1: shotnoiseinterceptpda10cf.pdf
7984   Fri Feb 1 14:47:17 2013 RijuUpdate Photodiode transimpedance

Summary: Measurement and plot of shot-noise-intercept-current for MC REFL PD.

Motivation:It is to measure the shot noise intercept current for MC REFL PD.

Result: The final plot is attached here. The plot suggests that the value of shot-noise-intercept current is 0.041mA

Discussion:

The plot is for the measured data of Noise voltage (V/sqrt(Hz)) vs DCcurrent(A). The fitted plot to this measured data follows the noise equation

Vnoise = gdet* sqrt[ 2e (iDC+idet)] ,  where gdet= transimpedance of the PD in RF region as described in manual of PDA255 (i.e. 5e3 when it is not in High-impedance region).

To get an approximate idea of the shot noise intercept current, we may follow the same procedure described in 7946

In the present case minimum noise value is 2.03e-08 V/sqrt(Hz)

Therefore dark current(in2) ~dark noise voltage/RF transimpedance = 4.06pA/sqrt(Hz)

Therefore the approximate shot noise intercept current value is (4/18)^2 ~ 0.049mA, which is close to the fitted value.

... hard to believe these numbers. Wrong DC transimpedance? (KA)

Attachment 1: shotnoiseinterceptmcreflpd.pdf
8027   Thu Feb 7 19:24:57 2013 RijuUpdate Photodiode transimpedance

Summary: Measurement and plot of shot-noise-intercept-current for MC REFL PD.

Motivation:It is to measure the shot noise intercept current for MC REFL PD.

Result: The final plot is attached here. The plot suggests that the value of shot-noise-intercept current is 1.9mA

Discussion:

The plot is for the measured data of Noise voltage (V/sqrt(Hz)) vs DCcurrent(A). The fitted plot to this measured data follows the noise equation

Vnoise = gdet* sqrt[ 2e (iDC+idet)] ,  where gdet= transimpedance of the PD in RF region ~600

To get an approximate idea of the shot noise intercept current, we may follow the same procedure described in 7946

In the present case minimum noise value is 1.46e-08 V/sqrt(Hz)

Therefore dark current(in2) ~dark noise voltage/RF transimpedance ~25pA/sqrt(Hz)

Therefore the approximate shot noise intercept current value is (25/18)^2 ~ 1.92mA, which matches well to the fitted value.

Attachment 1: reflshotnoise.pdf
8186   Wed Feb 27 17:43:54 2013 RijuUpdate Photodiode transimpedance

Here is the transimpedance for the other PD used for MC REFL

Attachment 1: TFnewreflpd.pdf
Attachment 2: NewREFL_z.pdf
8188   Wed Feb 27 18:17:05 2013 RijuUpdate Photodiode transimpedance

 Quote: How much is the exact resonant frequency? And what's the unit of the plot? The resonant "transimpedance" in the unit of Ohm can not be ~100.

The exact resonant frequency is 29.38MHz. I ve uploaded the other plot. It was the output of Vectfit.

8189   Wed Feb 27 18:38:51 2013 RijuUpdate Photodiode transimpedance

Quote:

 Quote: How much is the exact resonant frequency? And what's the unit of the plot? The resonant "transimpedance" in the unit of Ohm can not be ~100.

The exact resonant frequency is 29.38MHz. I ve uploaded the other plot. It was the output of Vectfit.

Is the DC transimpedance now 10010 Ohm? I ve used 50 Ohm. Which one is correct?

8484   Wed Apr 24 14:24:40 2013 RijuUpdate PD frequency response

Here I am attaching the first schematic diagram of the PD frequency response set-up, I will keep updating it with relevant informations with the progress of the work.

Description: Our objective is to set-up one simultaneous transfer-function measurement system for all the RF-PDs present in 40m lab. A diode laser will be used to illuminate the PDs. The diode laser output will be divided by 1x16 fiber splitter and will be sent to all the PDs through single-mode fiber. The transfer function of the PDs will be measured using network analyzer(Agilent 4395A). The output of the PDs will be fed to network analyzer via one RF-switch. The diode laser will be controlled by the controller ILX LDC 3744C. The scanning frequency signal will be fed to this controller from network analyzer through its external modulation port. The output of the controller will be splitted  into two parts: one will go to laser diode and the other will be used as reference signal for network analyzer.

Attachment 1: PD_freq_resp.pdf
8488   Thu Apr 25 00:59:37 2013 RijuUpdateRF SystemPD frequency response

 Quote: I think you have the splitter that splits the RF signal from the network analyzer in the wrong place.  Usually you split the signal immediately after the RF Out, so that half of the signal goes to the A-input of the Analyzer, and the other half goes to your controller (here, the laser diode controller).  Then you would take the output of your controller and go straight to the actual laser diode, with no splitting in this path.

Here our device under test is the photodiode. So for the reference I wanted to retain the response of the laser diode controller. Otherwise I have to consider the transfer function of that LDC too. I may check both the options at the time of experiment.

Thanks

8492   Thu Apr 25 17:56:28 2013 RijuConfiguration PD frequency response

[Eric, Riju]

Today we have routed the fibers from 1x16 fiber splitter to POX table for POX11 PD and POP55 PD. Also we labeled the fibers on AP table, they have been fixed on the table. The photo of the table after work is attached here. We will do it for POX table tomorrow.

Attachment 1: IMG_0495.JPG
8497   Fri Apr 26 17:08:42 2013 RijuConfiguration PD frequency response

 Quote: No.... what I told was to put the roll next to the splitter, not on the table. The table area is more precious than the rack space. Koji> The slack of the fibers should be nicely rolled and put together at the splitter side.

Ok, will do it on the coming week.

8506   Mon Apr 29 17:26:22 2013 RijuConfigurationRF SystemPD frequency response

Today I have rerouted the fibers on AP table to remove the fiber rolls out of the AP table.  I removed the fibers one by one from both ends - from the 1x16 splitter and from the AP table - keeping the fiber roll intact, and then connected it in reverse way, i.e. the fiber end which was on AP table now is connected to the splitter (since length of the outside the roll is shorter that side) and the fiber end connected to splitter is now rerouted on AP table.

We need to keep the fibers in such a fashion so that no sharp bending occurs anywhere, and also it does not get strained due to its weight, particularly near the 1x16 splitter. Jenne suggested to use a plastic box over the splitter rack to keep the fiber rolls for time-being. We discussed a lot how this can be done nicely; in future we may use array of hooks, Koji suggested to use cable hangers and to tie the rolls using more than one hanging point, Jenne suggested to use the bottom shelf of the rack or to use one plastic box with holes. We tried to make holes on the plastic box using drill, but it developed crack on the box. So ultimately I used the opened box only and put it over the rack.

The corresponding photographs are attached herewith.

Tomorrow we will reroute the fibers for POX table.

Attachment 1: IMG_0504.JPG
Attachment 2: IMG_0503.JPG
Attachment 3: IMG_0505.JPG
Attachment 4: IMG_0506.JPG
Attachment 5: IMG_0508.JPG
Attachment 6: IMG_0509.JPG
Attachment 7: IMG_0510.JPG
8512   Tue Apr 30 19:39:14 2013 RijuConfigurationRF SystemPD frequency response

Today I have rerouted the fibers on POX table. The aim was to lay it overhead through the plastic pipe. A pipe ~50ft (~15.5m) long was taken for this purpose. I disconnected the two 25m long fibers for POP55 and POX11 PD (those had been already routed) from both of their ends - i.e. from the POX table and also from 1x16 splitter. Jenne and Koji suggested that we may have another two PDs ( POP22 and POP110) on POX table in future. So we used another 25m long fiber for these two (POP22/POP110). We could not use two fibers for these two since we have only four 25m long fibers and one of them we need for POY11 PD on POY table. Jenne and me put the three fibers inside the pipe using a copper tube. The tube then was put on the overhead rack, Manasa helped me to do it. The fiber ends were finally laid on the POX table at one end and connected to the 1x16 splitter at the other end.

The corresponding photos are attached herewith.

Attachment 1: IMG_0511.JPG
Attachment 2: IMG_0512.JPG
Attachment 3: IMG_0513.JPG
Attachment 4: IMG_0514.JPG
Attachment 5: IMG_0515.JPG
8520   Wed May 1 17:36:26 2013 RijuConfigurationRF SystemPD frequency response

Today I routed fiber from 1x16 splitter to POY table. Manasa helped me doing that. The fiber(25m) was laid on overhead rack through plastic pipe of length ~76ft. We put the fiber inside the pipe using one copper tube, and then tied the plastic pipe on the overhead rack. Finally one end of the fiber was laid on POY table and the other end was connected to the 1x16 splitter. The photographs corresponding are attached. There is no picture of splitter end, cause it was dark that time.

Attachment 1: IMG_0517.JPG
Attachment 2: IMG_0518.JPG
Attachment 3: IMG_0519.JPG
8573   Tue May 14 19:52:58 2013 RijuConfigurationRF SystemPD frequency response

[Eric, Riju, Annalisa]

Today we have cleared up the fiber spool near AP table. We have put the 1x16 fiber splitter and a box (we made two openings on it) for fiber spool on a different part of the rack. Also put a plastic tubing or the fibers coming out of AP table. Now the fibers coming out from AP table and also from POX table first enter the box through one opening and the end of the fibers come out of the other opening to get connected to to splitter. Photographs of the work are attached. I don't think enough fiber is there to make a similar loop for fiber coming from POY table.

Attachment 1: IMG_0520.JPG
Attachment 2: IMG_0521.JPG
7486   Thu Oct 4 23:01:49 2012 RijuparnaConfiguration cavitymode scan

Here I am attaching the schematic diagram of the experimental set-up for IMC cavitymode scanning. A 30- 45MHz scanning signal generated by Agilent 4395A network analyzer enters EOM, which in turn modulates the laser beam entering IMC. The cavity response can be verified from reflected/transmitted beam.

I worked with the reflected beam last days. But I got no clue about the percentage of  reflected light reaching the photodiode and also the photodiode response. I would like to measure the power reaching photodiode and also would like to perform the test with transmitted beam - on wednesday if possible.

Attachment 1: diagram1.pdf
7519   Wed Oct 10 15:31:59 2012 RijuparnaUpdate cavitymode scan

Rijuparna, Jenne

Today I checked the optical lay-out in MC REFL board of the MC REFL path on the AS table (I will put the updated diagram in a few hours), and took a record of the reflected power of unlocked MC and power entering MC REFL PD. The power coming out of MC cavity when unlocked is 1.25W and power entering REFL PD 112mW (Jenne measured these powers for me).

I also got a description of the MC demodulation board from Jenne.

(Edits by Jenne)

7537   Fri Oct 12 15:31:03 2012 RijuparnaConfiguration cavitymode scan

Rijuparna, Manasa

Today I have checked the optical layout of the MC transmission RFPD table and measured the laser powers at different points. Manasa helped me for that. I found the power entering the RF photodiode is 0.394mW while the transmitted power of the cavity is 2.46mW. (I will give the diagram later).

7351   Thu Sep 6 17:06:25 2012 Rijuparna ChakrabortyConfigurationelogCavitymode scan

Aim: to scan the cavitymodes of IMC

The circuit used:

Attachment4

Results obtained:

Attachment 1,2,3

Attachment 1: 3.pdf
Attachment 2: 2.pdf
Attachment 3: 1.pdf
Attachment 4: cavityscanconnections.pdf
7363   Fri Sep 7 15:58:29 2012 Rijuparna ChakrabortyUpdate cavitymode scan

IMC transmission photodiode has been aligned.

7368   Sat Sep 8 00:15:57 2012 Rijuparna ChakrabortyUpdate cavitymode scan

Quote:

 Quote: IMC transmission photodiode has been aligned.

Which PD?  The 'regular' DC one, or the newer one?  Why did it need realigning?  What mirrors did you touch to do the alignment?

Did you do anything else in the last 3 days?  I want to see ALL the gory details, because it can help people doing future measurements, or help us debug if something is wrong with the interferometer later.

MORE WORDS! Thanks.

No, not the "regular DC one", the "newer one"  along with the controls of the corresponding mirror only i touched.

It needed to be realigned cause last week when we fitted a longer cable there, which may reach the network analyzer, it got misaligned since it got touched.

No other component in that box except that PD and the corresponding mirror controls I touched.

For my last 2 days work, I feel my last elog is reliable.

Today other than doing this, I checked for the higher order modes of the cavity, misaligning one of the MC mirror though the software only. I didn't mention it in my elog cause although I saw the presence of the higher order modes I didn't record it, so I can not upload any picture in support of such a statement.

Thanks

7376   Wed Sep 12 19:26:08 2012 Rijuparna ChakrabortyUpdate cavitymode scan

Summary: Recorded the presence of higher order modes in IMC

What I did: Misaligned the flat mirror MC1 by small amount in both pitch and yaw (it was needed to be done cause at the beginning of the experiment no higher order modes were present)  and scanned the cavity for frequency-range 32MHz to 45MHz.

I found the presence of higher order modes around 36.7MHz (1st order)  and 40.6MHz (2nd order) along with two other strong modes near 35MHz and 42.5MHz.

Attachment 1: P120912_11.32.jpg
Attachment 2: P120912_14.13.jpg
Attachment 3: P120912_14.17.jpg
Attachment 4: P120912_11.25.jpg
Attachment 5: P120912_14.09.jpg
Attachment 6: P120912_14.30.jpg
Attachment 7: P120912_14.34.jpg
603   Mon Jun 30 14:07:26 2008 RobConfigurationPSLDon't put the bin in front of the air conditioning unit

 Quote: We spotted that the laser power was dropping.

the offending configuration:
Attachment 1: DSC_0140.png
1306   Sun Feb 15 15:53:21 2009 RobUpdateLSCLocking status

 Quote: I didn't get a chance to do much testing since the sus controller (susvme1) went nuts. In retrospect, this could be due to something in the script, so maybe we should try a burt restore to Friday afternoon next time someone wants to look at it.

I tried the burt restore today, it didn't work. Also tried some switching of timing cables, and multiple reboots, to no avail. This will require some more debugging. We might try diagnosing the clock driver and fanout modules, the penteks, and we can also try rebooting the whole FE system.
623   Wed Jul 2 13:56:10 2008 Rob, Yoichi, JohnUpdateLocking24.5 Hz resonance
Work continues on trying to reduce the CARM offset using dc signals from PO_DC. Got up to arm powers of
~35 last night.

We found that progress was stymied by an oscillation around 24 Hz. This oscillation was clearly visible
in the intensity of the light at REFL, PO and TrX.

Initially we suspected that this oscillation was due to an instability in the CARM loop. We attempted to
solve the problem by tuning the crossover frequncy of the AO and MC_L paths and shaping the MC_L loop to
reduce the impact of the 24 Hz noise.

After some quick tests we found that the 24 Hz signal was present even when dc CARM was used. It appears
that the peak is in fact due to a SOS mechanical resonance. We currently suspect a roll mode.

We're going to check that PRC, MICH and DARM have filters to attenuate the 24 Hz line. We'll also look at the
SUS_POS bandstop filters to see where they are centred.

The ISS was behaving strangely again. Constantly saturated at 5dB of gain. Someone needs to look a this.
Attachment 1: locking080702.png
630   Thu Jul 3 13:12:32 2008 Rob, Yoichi, JohnUpdateLockingMore oscillations
Bounce/ roll filters were added to the short degrees of freedom to reduce the effect of the 24Hz line seen on Tuesday night.

However last night saw the arrival of a new oscillation at ~34Hz. This may be the second harmonic of the MOS roll mode. Reducing the arm offset would cause this oscillation to ring up and break the lock (first plot). This effect was repeatable.

No signal was seen in the oplevs or osems which leads us to rule out alignment problems, at least for now.

Although one can clearly see DARM_ERR increasing as arm power increases adding a resonant gain in the DARM loop had no effect.

We also noticed that x arm transmission was significantly more noisy than the Y (second plot). And showed greater coherence with the increase in DARM noise. Investigations showed that the PD was not the source of the difference.

Turning up the MC gain seems to help a little.

We're now looking at POX as a candidate for RF_CARM (third plot).
Attachment 1: LOL.png
Attachment 2: NoisyX080702.png
Attachment 3: POXforCARM080702.png
13823   Mon May 7 20:01:14 2018 RorpheusUpdateGeneralUse anti-dewhitening + show CARMA/DARMA

example of plots illustrating DAC range / saturation

6422   Thu Mar 15 08:48:40 2012 RyanSummaryCDSSummary of Syracuse Visit to 40m Mar 5-9 2012

## JIMS Channels in PEM Model

The PEM model has been modified now to include the JIMS(Joint Information Management System) channel processing. Additionally Jim added test points at the outputs of the BLRMS.

For each seismometer channel, five bands are compared to threshold values to produce boolean results.  Bands with RMS below threshold produce bits with value 1, above threshold results in 0.  These bits are combined to produce one output channel that contains all of the results.

A persistent version of the channel is generated by a new library block that called persist which holds the value at 0 for a number of time steps equal to an EPICS variable setting from the time the boolean first drops to zero. The persist allows excursions shorter than the timestep of a downsampled timeseries to be seen reliably.

The EPICS variables for the thresholds are of the form (in order of increasing frequency):
C1:PEM-JIMS_GUR1X_THRES1
C1:PEM-JIMS_GUR1X_THRES2
etc.

The EPICS variables for the persist step size are of the form:
C1:PEM-JIMS_GUR1X_PERSIST
C1:PEM-JIMS_GUR1Y_PERSIST
etc.

The JIMS Channels are being recorded and written to frames:

The two JIMS channels at 2048:
[C1:PEM-JIMS_CH1_DQ] Persistent version of JIMS channel. When bit drops to zero indicating something bad (BLRMS threshold exceeded) happens the bit stays at zero  for >= the value of the persist EPICS variable.
[C1:PEM-JIMS_CH2_DQ] Non-persistent version of JIMS channel.

And all of the BLRMS channels at 256:
Names are of the form:
[C1:PEM-RMS_ACC1_F0p1_0p3_DQ]
[C1:PEM-RMS_ACC1_F0p3_1_DQ]

For additional details about the JIMS Channels and the implementation, please see the previous elog entries by Jim.

## Conlog

I have a working aLIGO Conlog/EPICS Log installed and running on megatron.

Please see this wiki page for the details of use:
https://wiki-40m.ligo.caltech.edu/aLIGO%20EPICs%20log%20%28conlog%29

https://wiki-40m.ligo.caltech.edu/Computer_Restart_Procedures#megatron

Please see Ryan's previous elog entries for installation details.

## Future Work

• Determine useful thresholds for each band
• Generate MEDM Screens for JIMS Channels
• Add a decimation option to channels
• Add EPICS Strings in PEM model to describe bits in JIMS Channels
• Implement a State Log on Megatron: Will Provide a 1Hz index into JIMS Channels
• Generate a single web page that allows access to aLIGO Conlog/EPICS Log and State Log

6518   Wed Apr 11 12:25:11 2012 RyanUpdateComputersUpdating aLIGO Conlog

Over the next few days, I will be working on upgrading the aLIGO Conlog install to include new bugfixes distributed by Patrick T.  The currently running conlog *should* not be affected, but please let me know if it is (ryan.fisher@ligo.org).

6539   Tue Apr 17 10:55:50 2012 RyanUpdateComputersUpdating aLIGO Conlog

 Quote: Over the next few days, I will be working on upgrading the aLIGO Conlog install to include new bugfixes distributed by Patrick T.  The currently running conlog *should* not be affected, but please let me know if it is (ryan.fisher@ligo.org).

The upgrade to the aLIGO Conlog is completed.  The conlog is once again running on megatron in a screen session. (see http://nodus.ligo.caltech.edu:8080/40m/6396)

6373   Wed Mar 7 13:59:07 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:

In order to install the necessary extensions to epics to make the aLIGO conlog work, I have edited one file in the base epics install that affects makefiles:

/cvs/cds/caltech/apps/linux64/epics/base/configure/CONFIG_COMMON

Jamie said he prefers diffs, so I regenerated the original file and did a diff against the current file:

megatron:configure>diff CONFIG_COMMON.orig.reconstructedMar72012 CONFIG_COMMON.bck.Mar72012
206,207c206,210
< USR_CPPFLAGS =
< USR_DBDFLAGS =
---
> USR_CPPFLAGS = -I $(EPICS_BASE)/include > USR_CPPFLAGS += -I$(EPICS_BASE)/include/os/Linux/
> USR_CPPFLAGS += -I $(EPICS_BASE)/../modules/archive/lib/linux-x86_64/ > USR_DBDFLAGS = -I$(EPICS_BASE)/dbd
> USR_DBDFLAGS += -I $(EPICS_BASE)/../modules/archive/dbd This is saved in CONFIG_COMMON.diff.Mar72012_1 6377 Wed Mar 7 18:00:39 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:  Quote: In order to install the necessary extensions to epics to make the aLIGO conlog work, I have edited one file in the base epics install that affects makefiles: /cvs/cds/caltech/apps/linux64/epics/base/configure/CONFIG_COMMON Jamie said he prefers diffs, so I regenerated the original file and did a diff against the current file: megatron:configure>diff CONFIG_COMMON.orig.reconstructedMar72012 CONFIG_COMMON.bck.Mar72012 206,207c206,210 < USR_CPPFLAGS = < USR_DBDFLAGS = --- > USR_CPPFLAGS = -I$(EPICS_BASE)/include > USR_CPPFLAGS += -I $(EPICS_BASE)/include/os/Linux/ > USR_CPPFLAGS += -I$(EPICS_BASE)/../modules/archive/lib/linux-x86_64/ > USR_DBDFLAGS = -I $(EPICS_BASE)/dbd > USR_DBDFLAGS += -I$(EPICS_BASE)/../modules/archive/dbd This is saved in CONFIG_COMMON.diff.Mar72012_1

After following up with Patrick Thomas for a while trying to make the extensions to epics work within the currently installed epics, he decided that we should just start over with a fresh install of epics 3.14.10.

I am installing this in /ligo/apps/linux-x86_64/epics/base-3.14.10/

Prior to all of this, I had done a lot of installation and configuration of the packages needed to make LAMP work:

sudo apt-get install lamp-server^

I then continued to follow the instructions on Patrick's wiki:

https://awiki.ligo-wa.caltech.edu/aLIGO/Conlog#EDCU_library

I installed the c_string library into /ligo/apps/linux-x86_64/ according to his instructions.  (prior to my installs, there was no /ligo/ on this machine at all, so I made the needed parent directories with the correct permissions).

That should be everything up to installing epics (working on that now).

6387   Thu Mar 8 17:18:19 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:
I have the aLIGO Conlog 'working' at http://192.168.113.209/conlog/conlog.php

The process is running inside a screen on megatron.

To start it running, you need to set your environment, and then run the startup.c1conlog script :

cd /cvs/cds/rtcds/caltech/c1/target/conlog/conlogepics

source conlog_environment.txt

./startup.c1conlog

This will leave you at an epics prompt, which means the code is running. (that's why I left it running in a screen for now).

To change the list of channels when the conlog is running, you need to edit the file (s):

/ligo/caltech/data/conlog/c1/remove_channel_names

Then start up medm as follows:

cd ~/ryan/

Then click the Add channel list button or Remove channel list button.

To change the channels before running the conlog from a blank database, you would edit:
/ligo/caltech/data/conlog/c1/use_channel_names (I believe this should be read whenever the conlog is restarted, but I'm only sure it does the first time you start conlog).

Documenting the rest of the installation:

## Successful? Installation of Fresh EPICS and Extensions

### Fresh Copy of EPICS 3.14.10

* We restarted (on Patrick's suggestion) with a fresh copy of EPICS 3.14.10 in:
/ligo/apps/linux-x86_64/epics
* I had to set a clean environment:
* Then I downloaded the tarball, unpacked it, and simply ran make within it, and it worked!
* Next, I followed Patrick's wiki instructions with only modifications to the configure/RELEASE files for the archive and ioc/conlog extensions.
* Then I realized that I had to rebuild conlog ioc after adding a directory:
/ligo/apps/linux-x86_64/epics/iocs/conlog/iocBoot/iocc1_conlog
* I had to copy the files from the h1 directory and modify them so that all reference to h1 now point to c1 in the new directory
* I then rebuilt the conlog ioc (I had to make sure setenv SCRIPTS was run again because I had logged out and back in, and I reset the whole environment properly again)

## Rest of Install

* I was able to fairly trivially follow through the rest of the installation steps on Patrick's wiki, up to the "Design" section.
* Now, there is no obvious way to move forward (nothing is actually running I believe).

## New Install Instructions:

"
You want to create the EPICS IOC boot directory by doing the following:

In the top level of the IOC (.../epics/iocs/conlog) with the appropriate
paths:

/epics/base/bin/linux-x86_64/makeBaseApp.pl -i -t ioc c1_conlog
What application should the IOC(s) boot?
The default uses the IOC's name, even if not listed above.
Application name? conlog

Then you will have to update the st.cmd it creates. You can compare the
st.cmd and st.cmd.backup files in the other directories to see what needs
to be changed.

I don't know if just copying the directory will work, it might.

You will also probably want to change the following line in
/epics/modules/archive/archiveApp/src/drvArchive.c:

queue = epicsMessageQueueCreate(100000000, sizeof(struct message_type));

and reduce 100000000 to something smaller depending on the amount of ram
available to the computer. I think sizeof(struct message_type) is
something like 112 bytes. Then recompile.

You basically put a file with the list of channels to use in the directory
path for "use channel list filepath" in the following command in st.cmd:
channel list filepath>,<use channel list filepath>
I can send you the script that I currently use to generate that channel
list if you want, but it may need to be changed for your setup.

Once you start the ioc, open the medm which can be checked out from
with macro substitution for IFO: medm -x -macro "IFO=C1"
and click on the button for "Use channel list".
The number of monitored channels should increase to the number of channels
in the file.

-Patrick

...

The perl script and example file are attached, just redirect the output of
the perl script to a file. It scans autoBurt.req files in a particular
directory and its subdirectories for channel names that meet certain
criteria. All the file contains is a list of channel names, one on each
line. To start the IOC, go to the target directory and run
./startup.c1conlog.

"

{{rpfisher:scan_autoburt.pl.txt|scan_autoburt.pl.txt}}

{{rpfisher:use_channel_names.txt|use_channel_names.txt}}

### My Notes Regarding These Instructions:

* Throughout the installation instructions, it probably should have been made clear that the ifo is lowercase: eg c1 (but in the end the installation mixed C1 and c1 in different places)
* Also throughout, one should be careful to replace lho with your site (eg caltech) wherever it appears
* After running the first perl script to generate the iocBoot/iocc1_conlog directory, the goal is to rebuild the whole conlog ioc by running make from epics/iocs/conlog, but before doing that:
* I needed to change the suggested line in the archive module to match the correct RAM size of the machine I am installing on (I actually gave it just less than half the free RAM), then:
* Remake the archive module
* Change into the ioc/conlog directory, remove the iocBoot I had made before for c1, rerun the perl script above, then run make from the ioc/conlog directory.
* Once that is done, you need to edit the file st.cmd to add lines for the reading and writing of channels, such as:
drvArchive_mysql "C1_conlog","/data/mysql/C1_conlog_epics_user"
drvArchive_write_channel_list_filepaths "/ligo/caltech/data/conlog/c1/channel_names","/ligo/caltech/data/conlog/c1/monitored_channel_names","/ligo/caltech/data/conlog/c1/unmonitored_channel_names"
* I also had to rerun this set of commands once that was all done:
controls: cd /opt/rtcds/<site>/<ifo>/target/conlog/conlogepics
controls: cp -r /ligo/apps/linux-x86_64/epics/iocs/conlog/db ./
controls: cp -r /ligo/apps/linux-x86_64/epics/iocs/conlog/dbd ./
controls: cp /ligo/apps/linux-x86_64/epics/iocs/conlog/iocBoot/ioc<ifo>_conlog/envPaths ./
controls: cp /ligo/apps/linux-x86_64/epics/iocs/conlog/iocBoot/ioc<ifo>_conlog/st.cmd ./
controls: echo ./bin/linux-x86_64/conlog st.cmd > startup.<ifo>conlog
controls: chmod a+x startup.<ifo>conlog
* This set of instructions seemed to be lacking, so I added this:

cp -r /ligo/apps/linux-x86_64/epics/iocs/conlog/bin/ ./

* Now the executable runs but doesn't work:
* Fixes needed:
* Need to use root permissions and make sure the files in /data/mysql have the right names for the users the code expects and also have the right passwords. (have to match capitalization appropriately for the <ifo> tag everywhere
* Might need to go into mysql and add a new user with the proper capitalization also
* Need to edit the ld_library_path to point to the new epics libraries (see the suggested environment below)
* Now, the code seems to work, but dumps me at an "epics> " prompt, I'm asking Patrick what to do next.
* I was impatient and loaded up the medm screen, and found out that the one channel I had picked was not readable (unmonitored)
* I ran a modified version of Patrick's perl script to search autoBert files for channels, and replaced my use_channel_names file with the output of the script
* Now, the medm screen shows lots of monitored channels, and the conlog is filling up! (can see it from phpmyadmin)
* Next step: I wanted to get the php pages working, so I edited the files inside /var/www/conlog:
megatron:~/ryan>diff -u /var/www/conlog/conlog.php /var/www/conlog/conlog.php.bck.Mar82012_1
--- /var/www/conlog/conlog.php  2012-03-08 15:31:53.152547771 -0800
+++ /var/www/conlog/conlog.php.bck.Mar82012_1   2012-03-08 15:28:23.062704171 -0800
@@ -19,7 +19,7 @@
<form action="query.php" method="post">
<h3><label for="database">Database:</label></h3>
<select id="database" name="database">
-                       <option value="C1_conlog">C1</option>
+                       <option value="h2_conlog">h2</option>
</select>

<h3><label for="included_channels">Included channels:</label></h3>

megatron:~/ryan>diff -u /var/www/conlog/query.php /var/www/conlog/query.php.bck.Mar82012_1
--- /var/www/conlog/query.php   2012-03-08 15:33:45.122550303 -0800
+++ /var/www/conlog/query.php.bck.Mar82012_1    2012-03-08 15:32:31.772554679 -0800
@@ -168,8 +168,8 @@
}

$database_name =$_POST["database"];
-       if ($database_name == 'C1_conlog') { -$server = '192.168.113.209';
+       if ($database_name == 'h2_conlog') { +$server = 'cdsconlog';
}
else {
die('Unknown database.');

* Finally, the mysql server was denying access from outside queries, so I fixed that:
megatron:~/ryan>diff -u /etc/mysql/my.cnf /etc/mysql/my.cnf.bck.Mar82012_1
--- /etc/mysql/my.cnf   2012-03-08 15:35:57.122548370 -0800
+++ /etc/mysql/my.cnf.bck.Mar82012_1    2012-03-08 15:35:10.652559315 -0800
@@ -49,7 +49,7 @@
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#
# * Fine Tuning
#
megatron:~/ryan>
* Now, I think everything is working * almost:
* It seems that when you first start the conlog up, it finds all the variables and inserts values of "Null" for everything, but after that it detects changes properly!

## Conlog Environment

Need to source this to use the new environment:

megatron:~>cat ~/ryan/conlog_enviroment.txt
6391   Fri Mar 9 11:02:56 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:

# Too Many Fast Changing EPICS in New Conlog

I have been monitoring the new conlog, and it already has far too many rows.

I'm going through the list of channels to exclude in the update_channels script for the conlog that is currently running and removing them from
the monitored channels in the new conlog using the remove_channel_names file and the medm screen (we may want to just wipe out the tables
and start over after this is set properly, but for now I'm keeping them):
#-- Exclude a few uninteresting or obsolete categories
if ( $chan =~ m/^[BIJ]$/ ||
$chan =~ m/IOO-MC_PWR_IN/ ||$chan eq "C1:PSL-FSS_SLOWDC" ||
$chan =~ m/PSL-STAT_.*_BITS/ ||$chan =~ m/:IOO-PZTM[12]_(PIT|YAW)_BIAS$/ ||$chan =~ m/DAQ.*_cycle/ ||
$chan =~ m/DAQ.*rtSeconds/ ||$chan =~ m/C1:-.*/ ||
$chan =~ m/C1:SUP/ ||$chan =~ m/C1:SP/ ||
$chan =~ m/C1:X/ ||$chan =~ m/C1:TST/ ||
$chan =~ m/C1:RF/ ||$chan =~ m/C1:UCT/ ||
$chan =~ m/C1:DU/ ||$chan =~ m/C1:MCP/ ||
$chan =~ m/C1:MCS/ ||$chan =~ m/C1:FEC/ ||
$chan =~ m/C1:PEM/ ||$chan =~ m/C1:LSP/ ||
$chan =~ m/C1:NIO/ ||$chan =~ m/C1:WFS/ ||
$chan =~ m/C1:ASC-WFS/ ||$chan =~ m/C1:ASC-SP/ ||
$chan =~ m/C1:VG/ ||$chan =~ m/C1:IOO-DOF/ ||
$chan =~ m/C1:IOO-EO/ ||$chan =~ m/Name/ ||
$chan =~ m/DEFAULTNAME/ ||$chan =~ m/:IOO-PZT.*OFFSET/ ||
$chan =~ m/PD_VAR$/ ||
$chan =~ m/_INMON$/ ||
$chan =~ m/_EXCMON$/ ||
$chan =~ m/_OUT16$/ ||
$chan =~ m/_OUTMON$/ ||
$chan =~ m/_OUTPUT$/ ||
$chan =~ m/_RSET$/ ||
$chan =~ m/_ALIVE$/ ||
$chan =~ m/VMon$/ ||
$chan =~ m/PDMon$/ ||
_STAT|State_Bits|INDCOFFSET)/ )

With these removals, only 15493 channels are being monitored now.
6394   Fri Mar 9 15:48:56 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:

I decided to make a backup of the database and then delete it and make a new database:

cd ~/ryan/database_dumpMar92012
mysqldump -u root -p C1_conlog > C1_conlog.dump.Mar92012
Note: it appears this failed the first time, thankfully this wasn't a production service yet... In the future, do not trust this backup method for important data!

Next, log into mysql as root, dump the database, remake it and grant privileges again.:
(This is saved in megatron:~/ryan/restore_database.txt
megatron:~/ryan>mysql -u root -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 174
Server version: 5.1.41-3ubuntu12.10 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> list databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'list databases' at line 1
mysql> list users;      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'list users' at line 1
mysql> use C1_conlog
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> list users;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'list users' at line 1
mysql> select User from mysql.user;                                             +------------------+
| User             |
+------------------+
| php              |
| C1_conlog_epics  |
| c1_conlog_epics  |
| root             |
| C1_conlog_epics  |
| c1_conlog_epics  |
| debian-sys-maint |
| root             |
| root             |
+------------------+
9 rows in set (0.00 sec)

mysql> show databases;                                                          +--------------------+
| Database           |
+--------------------+
| information_schema |
| C1_conlog          |
| mysql              |
+--------------------+
3 rows in set (0.00 sec)

mysql> drop database C1_conlog ;
Query OK, 2 rows affected (0.56 sec)

mysql> create database C1_conlog;
Query OK, 1 row affected (0.00 sec)

mysql> use C1_conlog ;
Database changed
mysql> SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> CREATE TABLE channels (
->   channel_id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
->   channel_name varchar(60) NOT NULL,
->   PRIMARY KEY (channel_id),
->   UNIQUE KEY channel_name (channel_name)
-> ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.04 sec)

mysql>
mysql> CREATE TABLE data (
->   acquire_time decimal(26,6) NOT NULL,
->   channel_id mediumint(8) unsigned NOT NULL,
->   value varchar(40) DEFAULT NULL,
->   status tinyint(3) unsigned DEFAULT NULL,
->   connected tinyint(1) unsigned NOT NULL,
->   PRIMARY KEY (channel_id,acquire_time)
-> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.03 sec)

mysql> grant select, insert, update, execute on * to 'c1_conlog_epics'@'127.0.0.1';  Query OK, 0 rows affected (0.00 sec)
mysql> grant select, insert, update, execute on * to 'C1_conlog_epics'@'127.0.0.1';   Query OK, 0 rows affected (0.00 sec)
mysql> grant select, insert, update, execute on * to 'c1_conlog_epics'@'localhost';  Query OK, 0 rows affected (0.00 sec)
mysql> grant select, insert, update, execute on * to 'C1_conlog_epics'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> grant select on C1_conlog to 'php'@'%';
ERROR 1146 (42S02): Table 'C1_conlog.C1_conlog' doesn't exist
mysql> grant select on * to 'php'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> select * from mysql.users
-> ;
ERROR 1146 (42S02): Table 'mysql.users' doesn't exist
mysql> select User from mysql.user;
| C1_conlog_epics  |
| c1_conlog_epics  |
| root             |
| C1_conlog_epics  |
| c1_conlog_epics  |
| debian-sys-maint |
| root             |
| root             |
+------------------+
9 rows in set (0.00 sec)

mysql> Bye

Next, I decided that I want to index on the acquire_time instead of the combination of channel_id and acquire_time (I think it makes a lot of sense for several query types, and especially debugging the conlog!):
mysql> create index acquire_time_index on data(acquire_time);
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

## Next Fix:

The above worked well, but when I restarted the conlog, I had to re-execute the "remove_channels" from the medm, because initially all channels were being loaded (use_channel_names had all the channels still).
Additionally, there were a lot of channels with "*RMS*" in the name that were being recorded, and were changing relatively quickly, so I have added those to the remove_channel_names file.

I am going to: Backup the files in /ligo/caltech/data/conlog/c1
Edit use_channel_names to only have the good channels.
Dump the database again
Stop conlog.
Wipe the database again.
Remake the database again (with permissions and the new index).
Restart the conlog and hope!

## The fix above seems to be in place and working. The database has the initial entries for the channels it monitors and is not growing without operators changing EPICs values.

6396   Fri Mar 9 16:28:10 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:
I created a page on the wiki for the new EPICS log (conlog):
https://wiki-40m.ligo.caltech.edu/aLIGO%20EPICs%20log%20%28conlog%29

I also edited this with restart instructions:
https://wiki-40m.ligo.caltech.edu/Computer_Restart_Procedures#megatron
6404   Tue Mar 13 13:28:31 2012 Ryan FisherUpdateCDSDAQ restart with new ini file
Extra note: This was the ini file that was edited:
/cvs/cds/rtcds/caltech/c1/chans/daq/C1PEM.ini
7001   Mon Jul 23 07:39:55 2012 Ryan FisherSummaryComputer Scripts / ProgramsAlterations to base epics install for installing aLIGO conlog:
Note: The Conlog install instructions that I started from were located here:
https://awiki.ligo-wa.caltech.edu/aLIGO/Conlog
5729   Mon Oct 24 17:23:14 2011 SUS_DiagonalizerUpdateSUSOptics kicked
This is a cron-elog test. No optics have been kicked.
5766   Sun Oct 30 23:03:37 2011 SUS_DiagonalizerUpdateSUSSUS input matrix diagonalization complete (EXAMPLE)
New SUS input matrix diagonalization complete. Matrices have been written to the frontend. Summaries for each optic can be viewed below.

(THIS IS AN EXAMPLE---no new matrices have been written.)
Attachment 1: MC1.png
Attachment 2: MC2.png
Attachment 3: MC3.png
Attachment 4: ETMX.png
Attachment 5: ETMY.png
Attachment 6: ITMX.png
Attachment 7: ITMY.png
Attachment 8: PRM.png
Attachment 9: SRM.png
Attachment 10: BS.png
7523   Wed Oct 10 21:50:39 2012 SUS_DiagonalizerUpdateSUSOptics kicked
All suspended optics have been kicked at Wed Oct 10 21:50:39 PDT 2012. Watchdogs will be reengaged in 90 minutes.
7524   Thu Oct 11 00:22:58 2012 SUS_DiagonalizerUpdateSUSOptics kicked

 Quote: All suspended optics have been kicked at Wed Oct 10 21:50:39 PDT 2012. Watchdogs will be reengaged in 90 minutes.

New SUS input matrix diagonalization complete.
10008   Mon Jun 9 09:51:11 2014 Sai AkhilUpdateElectronicsFrequency Error Measurement of UFC-6000 RF Frequency Counter

Motivation:

To test the precision of Mini-Circuits Model UFC-6000 RF Frequency Counter which will be used for recording the beat note for the Frequency Offset Locking Loop(FOLL).

Setup:

Mini Circuits RF Frequency Counter Model UFC-6000 has three I/O ports:
1)REF IN,2)USB INTERFACE,3)RF IN.
The USB INTERFACE is connected to the PC(Windows/Linux) through a USB cable.
The test RF input from an SRS Function Generator(Model DS 345 with tested precision up to 1mHz)is fed in through RF IN using an SMA cable with an SMA-BNC adaptor to connect to the Function Generator.
The REF IN is open since we want to test the counter.

What I did:

1. First interfaced the counter with the PC with windows OS.

2. Installed the user friendly GUI on my Laptop so as to record the data from the counter into a .txt file.

3. Gave an RF input through the function generator and recorded the response of the counter for different frequencies ranging from 1MHz to 30MHz.

4.Analyzed the collected data by plotting the histograms(attached) in Matlab(script attached in .zip file)

What was Expected:

The measurement statistics of the instrument would give knowledge about the error and tolerance in the measurement which will be helpful to negotiate the error when the counter is being used in the setup.

Results:

The obtained plots(for sampling time of 1s) are attached in a figure.
The measurement error of the frequency counter for 1s sampling time is:

data file     Frequency       Mean in MHz            Standard Error(+/-)in Hz
1MH.txt            1MHz            0.999999846             0.0109
5MHz.txt          5MHz            5.000000293             0.0134
10MHz.txt       10MHz         10.00000148              0.0108
15MHz.txt       15MHz         15.0000018                0.0072
20MHz.txt       20MHz         20.00000053              0.0259
30MHz.txt       30MHz         30.00000146              0.0230

The measurement error of the UFC-6000 RF Frequency Counter is in the order of 0.01-0.02 Hz. This error varies at different frequencies as inferred from the table.
The error for different sampling times of the FC are also plotted.

Plan:

To complete interfacing the counter with the Raspberry-pi.
Make this Frequency Counter talk to EPICS through slow channels.

Attachment 1: Data_and_Script_Files.zip
Attachment 2: Error_Measurement_FC.pdf
Attachment 3: Error_freq.jpg
14058   Thu Jul 12 15:15:47 2018 SandrineUpdate Beat Note Measurements for Cavity Scans

(Gautam, Sandrine)

We calculated the expected power of the beat note for Annalisa's Y arm cavity scans.

Beat Note Measurement

We began by calculating the transmitted power of the PSL and AUX. We assumed that the input power of the PSL was 25 mW and the input power of the AUX was 250 uW. We also assumed a loss of 25 ppm for the ITM and ETM. We used T1 = 0.0138 and T2 = 25 x 10-6.

$P_{t} = \frac{t _{1}^{2}t_{2}^{2}}{1+r_{1}^{2}r_{2}^{2}-2r_{1}r_{2}}$

$t = \sqrt{T}$

$r = \sqrt{1-T-L} = {\sqrt{R}}$

The transmitted power of the PSL is approximately 100 uW, and the transmitted power of the AUX is approximately 0.974 uW.

$P_{t}^{PSL} = 100 uW$                          $P_{t}^{AUX} = 0.974 uW$

The beat note was calculated with the following:

$P_{beat} = 2\sqrt{P_{PSL}P_{AUX}} = 20 uW$

The  expected beat note should be approximately 20 uW.

14103   Wed Jul 25 14:45:59 2018 SandrineSummaryThermal CompensationETM Y Table AUX read out

Attached is a photo of the set up of the ETM Y table showing the AUX read out set up.

Currently, the flip mount sends the AUX to the PDA255. Terra inserted a razor blade so the PDA255 will witness more HOMs. The laser is also sent to the regular PD and the CCD.

Attachment 1: EY_table_.JPG
14109   Fri Jul 27 17:16:14 2018 SandrineUpdateThermal CompensationCopied working scripts for mode spectroscopy into new directory (modeSpec)

The scripts: AGfast.py, make HDF5.py, plotSpec_marconi.py, and SandrineFitv3.py were copied into the new directory modeSpec.

The path is: /opt/rtcds/caltech/c1/scripts/modeSpec

These scripts can still be found under Annalisa's directory under postVent.

15510   Sat Aug 8 07:36:52 2020 Sanika KhadkikarConfigurationCalibration-RepairBS Seismometer - Multi-channel calibration

Summary :

I have been working on analyzing the seismic data obtained from the 3 seismometers present in the lab. I noticed while looking at the combined time series and the gain plots of the 3 seismometers that there is some error in the calibration of the BS seismometer. The EX and the EY seismometers seem to be well-calibrated as opposed to the BS seismometer.

The calibration factors have been determined to be :

BS-X Channel: $\dpi{150} \small {\color{Blue} 2.030 \pm 0.079 }$

BS-Y Channel: $\dpi{150} \small {\color{Blue} 2.840 \pm 0.177 }$

BS-Z Channel: $\dpi{150} \small {\color{Blue} 1.397 \pm 0.182 }$

Details :

The seismometers each have 3 channels i.e X, Y, and Z for measuring the displacements in all the 3 directions. The X channels of the three seismometers should more or less be coherent in the absence of any seismic excitation with the gain amongst all the similar channels being 1. So is the case with the Y and Z channels. After analyzing multiple datasets, it was observed that the values of all the three channels of the BS seismometer differed very significantly from their corresponding channels in the EX and the EY seismometers and they were not calibrated in the region that they were found to be coherent as well.

Method :

Note: All the frequency domain plots that have been calculated are for a sampling rate of 32 Hz. The plots were found to be extremely coherent in a certain frequency range i.e ~0.1 Hz to 2 Hz so this frequency range is used to understand the relative calibration errors. The spread around the function is because of the error caused by coherence values differing from unity and the averages performed for the Welch function. 9 averages have been performed for the following analysis keeping in mind the needed frequency resolution(~0.01Hz) and the accuracy of the power calculated at every frequency.

1. I first analyzed the regions in which the similar channels were found to be coherent to have a proper gain analysis. The EY seismometer was found to be the most stable one so it has been used as a reference. I saw the coherence between similar channels of the 2 seismometers and the bode plots together. A transfer function estimator was used to analyze the relative calibration in between all 3 pairs of seismometers. In the given frequency range EX and EY have a gain of 1 so their relative calibration is proper. The relative calibration in between the BS and the EY seismometers is not proper as the resultant gain is not 1. The attached plots show the discrepancies clearly :
• BS-X & EY-X Transfer Function : Attachment #1
• BS-Y & EY-Y Transfer Function : Attachment #2

The gain in the given frequency range is ~3. The phase plotting also shows a 180-degree phase as opposed to 0 so a negative sign would also be required in the calibration factor. Thus the calibration factor for the Y channel of the BS seismometer should be around ~3.

• BS-Z & EY-Z Transfer Function : Attachment #3

The mean value of the gain in the given frequency range is the desired calibration factor and the error would be the mean of the error for the gain dataset chosen which is caused due to factors mentioned above.

Note: The standard error envelope plotted in the attached graphs is calculated as follows :

1. Divide the data into n segments according to the resolution wanted for the Welch averaging to be performed later.

2. Calculate PSD for every segment (no averaging).

3. Calculate the standard error for every value in the data segment by looking at distribution formed by the n number values we obtain by taking that respective value from every segment.

Discussions :

The BS seismometer is a different model than the EX and the EY seismometers which might be a major cause as to why we need special calibration for the BS seismometer while EX and EY are fine. The sign flip in the BS-Y seismometer may cause a lot of errors in future data acquisitions. The time series plots in Attachment #4 shows an evident DC offset present in the data. All of the information mentioned above indicates that there is some electrical or mechanical defect present in the seismometer and may require a reset. Kindly let me know if and when the seismometer is reset so that I can calibrate it again.

Attachment 1: BS_X-EY_X.png
Attachment 2: BS_Y-EY_Y.png
Attachment 3: BS_Z-EY_Z.png
Attachment 4: timeseries.png
1985   Fri Sep 11 17:11:15 2009 SanjitUpdateASSOAF: progress made

[Jenne & Sanjit]

Good news: We could successfully send filtered output to MC1 @ SUS.

We used 7 channels (different combinations of 3 seismometer and six accelerometer)

We tried some values of \mu (0.001-0.005) & gain on SUS_MC1_POSITION:MCL and C1ASS_TOP_SUS_MC1 (0.1-1).

C1:ASS-TOP_SUS_MC1_INMON is huge (soon goes up to few times 10000), so ~0.1 gains at two places bring it down to a reasonable value.

Bad news: no difference between reference and filtered IOO-MC_L power spectra so far.

Plan of action: figure out the right values of the parameters (\mu, \tau, different gains, and may be some delays), to make some improvement to the spectra.

** Rana: there's no reason to adjust any of the MCL gains. We are not supposed to be a part of the adaptive algorithm.

2160   Thu Oct 29 18:25:33 2009 SanjitUpdateAdaptive FilteringMore work on saving coeffs on the OAF screen

 Quote: [Sanjit,Jenne] Sanjit has been working today on trying to get the OAF coefficients to save properly.  Alex got us most of the way, but right now it's looking like the filter that is being saved is totally constant (all the values are the same).  We're poking around trying to figure out why this is.  Also, we're starting again (as we should have been for the last week or so since Alex came in to help us) to check in the TOP_XFCODE whenever we make changes to it, and when we recompile the front end code.

We are manually restarting assepics, but the terminal logs us out after sometime and ass may crash. I set autologout=0 in the terminal for the time being. Once the testing process is over, assepics will start automatically when the computer is turned on, so we wont have to worry about this.

(if ass crashes tonight, it is not unexpected!)

2171   Mon Nov 2 21:09:15 2009 SanjitUpdateAdaptive FilteringMore work on saving coeffs on the OAF screen

I made some changes in the code (all commented in the installed and SVN version) to print the filter coefficients. I got crazy output. Sometimes memory bugs lead to such crazy behavior. So far I could not find any bugs, but will have to spend more time on it.

2323   Tue Nov 24 18:24:54 2009 SanjitConfigurationAdaptive FilteringASS channels added to framebuilder

[Sanjit, Jenne, Rob, Joe]

We added and tested the following channels from "/cvs/cds/gds/param/tpchn_C3.par" to "/cvs/cds/caltech/chans/daq/C1ASS.ini" appending a "_2048" extension to the channel name (as the name of a channel in .ini and .par files must be different):

[C1:ASS-TOP_CORR_IN1_2048]
[C1:ASS-TOP_ERR_EMPH_IN1_2048]
[C1:ASS-TOP_PEM_10_IN1_2048]
[C1:ASS-TOP_PEM_11_IN1_2048]
[C1:ASS-TOP_PEM_12_IN1_2048]
[C1:ASS-TOP_PEM_15_IN1_2048]
[C1:ASS-TOP_PEM_16_IN1_2048]
[C1:ASS-TOP_PEM_17_IN1_2048]
[C1:ASS-TOP_PEM_18_IN1_2048]
[C1:ASS-TOP_PEM_19_IN1_2048]
[C1:ASS-TOP_PEM_20_IN1_2048]
[C1:ASS-TOP_PEM_24_IN1_2048]
[C1:ASS-TOP_PEM_2_IN1_2048]
[C1:ASS-TOP_PEM_3_IN1_2048]
[C1:ASS-TOP_PEM_4_IN1_2048]

These five-line entries for each channels in the .par file were manually copy pasted from the .ini file, should think about a smarter way...

The old .par file is kept as: /cvs/cds/caltech/chans/daq/C1ASS.ini.20Nov2009

The current one is also saved as: /cvs/cds/caltech/chans/daq/C1ASS.ini.24Nov2009

And, the current one is committed to the svn.

NOTE: In the first attempt, the channel names were mistakenly kept the same in both the .ini and .par files and this caused DAQ daemon to crash badly. It could only be recovered by hard reboot of the frame builder.  Important info here: Jenne's elog 2316

ELOG V3.1.3-


text:
## anonymous one year ago A particle moves with constant acceleration of 3.2 m/s2. At t = 4 s, it is at x = 110 m; at t = 6 s, it has a velocity v = 19 m/s. Find its position at t = 6 s.

use the equations of motion: $$x = ut + \frac{1}{2}at^2$$ $$v = u + at$$ plug in given information: $$110 = u (4) + \frac{1}{2}a (4)^2$$ $$19 = u + a(6)$$ you now have 2 unknowns and 2 equations, you can solve for u and a then find $$x(6)$$

format: plain


text:
# FFT Spectral Leakage

A MATLAB user recently contacted MathWorks tech support to ask why the output of fft did not meet their expectations, and tech support asked the MATLAB Math Team for assistance. Fellow Georgia Tech graduate Chris Turnes wrote a detailed response that I enjoyed reading. I thought it would be worth adapting the case for a blog post. Although the case is about the 1-D FFT, the underlying issues show up in image processing, too, and I have written about them in the past. (See my Fourier transform category.)
Let's set up the case by starting with a sine wave at 50 Hz, sampled at 1 kHz, with 4080 samples.
Fs = 1000;
N = 4080;
t = (0:(N-1))/Fs;
y = sin(2*pi*50*t);
plot(t,y)
axis([0 0.1 -1.2 1.2])
xlabel('t (sec)')
ylabel('y(t)')
grid on
title('The first 0.1 seconds of y(t)')
Next, let's compute and display the FFT, scaling the frequency axis so that it is in Hz, and scaling the magnitude by the square root of the FFT length.
Y = fft(y);
f = (Fs/N) * (0:N-1);
plot(f,abs(Y)/sqrt(N))
xlabel('Frequency (Hz)')
grid on
Let's zoom around the peak at 50 Hz.
xlim([45 55])
This all seems reasonable, so far. Now, let's try the procedure using only the first 4096 samples of $y(t)$. (That's approximately 4.1 seconds.)
N2 = 4096;
t2 = (0:(N2-1))/Fs;
y2 = sin(2*pi*50*t2);
Y2 = fft(y2);
f2 = (Fs/N2) * (0:N2-1);
plot(f2,abs(Y2)/sqrt(N2))
xlabel('Frequency (Hz)')
xlim([45 55])
grid on
That looks a lot different. Let's plot them together.
hold on
plot(f,abs(Y)/sqrt(N))
hold off
legend(["|Y_2|","|Y|"])
Hmm. The FFT of the signal with 4080 points has a clean, sharp peak at 50 Hz, whereas the FFT of the signal with 4096 points is much more spread out around that peak.
This was the tech support question: What is the explanation for the difference? Is there something wrong with the fft function for $N = 4096$?
Chris immediately provided a nice, conceptual explanation of what's going on here, and I'll get to that in a just bit. First, though, I want to go through a thought process I sometimes use when faced with similar questions. Is there an independent way to verify whether the function in question is returning the correct answer? Well, in this case, I know that the fft function computes something called the discrete Fourier transform, or DFT. For a discrete-time signal $y[n]$, defined over $0 \leq n < N$, the DFT is given by:
$Y[k] = \sum_{n=0}^{N-1} y[n] e^{-j 2 \pi k n / N}, k = 0, 1, \ldots, N-1$
The fft function doesn't compute the DFT using this formula because it is slow, but we can use the formula to double-check its output.
k = (0:N2-1);
n = k';
Y2p = sum(y2' .* exp(-1i * 2 * pi * k .* n / N2));
Y2 and Y2p are the same to within about 12 decimal digits of relative precision:
norm(Y2p - Y2)/norm(Y2)
ans = 7.9563e-13
That is well within the difference I would expect to see from ordinary floating-point round-off differences. But let's plot them together, just to be sure.
plot(f2,abs(Y2)/sqrt(N2),f2,abs(Y2p)/sqrt(N2))
grid on
xlim([45 55])
The two results are visually indistinguishable.
OK, at this point, then, I would be confident that fft is returning the correct answer. We can turn to the question of why the output appears to be so different just because we changed the total number of samples slightly. Let me hand it over to Chris, who provided following explanation:
This is just spectral leakage; it's a well-known and well-described problem in Fourier analysis. The discrete spectral frequencies sampled by the DFT of length N are (0:(N-1))/N. In the customer's case, the discrete frequency of his pure tone is not an integer multiple of $1/N$. As a result, the frequency content "leaks" into other bins.
Another way of seeing this is to recall that the DFT/FFT inherently assumes the input is a periodic signal. However, neither of the signals above, y and y2, contains an integer number of periods. You can see this if you plot the end of the signals instead of the beginning.
plot(t((end-50):end),y((end-50):end))
ylim([-1.2 1.2])
title('N = 4080')
grid on
plot(t2((end-50):end),y2((end-50):end))
ylim([-1.2 1.2])
title('N = 4096')
grid on
With $N = 4080$, the signal has just about completed its period at the end, so the last sample is almost equal to the first sample (which is 0). Therefore, the artifacts from the assumed periodicity aren't that strong. With 4096 samples, though, the signal ends with a quarter of its period still to go. There's a big jump from the last sample value (-1) to the first sample value (0). This big jump is like a discontinuity in the signal, and that spreads the spectral peak, resulting in more "leakage."
If everything lines up, then life becomes beautiful; with any integer $k\geq 2$, using $N=50k$ will result in the ideal spike we'd all like to see. For other lengths, however, where $50/1000$ can't be written as $q/N$ for an integer q, you'll get the spectral leakage phenomenon. The amplitude will dip and the peak will spread out. The result is not incorrect; it is the mathematically expected result, even if it does not match our initial intuition.
Thanks for letting me use your explanation, Chris!
|


text:
Taylorian points of an algebraic curve and bivariate Hermite interpolation
Annali della Scuola Normale Superiore di Pisa - Classe di Scienze, Série 5, Tome 7 (2008) no. 3, p. 545-577
We introduce and study the notion of Taylorian points of algebraic curves in ${ℂ}^{2}$, which enables us to define intrinsic Taylor interpolation polynomials on curves. These polynomials in turn lead to the construction of a well-behaved Hermitian scheme on curves, of which we give several examples. We show that such Hermitian schemes can be collected to obtain Hermitian bivariate polynomial interpolation schemes.
Classification:  41A05,  41A63,  46A32,  14Q05
@article{ASNSP_2008_5_7_3_545_0,
author = {Bos, Len and Calvi, Jean-Paul},
title = {Taylorian points of an algebraic curve and bivariate Hermite interpolation},
journal = {Annali della Scuola Normale Superiore di Pisa - Classe di Scienze},
publisher = {Scuola Normale Superiore, Pisa},
volume = {Ser. 5, 7},
number = {3},
year = {2008},
pages = {545-577},
zbl = {1177.41001},
mrnumber = {2466439},
language = {en},
url = {http://www.numdam.org/item/ASNSP_2008_5_7_3_545_0}
}

Bos, Len; Calvi, Jean-Paul. Taylorian points of an algebraic curve and bivariate Hermite interpolation. Annali della Scuola Normale Superiore di Pisa - Classe di Scienze, Série 5, Tome 7 (2008) no. 3, pp. 545-577. http://www.numdam.org/item/ASNSP_2008_5_7_3_545_0/

[1] B. Bojanov and Y. Xu., On polynomial interpolation of two variables, J. Approx. Theory 120 (2003), 267-282. | MR 1959868 | Zbl 1029.41001

[2] B. D. Bojanov, H. A. Hakopian and A. A. Sahakian, “Spline Functions and Multivariate Interpolations”, Mathematics and its Applications, Vol. 248, Academic Publishers Group, Dordrecht, 1993. | MR 1244800 | Zbl 0772.41011

[3] L. Bos, On certain configurations of points in ${𝐑}^{n}$ which are unisolvent for polynomial interpolation, J. Approx. Theory 64 (1991), 271-280. | MR 1094439 | Zbl 0737.41002

[4] L. P. Bos and J.-P. Calvi, Multipoint taylor interpolation, Calcolo 51 (2008), 35-51. | MR 2400160 | Zbl 1168.41301

[5] J.-P. Calvi and L. Filipsson, The polynomial projectors that preserve homogeneous differential relations: a new characterization of Kergin interpolation, East J. Approx. 10 (2004), 441-454. | MR 2101102 | Zbl 1113.41002

[6] D. Cox, J. Little and D. O'Shea, “Ideals, Varieties, and Algorithms”, Undergraduate Texts in Mathematics, Springer, New York, third edition, 2007. | MR 2290010 | Zbl 1118.13001

[7] C. De Boor and A. Ron, On multivariate polynomial interpolation, Constr. Approx. 6 (1990), 287-302. | MR 1054756 | Zbl 0719.41006

[8] C. De Boor and A. Ron, The least solution for the polynomial interpolation problem, Math. Z. 210 (1992), 347-378. | MR 1171179 | Zbl 0735.41001

[9] Lars Filipsson, Complex mean-value interpolation and approximation of holomorphic functions, J. Approx. Theory 91 (1997), 244-278. | MR 1484043 | Zbl 0904.32012

[10] M. Gasca and T. Sauer, Polynomial interpolation in several variables, Adv. Comput. Math. 12 (2000), 377-410. Multivariate polynomial interpolation. | MR 1768957 | Zbl 0943.41001

[11] H. A. Hakopian and M. F. Khalaf, On the poisedness of Bojanov-Xu interpolation, J. Approx. Theory 135 (2005), 176-202. | MR 2158529 | Zbl 1076.41002

[12] H. A. Hakopian and M. F. Khalaf, On the poisedness of Bojanov-Xu interpolation, II, East J. Approx. 11 (2005), 187-220. | MR 2151615 | Zbl 1247.46025

[13] F. Kirwan, “Complex Algebraic Curves”, London Mathematical Society Student Texts, Vol. 23, Cambridge University Press, Cambridge, 1992. | MR 1159092 | Zbl 0744.14018

[14] R. A. Lorentz, “Multivariate Birkhoff Interpolation”, Lecture Notes in Mathematics, Vol. 1516. ix, Springer-Verlag, 1992. | MR 1222648 | Zbl 0760.41002

[15] R. A. Lorentz, Multivariate Hermite interpolation by algebraic polynomials: A survey, J. Comput. Appl. Math. 122 (2000), 167-201. | MR 1794655 | Zbl 0967.65008

[16] M. G. Marinari, H. M. Möller and T. Mora, Gröbner bases of ideals defined by functionals with an application to ideals of projective points, Appl. Algebra Engrg. Comm. Comput. 4 (1993), 103-145. | MR 1223853 | Zbl 0785.13009

[17] H. M. Möller, Hermite interpolation in several variables using ideal-theoretic methods, In: “Constructive Theory of Functions of Several Variables”, Proc. Conf., Math. Res. Inst., Oberwolfach, 1976, Lecture Notes in Math., Vol. 571, Springer, Berlin, 1977, 155-163. | MR 493046 | Zbl 0347.41002


text:
# [OS X TeX] Good bye!

cormullion cormullion at mac.com
Sun Jan 30 12:31:54 EST 2005

Arno Kruse <arnokruse at macnews.de> said on 2005-01-30, 13:20 (+0100 GMT):

> and waked up bathed in sweat.

You have my sympathy. I’ve started TeX-ing last week and have been finding the learning curve precipitous to say the least. Nevertheless, I’ve been able to use my nice OS X fonts without problems.

To my surprise I found that the following TEX file worked for me immediately (after downloading _only_ tex-fat.dmg and Xetex) in TeXShop:

%&program=xelatex
%&encoding=UTF-8 Unicode

\documentclass[11pt]{article}
\usepackage{geometry}
\geometry{a4paper}
\font\1="Skia Regular" at 18pt
\font\2="Hoefler Text" at 12pt
\font\3="Times Roman" at 14pt
\font\4="Optima Bold" at 28pt
\font\5="Andale Mono" at 8pt

\begin{document}

\1 what do you think of this!

\2 and what do you think of this!

\3 and what do you think of this!

\4 this is one of my favourite fonts

\5 this is ideal for listings and stuff

\end{document}

(Will Robertson’s example didn’t work for me - presumably because I haven’t downloaded fontspec?).

I’m not too sure what you’re actually typing in those \font lines. Is it the display name, or the file name, or what?

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>


text:
# Is this integral correct?

I used substitution and got that: $$\int_0^\pi \sin x \cdot P_n(\cos x ) \, dx=0$$ where $P_n$ is the $n$-th Legendre polynomial.

• What integral you were calculating? – Mhenni Benghorbal Jul 23 '13 at 11:02
• Are you calculating $\int_{-1}^{1}P_0(t)P_n(t)dt$? – Mhenni Benghorbal Jul 23 '13 at 11:13

Recall that Legendre polynomials are defined as orthogonal polynomials on $[-1,1]$ with weight function $w(x)=1$. In other words, we have by definition $$(P_m,P_n)=\int_{-1}^1P_m(x)P_n(x)dx\sim \delta_{mn}.$$ But, since $P_0(x)=1$, your integral is equal to $(P_0,P_n)$ and therefore it vanishes whenever $n>0$. For $n=0$, however, it is equal to $2$.
• Thank you, but why is it equal to 2, I mean if my integral is $(P_0,P_n)$ then it should be equal to 1, as $(P_0,P_0)=1$ is the only one that survives? – user66906 Jul 23 '13 at 11:02
• @Lipschitz You are welcome! In fact, in front of the Kronecker symbol there is a factor $2/(2n+1)$. But here you don't even need to know it, just integrate $1$ from $-1$ to $1$. Of course, the result will reproduce $2/(2\cdot 0+1)$. – Start wearing purple Jul 23 '13 at 11:07
If you look at the Power reduction formulas for the cosine, you see that all monomials in your Legendre polynomial involve only cosines of integer multiples of $x$. These are odd functions on the interval $[0,\pi]$ while the sine function is even, thus their product must be odd and the integral is zero.
• I think the oddness is not quite true: e.g. $\cos2x=1-2\sin^2x$. – Start wearing purple Jul 23 '13 at 11:16


text:
# The Kelly Criterion in Applied Portfolio Selection - Part 2

### Previous blog post on the Kelly Criterion

As pointed out in a previous blog post, the Kelly Criterion is an interesting option to decide on position sizing in portfolio selection. While the previous post looked at single stocks, I will today show how to optimize position sizes for a portfolio with multiple stocks.

### The core function

At the core of my portfolio optimization is this function:

The function has three parameters. shares is the vector of shares (position size for each stock) that is going to be estimated by optimization. dpf is a matrix where each stock is a column and each line contains the daily stock price movements like e.g.: diff(stock)/lag(stock). The maxshare option can be used to restrict the position size of a single stock to a maximum.

exp_returns <- dpf%*%shares calculates the daily (or weekly) portfolio returns. obj is the Kelly Criterion. The higher the volatility, the larger values obj will take. We are going to minimize the function so low values, i.e. low volatility is preferred. The next line is a trick to restrict the optimizer to values that sum to 1 (100%). If the sum of all position sizes is 1, weight.penalty is 0 (the minimum possible value). Would the sum deviate from 1, the weight.penalty would quickly increase. The second penalty term is similar. If a position is sized above the maximum allowed share, the penalty scores. Finally the function returns a value which the optimizer will try to minimize.

### The wrapper function

Now to feed stock data into this function I wrote a wrapper function that prepares the matrix of returns and calls optim().

Most of the function is commented between the lines. I introduced two options: daily and short. The default values are, that short positions are not allowed and the returns are calculated on a weekly, not daily basis. One thing thats important for me is, that I dont use the stock returns as they are but I center them around the mean return that I expect. If I would not do this, the algorithm would always pick the historically best performing stock(s). However past performance is not a good predictor of future performance and one has to do his homework and build own (and realistic) expectations.

### Testing

To test the function I select some random stocks (not a recommendation to trade these stocks).

This tells the following story: Assuming all stocks have the same expected yearly return of 3%, the long term growth rate of wealth (Kelly Criterion) is achieved by investing in the stock with a lowest volatility (here GIS). At the same time this is a hint, that the assumption that all returns are to be expected as equal is too strong. One could now play with the function to find out how high the expected return of a risky stock has to be, to be included into an existing portfolio.

### Summary

I personally use this tool as a rough orientation, how stocks from my watchlist would contribute to the risk-return-profile of my portfolio. I usually use the maxshare option and rather “flat” and moderate return expectations, because the Kelly Criterion highly favors stocks with better return expectations. E.g. if I add 1% additional expected return for GOOG, the numbers change drastically:

If find the tool to be useful because it keeps me from overbetting on very volatile stocks and gives hints, if and when risky stocks are worth to bet on.

### Other

There are a few additional points worth mentioning:

• while opt_portfolio_wrapper() gives the shares to achieve the Kelly-optimal portfolio selection, it does not tell, how much one should bet on the whole portfolio. Approximately this be calculated by dividing the expected portfolio return by the annualized variance. One could also adapt the kelly() function from the previous blog post to get a number that incorporates the fact, that the return distribution is fat-tailed and non-normal.
• I excluded some of the options that my function originally had for the sake of readability. Options that I found interesting are:
• transaction costs
• “fixed shares” (e.g. my pension account is invested in index funds and bonds. When picking stocks, I might want to incorporate the fact, that I am already exposed to these securities)
• a from option for getSymbols() if the historic returns should be restricted to a certain range

# The Kelly Criterion in Applied Portfolio Selection

### The Kelly Criterion

Derived by John L. Kelly (1956) the criterion recommends a certain fraction of a bankroll to be put on a bet with positive expectations. Kelly showed that $$\frac{p \cdot (b+1) - 1}{b}$$ optimizes the growth rate of wealth if the game to bet on is repeated for many times, where p is the probability to win the bet and b is the net odds, i.e. what you would get back in excess of amount wagered. For example if you are offered to get your wager tripled for a correct coin flip guess, the Kelly criterion would advice you to bet $$\frac{0.5 * (2+1) - 1}{2} = 0.25$$.

While the concept is popular in the betting universe and sometimes in options trading, it seems not to be a common concept in portfolio selection. However, the concept is rather easy to transfer into portfolio selection as all it does is optimizing the long term growth rate. What we would like to find is the fraction that optimizes the following function:

x is a vector of expected future returns of a stock (which we yet have to conceptualize) and f is the fraction to be calculated. First of all we need to make assumptions about our expected return. As an example lets assume we expect 3% annualized return for a stock (e.g. because that is approximately in line with economic growth expectations). Second we need to make assumptions about the underlying risk/volatility. I derive the risk from the history of returns. At this point I often get criticized from the value investors camp because it has a flavor of efficient market hypothesis, beta, Black-Scholes, capital asset pricing model (CAPM), LTCM crash, etc.

Here is my few arguments why basing future risk on past risk seems legit to me:

1. Past and present risk (absolute values of daily returns) are highly correlated
2. The risky stocks from yesterday usually are the risky stocks of tomorrow
3. NOT using historical information of volatility at all cannot be better
4. If you believe that volatility is not the whole picture of risk, there are ways to incorporate additional measures of risk (as we will see later)

By looking at the sum_logx function, one can see that the Kelly criterion relaxes the strong assumptions that are implicit in the CAPM (normally distributed independent returns, constant correlation between assets) because it recognizes each data point “as is”, and NOT averaging out outliers by calculating a standard deviation. Therefore, more realistically, the Kelly criterion is capable of covering a huge part of the fat tails of the return distribution.

### An example

I use the Amazon stock as a mere example. This is not a recommendation to trade the stock.

Using the very early days of Amazon is probably not representative for the future risk, as Amazon matured. However the time span should ideally include all aspects of economic cycles, so I used about 10 years, including the financial crisis 2008.

Now I calculate weekly and monthly returns based on the adjusted closing price.

Now to incorporate my expected return I center the time series around that value. One might argue about the procedure but I find it more plausible than e.g. putting past returns into my models (as some people do) since past returns are not a predictor of future returns. So this is my best guestimate.

With this I basically keep the empiric distribution of returns to represent risk and input my personal expectation.

Then I optimize the function sumlog_x using the defined vectors of expected returns for both, weekly and monthly returns.

This comes up with numbers around 20% of bankroll. Keep in mind however, that this relies on the assumptions, that the expected return is 3% and the return distribution of the next year is expected to be of the same source as was the return distribution in the last decade. Furthermore it is important, that overbetting does more harm than underbetting. Therefore many people recommend betting “half Kelly” to be rather on the save side that is slightly underperforming than on the risky side, that waits for the big wave to be wiped out.

Now what if I wanted an even more conservative estimate? Lets assume I expect the risk of bankruptcy for the next twelve month to be 0.4% higher than it is reflected by the market. I went for this very simple solution:

For each of the 10 years, I include one (~0.4%) total loss (-1). In my opinion it is always advisable to think about total loss probability because listed stocks are per definition the ones that are not (yet) bankrupt (survivorship bias). The empiric distribution (my approach) has much fatter tails than the normal distribution (conventional approach) but it does not cover the events that did not take place so far.

### Summary

As can be seen, the Kelly criterion is rather optimistic in general but very sensitive to total losses. I use the procedure as a tool to get a first impression of a stock I am thinking to invest in. However there is more to be looked at, e.g. the diversification benefit of the stock within an existing portfolio. I will cover this topic - how to optimize the Kelly criterion for a portfolio of multiple stocks - in a subsequent post.

### Appendix: Kelly Criterion as an R-function

For convenience here is the code of the function I use:

### Appendix: Fat tails

As mentioned above, stock returns are not normally distributed, therefore the CAPM compared to advise from the Kelly criterion tends to “overbet”.

Plotting the empiric quantiles vs. the theoretical quantiles we see that returns outside of the range of two standard deviations left and right is much more frequent than the normal distribution would suggest. This combined with high leverage was the central reason for the collapse of LTCM.

# Webscraping with R using a Raspberry Pi

### Setting up the Raspberry Pi

After the basic setup, i.e.

• bought a Raspberry Pi Starter Kit
• flashed the SD Card with Raspbian
• ran raspi-config
• installed R with apt-get install R, which installed R 3.1.1

I started to install the R packages usually needed for my cron-job tasks (mostly webscraping). I ran into problems with the rvest package because several packages could not be installed. Maybe there is a more efficient way but I did the following steps:

### Install packages for webscraping

To install xml and related R packages (rvest), I needed the libxml2 on the system although apt-get had it, so I manually installed it:

I also needed python-dev to make libxml2 compile.

Then built libxml2:

I also had problems with the curl Package. Installation suggested to install libcurl4-openssl-dev therefore:

Last problem was the openssl package. Again, I followed the suggestions from the failed R-package installation and installed libssl-dev:

After that, rvest installed nicely. However, it took quite a while for the Pi to install all dependencies.

### Webscraping Example – A simple frost warning for my plants

A simple Task, my Raspberry Pi is doing for me is sending a frost warning to my email if at 6 pm the weather forecast for the night goes below 3 °C. For this I got an API Key at openweathermap.org. Mind, that openweathermap.org does not like frequent requests (less than 1 per 10 minutes). At the beginning I got blocked.

You can then request some JSON for your city ID using your APPID (API Key):

Then tidy and extract the values needed. Temperatures are in degrees kelvin so we need to convert to celsius. The date I transform to POSIX.

### Sending results via email

Now for the part sending a mail:

Finally we have to tell the Raspberry Pi to schedule the script to run daily at early evening. Save the .R file and add it to your crontab:

The first time you use crontab you are asked to choose an editor. Easiest (at least for me) to use is nano.


text:
# NCERT Solutions for Class 10 Maths Areas Related to Circles Exercise 12.3

In this page we have NCERT Solutions for Class 10 Maths Areas Related to Circles for Exercise 12.3 . Hope you like them and do not forget to like , social share and comment at the end of the page.
Unless stated otherwise, use π =22/7
Question 1
Find the area of the shaded region in below figure, if PQ = 24 cm, PR = 7 cm and O is the centre of the circle.

Solution
PQ = 24 cm and PR = 7 cm
∠P = 90° (Angle in the semi-circle)
By Pythagoras theorem,
QR= PR2  + PQ2
QR= 72  + 242
QR = 25 cm
Now Diameter of the circle=QR
Therefore, Radius of the circle = 25/2 cm
Area of the semicircle = (π R2)/2
= (22/7 × 25/2 × 25/2)/2 cm2
= 13750/56 cm= 245.54 cm2
Area of the ΔPQR = 1/2 × PR × PQ
= 1/2 × 7 × 24 cm2
= 84 cm2
Area of the shaded region = 245.54 - 84   = 161.54 cm2

Question 2
Find the area of the shaded region in below figure, if radii of the two concentric circles with centre O are 7 cm and 14 cm respectively and ∠AOC = 40°.

Solution
Radius inner circle = 7 cm
Radius of outer circle = 14 cm
Angle made by sector = 40°
Area of the sector OAC = (40°/360°) × π r
= 1/9 × 22/7 × 14= 68.44 cm2
Area of the sector OBD = (40°/360°) × π r
= 1/9 × 22/7 × 72  = 17.11 cm2

Area of the shaded region ABDC = Area of the sector OAC - Area of the sector circle OBD
= 68.44  - 17.11 = 51.33 cm2

Question 3
Find the area of the shaded region in below figure, if ABCD is a square of side 14 cm and APD and BPC are semicircles.

Solution
There are two semicircles in the figure.
Side of the square = 14 cm
Therefore, Diameter of the semicircle = 14 cm
Radius of the semicircle = 7 cm
Area of the square = 14 × 14 = 196 cm2
Area of the semicircle = (π R2)/2
= (22/7 × 7 × 7)/2 cm= 77 cm
Area of two semicircles = 2 × 77 = 154 cm2

Area of the shaded region = 196 154 = 42 cm2

Question 4
Find the area of the shaded region in below figure, where a circular arc of radius 6 cm has been drawn with vertex O of an equilateral triangle OAB of side 12 cm as centre.

Solution
OAB is an equilateral triangle with each angle equal to 60°.
Area of the sector is common in both.
Radius of the circle = 6 cm.
Side of the triangle = 12 cm.
Area of the equilateral triangle = √3/4 × (OA)= √3/4 × 12= 36√3 cm2
Area of the circle = π R2 = 22/7 × 6= 792/7 cm2
Area of the sector making angle 60° = (60°/360°) × π r
= 1/6 × 22/7 × 62= 132/7 cm2
Area of the shaded region = Area of the equilateral triangle + Area of the circle - Area of the sector
= 36√3 + 792/7 - 132/7
= (36√3 + 660/7) cm2

Question 5
From each corner of a square of side 4 cm a quadrant of a circle of radius 1 cm is cut and a circle of diameter 2 cm is cut as shown in below figure. Find the area of the remaining portion of the square.

Solutions
Side of the square = 4 cm
Radius of the circle = 1 cm
Four quadrant of a circle are cut from corner and one circle of radius are cut from middle.
Area of square = (side)= 4= 16 cm2
Area of the quadrant = (π R2)/4 cm2 = (22/7 × 12)/4 = 11/14 cm2
Therefore, Total area of the 4 quadrants = 4 × (11/14) cm2 = 22/7 cm2
Area of the circle = π Rcm2 = (22/7 × 12) = 22/7 cm2
Area of the shaded region = Area of square - (Area of the 4 quadrants + Area of the circle)
= 16 cm- (22/7 + 22/7) cm2
= 68/7 cm2

Question 6
In a circular table cover of radius 32 cm, a design is formed leaving an equilateral triangle ABC in the middle as shown in below figure. Find the area of the design.

Solution
Radius of the circle = 32 cm
Draw a median AD of the triangle passing through the centre of the circle.

Since, AD is the median of the triangle
Therefore, AO = Radius of the circle = 2/3 AD
2/3 AD = 32 cm
AD = 48 cm
By Pythagoras theorem,
AB= AD2  + BD2
AB= 482   + (AB/2)2   ( As BD is the mid-point )
3/4 (AB2) = 2304
AB = 32√3 cm
Area of ΔABC = √3/4 × (32√3)= 768√3 cm2
Area of circle = π R2 = 22/7 × 32 × 32 = 22528/7 cm2

Area of the design = Area of circle - Area of ΔBC
= (22528/7 - 768√3) cm2
Question 7
In below figure, ABCD is a square of side 14 cm. With centers A, B, C and D, four circles are drawn such that each circle touch externally two of the remaining three circles. Find the area of the shaded region.

Solution
Side of square = 14 cm
Four quadrants are included in the four sides of the square.
Therefore, Radius of the circles = 14/2 cm = 7 cm
Area of the square ABCD = 14= 196 cm2
Area of the quadrant = (π R2)/4 = (22/7 × 72)/4 cm2
= 77/2 cm2
Total area of the quadrant = 4 × 77/2 cm= 154 cm

Area of the shaded region = Area of the square ABCD - Area of the quadrant
= 196 - 154
= 42 cm
Question 8
Below Figure depicts a racing track whose left and right ends are semicircular. The distance between the two inner parallel line segments is 60 m and they are each 106 m long. If the track is 10 m wide, find
(i) the distance around the track along its inner edge
(ii) the area of the track.

Solution
Width of track = 10 m
Distance between two parallel lines = 60 m
Length of parallel tracks = 106 m
DE = CF = 60 m
Radius of inner semicircle, r = OD = O'C
= 60/2 m = 30 m
Radius of outer semicircle, R = OA = O'B
= 30 + 10 m = 40 m
Also, AB = CD = EF = GH = 106 m
Distance around the track along its inner edge = CD + EF + 2 × (Circumference of inner semicircle)
= 106 + 106 + (2 × πr) m = 212 + (2 × 22/7 × 30) m
= 2804/7 m

Area of the track = Area of ABCD + Area EFGH + 2 × (area of outer semicircle) - 2 × (area of inner semicircle)
= (AB × CD) + (EF × GH) + 2 × (πr2/2) - 2 × (πR2/2) m2
= (106 × 10) + (106 × 10) + 2 × π/2 (r2 -R2) m2
= 4320 m

Question 9
In below figure, AB and CD are two diameters of a circle (with centre O) perpendicular to each other and OD is the diameter of the smaller circle. If OA = 7 cm, find the area of the shaded region.

Solution
Radius of larger circle, R = 7 cm
Radius of smaller circle, r = 7/2 cm
Height of ΔBCA = OC = 7 cm
Base of ΔBCA = AB = 14 cm
Area of ΔBCA = 1/2 × AB × OC = 1/2 × 7 × 14 = 49 cm
Area of larger circle = πR= 22/7 × 72 = 154 cm
Area of larger semicircle = 154/2 cm= 77 cm
Area of smaller circle = πr2 = 22/7 × 7/2 × 7/2 = 38.5 cm2

Area of the shaded region
= Area of larger circle - Area of triangle - Area of larger semicircle + Area of smaller circle
Area of the shaded region = (154 - 49 - 77 + 39.5)
= 66.5 cm2

Question 10
The area of an equilateral triangle ABC is 17320.5 cm2. With each vertex of the triangle as centre, a circle is drawn with radius equal to half the length of the side of the triangle. Find the area of the shaded region. (Use π = 3.14 and √3 = 1.73205)

Solution
ABC is an equilateral triangle.
Therefore, ∠A = ∠B = ∠C = 60°
There are three sectors each making 60°.
Let x be the side of the equilateral triangle
Area of ΔABC = 17320.5 cm2
√3/4 × (x)= 17320.5
x = 200 cm
Therefore, Radius of the circles = 200/2 cm = 100 cm
Area of the sector = (60°/360°) × π rcm2
= 1/6 × 3.14 × (100)cm2
= 15700/3 cm2

Area of the shaded region = Area of equilateral triangle ABC – 3 × Area of sector
= 17320.5 - 15700 cm= 1620.5 cm2

Question 11
On a square handkerchief, nine circular designs each of radius 7 cm are made . Find the area of the remaining portion of the handkerchief.

Solution
Number of circular design = 9
Radius of the circular design = 7 cm
There are three circles in one side of square handkerchief.
Therefore, Side of the square = 3 × diameter of circle = 3 × 14 = 42 cm
Area of the square = 42 × 42 cm2 = 1764 cm2

Area of the circle = π r= 22/7 × 7 × 7 = 154 cm2
Area of the remaining portion of the handkerchief
= Area of the square - Total area of the design
= Area of the square - 9× Area of the circle
= 1764 - 1386 = 378 cm2

Question 12
In below figure, OACB is a quadrant of a circle with centre O and radius 3.5 cm. If OD = 2 cm, find the area of the

Solution
Radius of the quadrant = 3.5 cm
(i) Area of quadrant OACB = (πR2)/4 cm2
= (22/7 × 3.52)/4 cm2
= 9.625 cm2
(ii) Area of triangle BOD = 1/2 × 3.5 × 2 cm2
= 3.5 cm2
Area of shaded region = Area of quadrant - Area of triangle BOD
= (9.625 – 3.5) cm2
= 6.125 cm2
Question 13
In below figure, a square OABC is inscribed in a quadrant OPBQ. If OA = 20 cm, find the area of the shaded region. (Use π = 3.14)

Solution
Side of square = OA = AB = 20 cm
Now OB is the diagonal of the square
OB = 20√2 cm
Area of the quadrant = (πR2)/4 = 3.14/4 × (20√2)= 628 cm2
Area of the square = 20 × 20 = 400   cm2

Area of the shaded region = Area of the quadrant - Area of the square
= 628 - 400 = 228 cm2

Question 14
AB and CD are respectively arcs of two concentric circles of radii 21 cm and 7 cm and centre O .If ∠AOB = 30°, find the area of the shaded region.

Solution
Radius of the larger circle, R = 21 cm
Radius of the smaller circle, r = 7 cm
Angle made by sectors of both concentric circles = 30°
Area of the larger sector = (30°/360°) × π Rcm2
= 1/12 × 22/7 × 21cm2
= 231/2 cm2
Area of the smaller circle = (30°/360°) × π rcm2
= 1/12 × 22/7 × 7cm2
= 77/6 cm2

Area of the shaded region = 231/2 - 77/6 cm2
= 616/6 cm2 = 308/3 cm2

Question 15
In below figure, ABC is a quadrant of a circle of radius 14 cm and a semicircle is drawn with BC as diameter. Find the area of the shaded region.

Solution
Radius of the quadrant ABC of circle = 14 cm
AB = AC = 14 cm
BC is diameter of semicircle.
ABC is right angled triangle.
By Pythagoras theorem in ΔABC,
BC= AB2  + AC2
BC= 142  + 142
BC = 14√2 cm
Radius of semicircle = 14√2/2 cm = 7√2 cm
Area of ΔABC = 1/2 × 14 × 14 = 98 cm2
Area of quadrant = 1/4 × 22/7 × 14 × 14 = 154 cm2
Area of the semicircle = 1/2 × 22/7 × 7√2 × 7√2 = 154 cm2

Area of the shaded region = Area of the semicircle –(Area of quadrant - Area of ΔABC )
= 154 + 98 - 154 cm= 98 cm2

Question 16
Calculate the area of the designed region in below figure common between the two quadrants of circles of radius 8 cm each.

Solution
AB = BC = CD = AD = 8 cm
Area of ΔABC = Area of ΔADC = 1/2 × 8 × 8 = 32 cm2
Area of quadrant AECB = Area of quadrant AFCD = 1/4 × 22/7 × 82
= 352/7 cm2

Area of shaded region =
(Area of quadrant AECB - Area of ΔABC) +  (Area of quadrant AFCD - Area of ΔADC)
= (352/7 - 32) + (352/7 -32) cm2
= 2 × (352/7 -32) cm2
=  256/7 cm2

Reference Books for class 10

Given below are the links of some of the reference books for class 10 math.

You can use above books for extra knowledge and practicing different questions.

### Practice Question

Question 1 What is $1 - \sqrt {3}$ ?
A) Non terminating repeating
B) Non terminating non repeating
C) Terminating
D) None of the above
Question 2 The volume of the largest right circular cone that can be cut out from a cube of edge 4.2 cm is?
A) 19.4 cm3
B) 12 cm3
C) 78.6 cm3
D) 58.2 cm3
Question 3 The sum of the first three terms of an AP is 33. If the product of the first and the third term exceeds the second term by 29, the AP is ?
A) 2 ,21,11
B) 1,10,19
C) -1 ,8,17
D) 2 ,11,20

Note to our visitors :-

Thanks for visiting our website.
DISCLOSURE: THIS PAGE MAY CONTAIN AFFILIATE LINKS, MEANING I GET A COMMISSION IF YOU DECIDE TO MAKE A PURCHASE THROUGH MY LINKS, AT NO COST TO YOU. PLEASE READ MY DISCLOSURE FOR MORE INFO.


text:
# SPM Practice 1 (Arithmetic Progression) : Question 11

Question 11

An arithmetic progression consists of 10 terms. The sum of the last 5 terms is 5 and the fourth term is 9. Find the sum of this progression.

[ Hint : You can find the sum of the first five terms using

(a) Sn formula using ${S}_{5}$ : $S n = n 2 [2a+(n−1)d]$
(b) Tn formula where ${S}_{5}={T}_{1}+{T}_{2}+{T}_{3}+{T}_{4}+{T}_{5\right]}$


text:
Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# maketform

Create spatial transformation structure (TFORM)

maketform is not recommended. Use fitgeotrans, affine2d, affine3d, or projective2d instead.

## Syntax

T = maketform('affine',A)
T = maketform('affine',U,X)
T = maketform('projective',A)
T = maketform('projective',U,X)
T = maketform('custom',NDIMS_IN,NDIMS_OUT,FORWARD_FCN,INVERSE_FCN,TDATA)
T = maketform('box',tsize,LOW,HIGH)
T = maketform('box',INBOUNDS, OUTBOUNDS)
T = maketform('composite',T1,T2,...,TL)
T = maketform('composite', [T1 T2 ... TL])

## Description

example

T = maketform('affine',A) creates a multidimensional spatial transformation structureT for an N-dimensional affine transformation. A is a nonsingular real (N+1)-by-(N+1) or (N+1)-by-N matrix. If A is (N+1)-by-(N+1), the last column of A must be [zeros(N,1);1]. Otherwise, A is augmented automatically, such that its last column is [zeros(N,1);1]. The matrix A defines a forward transformation such that tformfwd(U,T), where U is a 1-by-N vector, returns a 1-by-N vector X, such that X = U * A(1:N,1:N) + A(N+1,1:N). T has both forward and inverse transformations.

A spatial transformation structure (called a TFORM struct) that can be used with the tformfwd, tforminv, fliptform, imtransform, or tformarray functions.

T = maketform('affine',U,X) creates a TFORM struct T for a two-dimensional affine transformation that maps each row of U to the corresponding row of X. The U and X arguments are each 3-by-2 and define the corners of input and output triangles. The corners cannot be collinear.

T = maketform('projective',A) creates a TFORM struct for an N-dimensional projective transformation. A is a nonsingular real (N+1)-by-(N+1) matrix. A(N+1,N+1) cannot be 0. The matrix A defines a forward transformation such that tformfwd(U,T), where U is a 1-by-N vector, returns a 1-by-N vector X, such that X = W(1:N)/W(N+1), where W = [U 1] * A. The transformation structure T has both forward and inverse transformations.

T = maketform('projective',U,X) creates a TFORM struct T for a two-dimensional projective transformation that maps each row of U to the corresponding row of X. The U and X arguments are each 4-by-2 and define the corners of input and output quadrilaterals. No three corners can be collinear.

T = maketform('custom',NDIMS_IN,NDIMS_OUT,FORWARD_FCN,INVERSE_FCN,TDATA) creates a custom TFORM struct T based on user-provided function handles and parameters. NDIMS_IN and NDIMS_OUT are the numbers of input and output dimensions. FORWARD_FCN and INVERSE_FCN are function handles to forward and inverse functions. The forward function must support the following syntax: X = FORWARD_FCN(U,T). The inverse function must support the following syntax: U = INVERSE_FCN(X,T). In these syntaxes, U is a P-by-NDIMS_IN matrix whose rows are points in the transformation input space. X is a P-by-NDIMS_OUT matrix whose rows are points in the transformation output space. The TDATA argument can be any MATLAB® array and is typically used to store parameters of the custom transformation. It is accessible to FORWARD_FCN and INVERSE_FCN via the tdata field of T. Either FORWARD_FCN or INVERSE_FCN can be empty, although at least INVERSE_FCN must be defined to use T with tformarray or imtransform.

T = maketform('box',tsize,LOW,HIGH) or
T = maketform('box',INBOUNDS, OUTBOUNDS) builds an N-dimensional affine TFORM struct T. The tsize argument is an N-element vector of positive integers. LOW and HIGH are also N-element vectors. The transformation maps an input box defined by the opposite corners ones(1,N) and tsize, or by corners INBOUNDS(1,:) and INBOUND(2,:), to an output box defined by the opposite corners LOW and HIGH or OUTBOUNDS(1,:) and OUTBOUNDS(2,:). LOW(K) and HIGH(K) must be different unless tsize(K) is 1, in which case the affine scale factor along the Kth dimension is assumed to be 1.0. Similarly, INBOUNDS(1,K) and INBOUNDS(2,K) must be different unless OUTBOUNDS(1,K) and OUTBOUNDS(2,K) are the same, and conversely. The 'box' TFORM is typically used to register the row and column subscripts of an image or array to some world coordinate system.

T = maketform('composite',T1,T2,...,TL) or
T = maketform('composite', [T1 T2 ... TL]) builds a TFORM struct T whose forward and inverse functions are the functional compositions of the forward and inverse functions of T1, T2, ..., TL.

The inputs T1, T2, ..., TL are ordered just as they would be when using the standard notation for function composition: T = T1 $\circ$ T2 $\circ$ ... $\circ$ TL and note also that composition is associative, but not commutative. This means that to apply T to the input U, one must apply TL first and T1 last. Thus if L = 3, for example, then tformfwd(U,T) is the same as tformfwd(tformfwd(tformfwd(U,T3),T2),T1). The components T1 through TL must be compatible in terms of the numbers of input and output dimensions. T has a defined forward transform function only if all the component transforms have defined forward transform functions. T has a defined inverse transform function only if all the component functions have defined inverse transform functions.

## Examples

collapse all

Create a transformation structure (TFORM) that defines an affine transformation.

T = maketform('affine',[.5 0 0; .5 2 0; 0 0 1])
T =

struct with fields:

ndims_in: 2
ndims_out: 2
forward_fcn: @fwd_affine
inverse_fcn: @inv_affine
tdata: [1×1 struct]

Apply the forward transformation.

tformfwd([10 20],T)
ans =

15    40

Read an image into the workspace and display it.

imshow(I),

Apply the transformation to the image.

I2 = imtransform(I,T);

Display the original image and the transformed image.

figure, imshow(I2)

## Input Arguments

collapse all

Transformation matrix, specified as a nonsingular, real (N+1)-by-(N+1) or (N+1)-by-N matrix.

Data Types: double

Corners, specified as a 3-by-2 matrix (for affine transformations) or 4-by-2 matrix (for projective transformations). The matrices define the corners of triangles (for affine transformations) or quadrangles (for projective transformations).

Data Types: double

Number of input and output dimensions, specified as a scalar.

Data Types: double

Forward and inverse functions, specified as function handles.

Data Types: function_handle

Parameters of custom transformation, specified as an array.

Data Types: double

Size of input box, specified as an n-element vector of positive integers.

Data Types: double

Corners of output box, specified as an n-element vector.

Data Types: double

Forward and inverse functions, specified as function handles.

Data Types: function_handle

## Output Arguments

collapse all

Multidimensional spatial transformation structure, returned as a transformation structure (TFORM).

## Tips

• An affine or projective transformation can also be expressed like this equation, for a 3-by-2 A:

[X Y]'  =  A' * [U V 1] '

Or, like this equation, for a 3-by-3 A:

[X Y 1]'  =  A' * [U V 1]'