code: def create_frame(time=0, duration=None, name='gwpy', run=-1, ifos=None):
      
      from LDAStools import frameCPP
  
      # create frame
      frame = frameCPP.FrameH()
  
      # add timing
      gps = to_gps(time)
      gps = frameCPP.GPSTime(gps.gpsSeconds, gps.gpsNanoSeconds)
      frame.SetGTime(gps)
      if duration is not None:
          frame.SetDt(float(duration))
  
      # add FrDetectors
      for prefix in ifos or []:
          idx = getattr(frameCPP, 'DETECTOR_LOCATION_%s' % prefix)
          frame.AppendFrDetector(frameCPP.GetDetector(idx, gps))
  
      # add descriptions
      frame.SetName(name)
      frame.SetRun(run)
  
      return frame
docs: Create a new :class:`~LDAStools.frameCPP.FrameH`
  
      **Requires:** |LDAStools.frameCPP|_
  
      Parameters
      ----------
      time : `float`, optional
          frame start time in GPS seconds
  
      duration : `float`, optional
          frame length in seconds
  
      name : `str`, optional
          name of project or other experiment description
  
      run : `int`, optional
          run number (number < 0 reserved for simulated data); monotonic for
          experimental runs
  
      ifos : `list`, optional
          list of interferometer prefices (e.g. ``'L1'``) associated with this
          frame
  
      Returns
      -------
      frame : :class:`~LDAStools.frameCPP.FrameH`
          the newly created frame header