get_seg_details - jaybgager/tracertools GitHub Wiki
This function gets the current segment ID, 3D volume in cubic micrometers, cable length in whatever units the datastack uses, and synapse count for each item in a list of segment IDs.
Arguments:
datastack(string, mandatory)- the name of the CAVE datastack the IDs are from
seg_ids(list of integers, mandatory)- a list of segment IDs to get details for
Returns:
out_rows(list of lists of integers and floats, see description)- a list of lists, each item in the main list will be a list with the structure:
[
original segment ID (integer),
current segment ID (integer),
volume in cubic microns (float),
cable length (float),
ougoing synapse count (integer),
incoming synapse count (integer),
total synapse count (integer)
]
[!NOTE] If any step of the process encounters an error it will return a string value of
"ERROR"for that step so as not to crash the entire run. If the problem is caused by your connection to the server or some kind of temporary host-side issue, then rerunning will fix this. However, if a submitted segment is too large to pull all the data for at once (e.g theCT1neurons in Drosophila) or if you don't have permission to read from a specific datastack's CAVE tables, rerunning will keep returning the error result.
Example
The following code gets the details for segments 720575941473274509, 720575941524660200, and 720575941565377335 in the brain_and_nerve_cord datastack.
INPUT:
import tracertools as tt
details_list = tt.get_seg_details(
datastack = "brain_and_nerve_cord",
seg_ids = [
720575941473274509,
720575941524660200,
720575941565377335,
],
)
print(details_list)
OUTPUT:
[
[
720575941473274509,
720575941441350235,
523.49226624,
2453811.5,
5893,
945,
6838
],
[
720575941524660200,
720575941519923628,
158.71888512,
587790.9375,
1614,
257,
1871
],
[
720575941565377335,
720575941703820762,
770.08292352,
2826879.75,
7469,
1662,
9131
]
]