File tree Expand file tree Collapse file tree 6 files changed +62
-1
lines changed Expand file tree Collapse file tree 6 files changed +62
-1
lines changed Original file line number Diff line number Diff line change 1
1
0.3.0
2
2
- ref: renamed `meta.DATA_KEYS` to `meta.DATA_KEYS_FL` and removed
3
3
keys that are not relevant for fluorescence imaging
4
- - docs: initial documentation with code reference
4
+ - docs: initial documentation with code reference and example
5
5
0.2.1
6
6
- maintenance release
7
7
0.2.0
Original file line number Diff line number Diff line change 6
6
:maxdepth: 2
7
7
8
8
9
+ .. fancy_include :: simple_fluorescence.py
Original file line number Diff line number Diff line change
1
+ import os
2
+ import os .path as op
3
+ import sys
4
+
5
+ import matplotlib .pylab as plt
6
+
7
+ thisdir = op .dirname (op .abspath (__file__ ))
8
+ sys .path .insert (0 , op .dirname (thisdir ))
9
+
10
+ DPI = 80
11
+
12
+
13
+ if __name__ == "__main__" :
14
+ # Do not display example plots
15
+ plt .show = lambda : None
16
+ files = os .listdir (thisdir )
17
+ files = [f for f in files if f .endswith (".py" )]
18
+ files = [f for f in files if not f == op .basename (__file__ )]
19
+ files = sorted ([op .join (thisdir , f ) for f in files ])
20
+
21
+ for f in files :
22
+ fname = f [:- 3 ] + ".jpg"
23
+ if not op .exists (fname ):
24
+ exec_str = open (f ).read ()
25
+ if exec_str .count ("plt.show()" ):
26
+ exec (exec_str )
27
+ plt .savefig (fname , dpi = DPI )
28
+ print ("Image created: '{}'" .format (fname ))
29
+ else :
30
+ print ("No image: '{}'" .format (fname ))
31
+ else :
32
+ print ("Image skipped (already exists): '{}'" .format (fname ))
33
+ plt .close ()
Original file line number Diff line number Diff line change
1
+ """Loading and plotting
2
+
3
+ This example illustrates the simple usage of the
4
+ :class:`flimage.FLImage <flimage.core.FLImage>` class for reading and
5
+ managing quantitative phase data. The attribute ``FLImage.fluorescence``
6
+ yields the image data.
7
+
8
+ The image shows a young retina cell. The original dataset, available on
9
+ `figshare <https://doi.org/10.6084/m9.figshare.8055407.v1>`_
10
+ (*retina-young_sinogram_fli.h5*) :cite:`Schuermann2017`, can be opened in
11
+ the same manner using the
12
+ :class:`flimage.FLSeries <flimage.series.FLSeries>` class.
13
+ """
14
+ import matplotlib .pylab as plt
15
+ import flimage
16
+
17
+ # load the experimental data
18
+ fli = flimage .FLImage (h5file = "./data/retina_p10.h5" , h5mode = "r" )
19
+
20
+ # plot
21
+ plt .figure (figsize = (4 , 3 ))
22
+
23
+ plt .subplot (title = "fluorescence image of a mouse retina cell" )
24
+ plt .imshow (fli .fl , cmap = "YlGnBu_r" )
25
+
26
+ plt .tight_layout ()
27
+ plt .show ()
You can’t perform that action at this time.
0 commit comments