How to export a track from Lasagna
This guide shows you how to turn a track traced with
Lasagna
into xyz_picks.json.
Prerequisites
The
iblextra installed (see How to install the optional extras).
Steps
Trace the track in Lasagna, following its guide, and:
do not rotate, flip or mirror the images while tracing
trace in histology already registered to the Allen atlas, or apply the registration transform to the points afterwards if you trace in the original image space
Save the
_ptsline, not the_fitline.Convert it to IBL coordinates and save it:
import json from pathlib import Path from ibllib.pipes.histology import load_track_csv picks_path = Path('/path/to/picks') # Returns ML, AP, DV relative to bregma in m; converted to µm xyz = load_track_csv('/path/to/lasagna/tracing_pts.csv') * 1e6 with open(picks_path / 'xyz_picks.json', 'w') as f: json.dump({'xyz_picks': xyz.tolist()}, f, indent=2)
In the session YAML, use
picks_pathas thepicksfolder (see How to write a session YAML for one probe).