Skip to content

Commit 2ff99e8

Browse files
autodoc update
1 parent 018e45e commit 2ff99e8

2 files changed

Lines changed: 49 additions & 27 deletions

File tree

autodoc/doc/api.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,20 @@ The basic features to acquire a datacube are provided, for several spectrometer
99
Hyperspectral SPI acquisition
1010
=======================================
1111

12-
Pattern Methods
12+
Imaging methods
1313
------------------
1414

1515
Class allowing to use a specific pattern method.
1616

17-
.. automodule:: PatternMethods
17+
.. automodule:: ImagingMethodBridge
1818
:members:
1919

20-
Spectrometer Selection
21-
------------------------
22-
23-
This class is used to access spectrometer features.
24-
25-
.. automodule:: SpectrometerBridge
26-
:members:
2720

2821
Acquisition
2922
---------------
3023
This class allows to set acquisition parameters to perform ONE-PIX acqusitions.
3124

32-
.. automodule:: AcquisitionConfig
25+
.. automodule:: Acquisition
3326
:members:
3427

3528

@@ -41,11 +34,12 @@ Reconstruction
4134
------------------
4235
This class contains the set of methods to reconstruct datacubes according to the chosen acquisition method.
4336

44-
.. automodule:: DatacubeReconstructions
37+
.. automodule:: Reconstruction
4538
:members:
4639

4740
Analysis
4841
------------------
4942
Library containing several methods to analyse datacube
5043

51-
.. automodule:: datacube_analyse
44+
.. automodule:: Analysis
45+
:members:

autodoc/doc/contributing.rst

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ get its API necessary informations to open and close the communication with the
2020
intensities and sampled wavelengths and set the integration times.
2121

2222

23-
Add a new spectrometer class python file to `ONE-PIX_soft/src/spectrometer_bridges` with the file name:
24-
<Spectrometer_name>Bridge.py
23+
Add a new spectrometer class python file to `ONE-PIX/plugins/spectrometer` with the folder name:
24+
<Spectrometer_name>. In this folder create a python class file named <Spectrometer_name>Bridge.py.
25+
This folder will also be the location where every needed library to run spectral measures must be in.
26+
2527

2628
.. code:: python
2729
@@ -55,13 +57,19 @@ Fulfilling these lines allows to use your device with the ONE-PIX kit.
5557
Adding a new pattern basis or method
5658
-----------------------------------------
5759

58-
You can also add new pattern bases or new methods for hyperspectral compressive imaging:
59-
Add a new pattern method class python file to `ONE-PIX_soft/src/pattern_bases` with the file name:
60-
<Pattern_method>Basis.py
60+
You can also add new pattern bases or new methods for hyperspectral compressive imaging.
61+
To do so, create a new folder <Pattern_method> in `ONE-PIX_soft/plugins/imaging_methods`.
62+
63+
In this folder, you must then buil three different classes for patterns creation, data reconstruction and data analysis strictly named :
64+
"PatternsCreation.py", "ImageReconstruction.py" and "ImageAnalysis.py".
65+
66+
The formats of the following classes to be created are explained below:
67+
68+
"PatternsCreation.py"
6169

6270
.. code:: python
6371
64-
class Pattern_methodBasis:
72+
class PatternsCreation:
6573
6674
def sequence_order(self):
6775
# create a list of string describing the name of the patterns
@@ -72,18 +80,11 @@ Add a new pattern method class python file to `ONE-PIX_soft/src/pattern_bases` w
7280
return sequence
7381
7482
75-
Adding a new reconstruction method
76-
-----------------------------------------
77-
78-
Finally, if needed, you can add a reconstruction method to transform your acquisitions made from
79-
a new basis.
80-
81-
To do so, add a new reconstruction method class python file to `ONE-PIX_soft/src/reconstruction_methods` with the file name:
82-
<Reconstruction_method>Reconstruction.py
83+
"ImageReconstruction.py"
8384

8485
.. code:: python
8586
86-
class Pattern_methodBasis:
87+
class ImageReconstruction:
8788
8889
def __init__(self,spectra,pattern_order):
8990
self.spectra=spectra
@@ -98,3 +99,30 @@ To do so, add a new reconstruction method class python file to `ONE-PIX_soft/src
9899
return spectrum,datacube
99100
100101
102+
"ImageAnalysis.py"
103+
104+
.. code:: python
105+
106+
class ImageAnalysis:
107+
108+
def __init__(self,data_path=None):
109+
self.data_path=data_path
110+
111+
def load_reconstructed_data(self,data_path=None):
112+
# Method to load data produced by the methods described before. You must fulfill the way of getting reconstructed_data and wavelengths to the class.
113+
#self.reconstructed_data=
114+
#self.wavelengths=
115+
def data_normalisation(self,ref_datacube):
116+
#allows to specify how to normalise your data using reflectance
117+
#normalised_data=
118+
return normalised_data
119+
120+
def get_rgb_image(self,datacube,wavelengths):
121+
# if relevant, mehod to build RGB image from reconstructed data, else pass
122+
#rgb_image=
123+
return rgb_image
124+
125+
def plot_reconstructed_image(self,datacube,wavelengths):
126+
# Design a typical plot to display after data reconstruction
127+
128+

0 commit comments

Comments
 (0)