Sunday, January 20, 2013

Group velocity / Phase velocity Animation



Here, we demonstrate the group and phase velocity phenomena as observed when two signals with different temporal and spectral frequencies (wavelength) are added to each other. The addition creates time varying constructive and destructive interferences along the space. The resulting wave packet travels with the so-called group velocity which is faster than the phase velocity in this case. The wave packet envelope is shown in magenta color in dashed lines. Note that in this particular case, both group and phase velocities are positive. An important interpretation of group velocity is that it represents the velocity at which the energy or information is conveyed along a wave (see Wikipedia for further details). 


Групповая скорость, Gruppengeschwindigkeit, Voortplantingssnelheid, Velocidad de grupo, Grupa rapido, Vitesse de groupe, Velocità di gruppo, 군속도, מהירות חבורה, ჯგუფური სიჩქარე, 群速度, Gruppefart, Prędkość grupowa, Групова швидкість, 群速度, Vận tốc nhóm, Grupphastighet, Grupinis greitis Phasengeschwindigkeit, Velocidad de fase, 相速度, Vitesse d'une onde, Velocità di fase, Фазовая скорость, 位相速度

Tuesday, January 15, 2013

How to Automatically Parse YouTube View Statistics using importxml?

An automatic way to import YouTube video view statistics to Google Spreadsheets is to use importxml() function. In this post, a working example will be demonstrated using the following YouTube playlist:  https://www.youtube.com/playlist?list=PL38214462962EB8A0

First, the page source of the YouTube channel needs to be opened to get which parse value to use while importing the view statistics.As shown below, details of each video is listed under "video-overview" class.


<div class="video-overview">
    <h3 class="video-title-container">

      <a href="/watch?v=WRGfYqqjXDo&amp;list=PL38214462962EB8A0&amp;index=2" class="yt-uix-tile-link yt-uix-sessionlink" data-sessionlink="feature=plpp_video&amp;ei=CPbFlenq67QCFZYUIQodkUULKQ%3D%3D">
        <span class="title video-title "  dir="ltr">Corner Reflector / Retroreflector (FDTD Animation)</span>
      </a>
    </h3>

      <p class="video-details">
        <span class="video-owner">
by <span class="yt-user-name " dir="ltr">meyavuz</span>
        </span>

          <span class="video-view-count">
            151 views
          </span>
      </p>

  </div>

 Thus, in the Google Spreadsheets, we can type the following in one of the cells:

=importxml(A1,"//div[@class='video-overview']")

where cell A1 has the web address of the YouTube playlist we are working with. Once this is done, the spreadsheet will automatically populate the cells with the titles, video uploader and video views etc as shown below:


However, the cells containing the video view count also includes the user name and some other text, e.g. for this playlist, we have "by meyavuz48 views". To extract the video counts from this text, we need to use some of the functions of the Google Spreadsheets. For this particular case, typing

=value(replace(left(C1,len(C1)-5),1,10,""))


will provide the view statistics in integer form as shown below: Basically, "5" in the formula corresponds to number of characters of the word "views". Then, using the "replace" function, the first 10 characters "by meyavuz" are replaced by empty string "". Finally, the text is converted to integer using the "value()" function.




Note that using "video-overview" as the class inside importxml() function provides the titles and view count of each video. If only the video count is sought after, one can use  'video-view-count' keywords as input to the importxml function as:

"=importxml(A1,"//span[@class='video-view-count']")

Also, the full list of Google Spreadsheets function can be found in the following link:
http://support.google.com/drive/bin/static.py?hl=en&topic=25273&page=table.cs&tab=1240296

Monday, January 14, 2013

Nick Eaton Ridge Hike, Oregon

We reached the trailhead around 6.30 and started to hike around 7 am under 0 celcius. The pipes of the waterpacks got frozen, so needed to use the bottle for the water need. Reached the peak around 9.30 am and started descending until we found a nice spot for the breakfast.

Nick Eaton Ridge Hike



Tuesday, January 08, 2013

King's Mountain Hike


We reached the trailhead around 6.30 am and started to hike at 7.00 am. The trail was full of frozen snow making it difficult to walk at some points. Reached the summit around 9 am and had our breakfast. Then we started the descent and reached the trailhead around 11 am.King's Mountain on EveryTrail



Tuesday, January 01, 2013

Snowshoeing at Boy Scout Ridge near White River in Mt. Hood

We reached the trailhead around 7.10 am and got prepared. Started to hike around 7.30 am and hiked until 9.00 am. Had our breakfast and head back to trailhead. Mt. Hood was clearly visible when we started but later it was covered with cloud and not visible. GPS machine stopped working after a while so the track is not complete. I tried to complete it myself hence there is no accurate information after 3.5 km of the track.

Snowshoeing - Boy Scout Ridge