<jupyter_start><jupyter_text>Introduction to Computational Neuroscience   Practice I: Structure of the Brain Aqeel Labash, <NAME>, <NAME>  Important:Make sure that you saved your ipynb file correctly to avoid loss of information. Please submit this **ipynb** file only (unless you have extra files then zip this file with the extra ones). Everything should be included in this file questions, answers, codes, plots, and comments about your solutions. My student ID is : [YOUR ANSWER] and it took me approximately : [YOUR ANSWER] hours to complete the home work.The data of how long it took you to complete the home work will help us to improve the home works to be balanced. ***As you might have heard before, structure of the brain is extremely complex. There are lotsof neurons next to each other, tangled with each other, forming one, almost gap-less mass. Inpursuit of understanding any complex system, one thing you try to learn is its structure. Onceyou see the structure, you get insights about the purpose of the system. Same, hopefully, standsfor our brain. Brain structure consist of neurons, their somas (cell bodies), dendrites (inputchannels), axons (output channels) and synapses (connection points). *** Exercice 1: Questionnaire (2 pts) **Q1-2:** Does size matter? What is the i) mass and ii) number of neurons in the the brains of the following animals: human, african elephant, horse, giraffe and ant. Your Answer **Q3:** How many synapses are there in the human brain? Your Answer **Q4:** Compare the bottom-up (biologists) and top-down (engineers, computer scientist) approaches to studying the brain. Your Answer **Q5:** Scientific study of the brain has many branches. Describe in a few examples what are the following fields studying: i)Developmental Neuroscience ii)Clinical Neuroscienceiii)Computational neuroscience. Your Answer **Q6:** Why did Golgi think the brain is not comprised of individual cells? Your Answer **Q7:** Why did the nervous system evolve (what is the evolutionary advantage it provides)? Your Answer **Q8:** Name 3 tasks at which computer is much better than human brain and 3 tasks where human brain outperforms any existing computer. Your Answer **Q9:** Describe the main function of the three main compartments of a neuron: soma, dendrite, axon. Your Answer **Q10:** Name two types of glial cells and their functions? Your Answer **Q11:** What is gray matter and white matter? Your Answer **Q12:** The Cerebrum is folded and convoluted to increase the surface area. If you would unfold it, how big would it be (surface area)? Your Answer **Q13:** What types of sensors are are there in the skin ? Your Answer **Q14:** If you were to flick a whale's tail, how long it will take for the signal to reach the whale's brain and some response to come back? How long would it take if there was no myelin around the axons?  Your Answer **Q15:** What is a neurotransmitter? Your Answer **Q16:** Describe the sequence of actions (ion channels opening and closing) during the generation of an action potential? *** Exercise 2: Body mass vs. brain mass (1 pt) In the course of evolution as organisms developed additional organs and functions the systemresponsible for controlling these functions had to increase as well. In this exercise we will checkif it is true that larger animals have larger brain. In the data folder you will find data filebodybrain.csv. It has two columns: the first one is the mass of the animal in kilograms, thesecond is the mass of its brain in grams. 1) Load the data<jupyter_code>import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
%matplotlib notebook

################################
##### YOUR CODE STARTS HERE ####
#Hint: You can use panda


##### YOUR CODE ENDS HERE  #####
################################<jupyter_output><empty_output><jupyter_text>2) Create a scatter plot where body mass is on X axis and brain mass on the Y axis (labelthe axes accordingly.<jupyter_code>################################
##### YOUR CODE STARTS HERE ####



##### YOUR CODE ENDS HERE  #####
################################
plt.show()<jupyter_output><empty_output><jupyter_text>3) As you will see the picture is not very interesting, but try plotting in a logarithmic scale(use log function).<jupyter_code>################################
##### YOUR CODE STARTS HERE ####



##### YOUR CODE ENDS HERE  #####
################################
plt.show()<jupyter_output><empty_output><jupyter_text>4) What is the relation between the two masses?. **Hint:** [log-log-plot](https://en.wikipedia.org/wiki/Log%E2%80%93log_plot) Your Answer *** Exercise 3: Types of neurons (1.5 pts) There are lots of different types of neurons in our nervous system. They have different size,structure and function. Let us have a look at some of them:| Pyramidal cell in layer 2 or 3 | Purkinje cell | Spindle neuron | Amacrine cell ||---|---|---|---||  |  |  |  || Pyramidal cell in 5 | Basket cell | Sensory neuron ||:-:|:-:|:-:||  |  |  | In the data folder of this assignment you will find three .swc files. Each file describes reconstructedstructure of a neuron. A neuron can be characterized by different parameters, such assize, bifurcations (branching points), size of soma, etc. In general the task of identifying thetype of a neuron is quite hard [1](https://www.sciencedirect.com/science/article/pii/S0165017307000768).Nevertheless, in some cases, different types of neurons have distinguishable shapes. This is whatwe will try to use in this exercise. Your task is to plot neurons from the data files and guesswhich of the above-mentioned types each of them belongs to. 1) Have a look inside an .swc file. Each line describes small piece of the neuron (compartment),the values in the columns are:  + ID of the compartment  + Type of the compartment:      - 0 – undefined      - 1 – soma      - 2 – axon      - 3 – basal dendrite      - 4 – apical dendrite    + X coordinate (in m)+ Y coordinate  + Z coordinate  + Radius of the compartment  + ID of parent compartment (-1 for root compartment)   2) Import the 3 coordinates of all compartments.<jupyter_code>################################
##### YOUR CODE STARTS HERE ####



##### YOUR CODE ENDS HERE  #####
################################<jupyter_output><empty_output><jupyter_text>3) Plot the data in 3D. Hint for matplotlib users:[2](https://matplotlib.org/mpl_examples/mplot3d/scatter3d_demo.py).<jupyter_code># this allows you to see a 3d plot in the notebook
%matplotlib notebook
################################
##### YOUR CODE STARTS HERE ####



##### YOUR CODE ENDS HERE  #####
################################<jupyter_output><empty_output><jupyter_text>4) Look at the resulting 3D image an try to guess type of the neuron Your Answer 5)(Optional) If you are not sure about the neuron type based on the scatter plot, feel free todraw lines between connected compartments (each compartment is connected to its parentcompartment, so you need to draw a line segment for each parent-child pair).<jupyter_code>################################
##### YOUR CODE STARTS HERE ####



##### YOUR CODE ENDS HERE  #####
################################<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13099041533546327, 'fraction_numerical': 0.01097374635366023, 'mean_word_length': 4.921052631578948, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '153832', 'license': 'MIT', 'n_tokens_mistral': 1956, 'n_tokens_neox': 1754, 'n_words': 990, 'path': '2019/01-Brain/cns-structure.ipynb', 'repo_name': 'NeuroCSUT/Computational-Neuroscience-Course', 'size': '7213'}