@@ -20,8 +20,10 @@ get its API necessary informations to open and close the communication with the
2020intensities 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.
5557Adding 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