   (let [current-position (:position event)
         z-drive (@state :default-z-drive)
         check-z-ref (and z-drive
+                         (-> current-position get-msp (z-in-msp z-drive) not)
                          (or (:autofocus event)
                              (:wait-time-ms event)))]
     (filter identity

;; generic metadata

(defn convert-settings [^SequenceSettings settings]
  (def seqSettings settings)
  (-> settings
    (data-object-to-map)
    (rekey

                (swap! state assoc
                       :burst-time-offset (- (elapsed-time @state)
                                             (core-time-from-tags (image :tags)))))
             ; (println (image+ :tags))
              (.put out-queue (make-TaggedImage (annotate-image image+ evt @state
                                                                (burst-time (:tags image) @state)))))
            (when (core isBufferOverflowed)
              (swap! state assoc :stop true)
              (ReportingUtils/showError "Circular buffer overflowed."))))
        (flatten (map make-multicamera-events) (event :burst-data)))))
  (while (and (not (@state :stop)) (. mmc isSequenceRunning))
    (Thread/sleep 5)))

(defn collect-snap-image [event out-queue]
  (let [image
         {:pix (core getImage)
          :tags nil}]
    (do (log "collect-snap-image: "
               (select-keys event [:position-index :frame-index
                                   :slice-index :channel-index]))
      (when out-queue
          (.put out-queue
                (make-TaggedImage (annotate-image image event @state (elapsed-time @state))))))
    image))

(defn return-config []
