     (start-property-sequences (:properties trigger-sequence))
     (when absolute-slices
       (start-slice-sequence))
-    (swap! state assoc :burst-init-time (elapsed-time @state))
     (core startSequenceAcquisition (if (first-trigger-missing?) (inc length) length) 0 true)
     (swap! state assoc-in [:last-stage-positions (core getFocusDevice)]
            (last absolute-slices))))

   :tags 
   (merge
     (generate-metadata event state)
     (:tags img))}) ;; include any existing metadata

(defn make-TaggedImage [annotated-img]
  (TaggedImage. (:pix annotated-img) (JSONObject. (:tags annotated-img))))

    (Thread/sleep 5))
  (let [md (Metadata.)
        pix (core popNextImageMD md)
        tags (parse-core-metadata md)]
    {:pix pix :tags (dissoc tags "StartTime-ms")}))
    
(defn collect-burst-images [event out-queue]
  (when (first-trigger-missing?) (pop-burst-image)) ; drop first image if first trigger doesn't happen
  (swap! state assoc :burst-time-offset nil)
  (dorun
    (map-indexed
      (fn [i evt]
        (when-not (@state :stop)
          (let [image (pop-burst-image)]
            (when (zero? i)
              (swap! state assoc
                     :burst-time-offset (- (elapsed-time @state)
                                           (core-time-from-tags (image :tags)))))
            (.put out-queue (make-TaggedImage (annotate-image image evt @state))))
          (when (core isBufferOverflowed)
            (swap! state assoc :stop true)
            (ReportingUtils/showError "Circular buffer overflowed."))))
      (event :burst-data)))
  (while (and (not (@state :stop)) (. mmc isSequenceRunning))
    (Thread/sleep 5)))

