Differences between revisions 1 and 2
Revision 1 as of 2018-01-18 13:00:29
Size: 1690
Editor: PJJung
Comment:
Revision 2 as of 2018-01-18 13:01:43
Size: 1690
Editor: PJJung
Comment:
Deletions are marked like this. Additions are marked like this.
Line 60: Line 60:
get = 1199756064.0 + 600 # Specify GPS ent time by float or integer type get = 1199756064.0 + 600 # Specify GPS end time by float or integer type

How to read Cache file and Time Series Data

Cache file direction

  • In k1det1

[detchar@k1det1~]$ cd /home/detchar/Cache
[detchar@k1det1 Cache]$ ls
K1-Cache.cache  mkCache.py  nohup.out
  • In seikai, only the ikagra data cache is stored.

[user@seikai~]$ cd /home/detchar/Cache/ikagra_cache/
[user@seikai Cache]$ ls
ikagra_cachefile.cache  mkCache.py

Read Cache file

   1 from glue.lal import Cache
   2 
   3 gwf_cache = '/home/detchar/Cache/K1-Cache.cache'        # Specify 'Cache file path' here
   4 
   5 with open(gwf_cache, 'r') as fobj:                      # Read the cache file using glue.lal
   6     cache = Cache.fromfile(fobj)
   7 
   8 type(cache)                                             # type of cache is glue.lal.Cache
   9 glue.lal.Cache
  10 
  11 cache                                                   # Contants of cache
  12 [<glue.lal.CacheEntry at 0x7f8004092050>,
  13  <glue.lal.CacheEntry at 0x7f8004092110>,
  14    .
  15    .
  16    .
  17  <glue.lal.CacheEntry at 0x7f7fce88a850>,
  18  <glue.lal.CacheEntry at 0x7f7fce88a910>,
  19  ...]

Read Time Series Data

   1 from gwpy.timeseries import TimeSeries 
   2 
   3 ch = 'K1:LSC-MICH_CTRL_CAL_OUT_DQ'                      # Specify 'Channel Name' by string type
   4 gst = 1199756064.0                                      # Specify GPS start time by float or integer type
   5 get = 1199756064.0 + 600                                # Specify GPS end time by float or integer type
   6 
   7 data = TimeSeries.read(cache, ch , gst, get, format='lalframe')

KAGRA/Subgroups/DET/gwpy/howread (last edited 2018-01-19 20:08:15 by PJJung)