Detector Characterization Camp: Getting frames into matlab using Windows

Ligotools webpage: http://www.ldas-sw.ligo.caltech.edu/ligotools/

You need to downlaod two programs:

In guild menu, choose an LDAS server that has your data, and a database name (CIT and cit_s3, for example).

Choose "FrameData" in the guild menu, and select the single choice, "get frame data from LDAS".

Fill in the blanks for site, channels, downsampling factor, start time, end time. For example:

For "Operation", choose "Concatenate frames", "ilwd ascii". These parameters result in an estimated output size of 3.7 Mb, and an estimated time of 0:52 (The size is usually more reliable than the time). You can play with times, download factor, etc, to make this size manageable if needed.

Choose "Report URL of output".

Click on "Submit". A "job" is submitted to LDAS to fetch your data. A new message window with a yellow "running" line with an LDAS job number should open. The line will turn green whe the job is completed, and an URL with the location of the data will appear.

The URL will be something like http://131.215.114.9/ldas_outgoing/jobs/LDAS-CIT_218/LDAS-CIT2188410 (so you don't need to watch the job being completed and go to the URL some time later when you feel like).

The command you submitted is in the "command.html" link; the output ilwd file is in "daq.ilwd". Save the "daq.ilwd" file to your computer, with an appropriate name, say "L1ASIQ-752422583-752422613.ilwd".

Open Matlab, and follow the example in this diary:

>> z=ilwdread('L1ASIQ-752422583-752422613.ilwd');
>> z
z = 
     tag: 'ilwd'
    size: 3
      m1: [1x1 struct]
      m2: [1x1 struct]
      m3: [1x1 struct]
>> z.m1
ans = 
         tag: 'ilwd'
    metadata: [1x121 char]
        name: 'frame_group'
        size: 2
          m1: [1x1 struct]
          m2: [1x1 struct]
>> z.m1.m1
ans = 
     tag: 'ilwd'
    name: 'L1\:LSC-AS_Q::ProcData:752422582:997558594:Frame'
    size: 10
      m1: [1x1 struct]
      m2: [1x1 struct]
      m3: [1x1 struct]
      m4: [1x1 struct]
      m5: [1x1 struct]
      m6: [1x1 struct]
      m7: [1x1 struct]
      m8: [1x1 struct]
      m9: [1x1 struct]
     m10: [1x1 struct]
>> z.m1.m2
ans = 
     tag: 'ilwd'
    name: 'L1\:LSC-AS_I::ProcData:752422582:997558594:Frame'
    size: 10
      m1: [1x1 struct]
      m2: [1x1 struct]
      m3: [1x1 struct]
      m4: [1x1 struct]
      m5: [1x1 struct]
      m6: [1x1 struct]
      m7: [1x1 struct]
      m8: [1x1 struct]
      m9: [1x1 struct]
     m10: [1x1 struct]
>> z.m1.m1.m10
ans = 
     tag: 'ilwd'
    name: ':data:Container(Vect):Frame'
      m1: [1x1 struct]
>> z.m1.m1.m10.m1
ans = 
              tag: 'real_4'
    dataValueUnit: 'counts'
             dims: 126976
               dx: 2.4414e-004
             name: 'L1\:LSC-AS_Q'
            units: 'time'
           real_4: [126976x1 double]
>> asq=z.m1.m1.m10.m1.real_4;
>> asi=z.m1.m2.m10.m1.real_4;
>> fs=1/z.m1.m1.m10.m1.dx
fs =
  4.0960e+003
>> t=[0:length(asq)-1]/fs + 752422582.997558594;
>> plot(t,asq)
>> t=[0:length(asq)-1]/fs;
>> plot(t,asq)
>> T0=752422582.997558594;
>> save L1ASIQ-752422583-752422613.mat fs T0 asi asq