(A–B) Variation along 1st (A) and 2nd (B) principal components of speed trajectories. PC1 captures overall amplitude of the migratory response, while PC2 captures the timing of the peak migratory response. The average trajectory across all conditions is shown in black, and the mean trajectory ±1 standard deviation along the principal component are shown in red and blue, respectively. (C) Percent variance explained by each of the first 10 principal components. (D) Speed trajectories projected onto the space spanned by the first two principal components. Each dot represents the speed trajectory from one larva. (E) Examples of non-rigid deformation approach to measure changes in actin intensity. Shown is a small region of the LifeAct signal in basal cells over time, either the original maximum-intensity projection (original), the image after non-rigid deformation (registered), or the relative change in fluorescence intensity in the registered image (∆F/F0). Green and magenta arrowhead show particular LifeAct-rich protrusions; filled arrowheads show the original position of the protrusion, while empty arrowheads show the corresponding position of the protrusion in subsequent frames—which differs due to cell and tissue movement. Registration by non-rigid deformation tracks protrusions and warps the image so all changes in intensity of a protrusion occur at the original location of the protrusion in the first frame. Changes in LifeAct intensity in these protrusions are captured in the ∆F/F0 image at their original position. (F) Average speed trajectories for larvae anesthetized with Tricaine or alpha-bungarotoxin. Data for larvae treated with Tricaine is the same as shown in Figure 2A. Spikes in the alpha-bungarotoxin condition are due to residual larval twitching due to incomplete muscle relaxation. Error bars are bootstrapped 95% confidence intervals of the mean. (G) Two-chamber device schematic. (i) Line drawing used in laser cutting pieces of acrylic to make the mold for the two-chamber device. Gray bar indicates the region that was etched rather than cut, to a depth of approximately 375 µm. (ii) Schematic of the final device made out of PDMS, with holes punched for fluid inlet. Larvae are immobilized in the device as shown with agar around the anterior part of the fish. (iii). Picture of the assembled acrylic mold, with metal bar to create a gap for holding the larvae and for fluid inlets. (iv) Photo of the assembled PDMS device cast from the mold, with inlet tubes added. (v) Photo of the device in a microscope stage insert with inlet and outlet tubes in place. (vi) zoom-in of the device showing the positioning of the inlet and outlet tubes for both chambers to allow independent media exchange in each chamber.