-
Notifications
You must be signed in to change notification settings - Fork 0
01. Getting Started
Jane Ling edited this page Jul 17, 2023
·
5 revisions
Start by importing the toolbox and defining the path to where the .npy and bindata are saved.
# import the toolbox
import pecan_pie as pp
# set read_path to test dataset
read_path = 'testdata/originals/'
# load .npy bindata from read_path and initiate PecanPie object
s2p = pp.PecanPie(read_path)Note for beginners: The name we give to the PecanPie object here is s2p. You can give the object almost any name you want. If you decide to give it another name, remember to use the same name for calling the class functions.
(Optional) If you want to predefine one or more of the followings, you may define them before initiating the PecanPie object and put them as arguments:
# set savepath to test dataset
save_path = 'testdata/outputs/'
# Selecting cells to be processed. If set to None, process all ROIs
cells_to_process = [0, 1, 2, 3, 4, 5]
# Selecting cells to be plotted
cells_to_plot = [2, 3]
# load .npy bindata from read_path and initiate PecanPie object
s2p = pp.PecanPie(read_path, save_path, cells_to_process, cells_to_plot)Create a pandas dataframe containing metadata of the ROIs with the following line:
s2p.create_metadata()