Transmission Electron Microscopy (TEM) dataset¶

The following TEM dataset is a section of an early larval brain of Drosophila melanogaster used in the analysis of neuronal microcircuitry. The dataset was obtained from the TrakEM2 tutorial and subsequently converted to the CSD model file-format.

Let’s import the CSD model data-file and look at its data structure.

import matplotlib.pyplot as plt

import csdmpy as cp

filename = "https://osu.box.com/shared/static/3w5iqkx15fayan1u6g6sn5woc2ublkyh.csdf"
print(TEM.data_structure)

Out:

{
"csdm": {
"version": "1.0",
"timestamp": "2016-03-12T16:41:00Z",
"description": "TEM image of the early larval brain of Drosophila melanogaster used in the analysis of neuronal microcircuitry.",
"dimensions": [
{
"type": "linear",
"count": 512,
"increment": "4.0 nm",
"quantity_name": "length",
"reciprocal": {
"quantity_name": "wavenumber"
}
},
{
"type": "linear",
"count": 512,
"increment": "4.0 nm",
"quantity_name": "length",
"reciprocal": {
"quantity_name": "wavenumber"
}
}
],
"dependent_variables": [
{
"type": "internal",
"numeric_type": "uint8",
"quantity_type": "scalar",
"components": [
[
"126, 107, ..., 164, 171"
]
]
}
]
}
}

This dataset consists of two linear dimensions and one single-component dependent variable. The tuple of the dimension and the dependent variable instances from this example are

and the respective coordinates (viewed only for the first ten coordinates),

print(x.coordinates[:10])

Out:

[ 0.  4.  8. 12. 16. 20. 24. 28. 32. 36.] nm
print(x.coordinates[:10])

Out:

[ 0.  4.  8. 12. 16. 20. 24. 28. 32. 36.] nm

For convenience, let’s convert the coordinates from nm to µm using the to() method of the respective Dimension instance,

x.to("µm")
x.to("µm")

and plot the data.

plt.figure(figsize=(5, 3.5))
ax = plt.subplot(projection="csdm")
cb = ax.imshow(TEM, aspect="auto")
plt.colorbar(cb)
plt.tight_layout()
plt.show() Total running time of the script: ( 0 minutes 1.715 seconds)

Gallery generated by Sphinx-Gallery