Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openspyrit/spas
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: spyrit_v2_network
Choose a base ref
...
head repository: openspyrit/spas
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Apr 27, 2023

  1. compatible with spyrit 2.1

    nducros committed Apr 27, 2023
    Copy the full SHA
    d38a8a8 View commit details

Commits on May 12, 2023

  1. Copy the full SHA
    109764d View commit details
  2. Copy the full SHA
    0abbe00 View commit details

Commits on May 17, 2023

  1. Merge pull request #10 from openspyrit/tmp-oe

    Tmp oe
    nducros authored May 17, 2023
    Copy the full SHA
    eecd5ea View commit details

Commits on May 26, 2023

  1. Set the version to v1.4 in setup.py

    Allow to print the correct version of spas with pip
    tbaudier committed May 26, 2023
    Copy the full SHA
    187267d View commit details

Commits on Jun 1, 2023

  1. Merge pull request #11 from openspyrit/toawardsv1.4

    Set the version to v1.4 in setup.py
    nducros authored Jun 1, 2023
    Copy the full SHA
    97651d4 View commit details

Commits on Jun 2, 2023

  1. Copy the full SHA
    c40403a View commit details

Commits on Jun 7, 2023

  1. Handle denoi = None

    Mahieu-Williame committed Jun 7, 2023
    Copy the full SHA
    307241f View commit details
  2. Merge pull request #12 from openspyrit/toto

    Handle denoi = None
    nducros authored Jun 7, 2023
    Copy the full SHA
    123db62 View commit details
  3. Merge pull request #13 from openspyrit/tmp-oe

    metadata of the camera has been associeted to the other metadata
    nducros authored Jun 7, 2023
    Copy the full SHA
    40abeeb View commit details

Commits on Nov 27, 2023

  1. Copy the full SHA
    f5c332a View commit details
  2. For the class CAM, if dll pyueye was not installed, avoid error

    Use dll_pyueye_installed to declare attributes or not
    tbaudier committed Nov 27, 2023
    Copy the full SHA
    04fb523 View commit details

Commits on Feb 6, 2024

  1. Copy the full SHA
    641f226 View commit details

Commits on Jul 18, 2024

  1. add tune spectro cell

    Mahieu-Williame committed Jul 18, 2024
    Copy the full SHA
    f8dc420 View commit details

Commits on Jul 23, 2024

  1. Copy the full SHA
    d1b7c4e View commit details

Commits on Jul 25, 2024

  1. add the prog generate_patterns_and_order_pattern and update the impor…

    …t spas.generate in the read.me and the import Permutation_Matrix in the Spyrit package
    Mahieu-Williame committed Jul 25, 2024
    Copy the full SHA
    010973d View commit details

Commits on Aug 26, 2024

  1. Copy the full SHA
    f2753d0 View commit details
  2. Copy the full SHA
    a85a36a View commit details

Commits on Sep 5, 2024

  1. Copy the full SHA
    e72a099 View commit details
  2. For the class CAM, if dll pyueye was not installed, avoid error

    Use dll_pyueye_installed to declare attributes or not
    tbaudier committed Sep 5, 2024
    Copy the full SHA
    e69c175 View commit details
  3. Copy the full SHA
    1249138 View commit details

Commits on Sep 6, 2024

  1. Copy the full SHA
    931ae28 View commit details

Commits on Sep 13, 2024

  1. Copy the full SHA
    9e5efaf View commit details

Commits on Sep 16, 2024

  1. Copy the full SHA
    84e1a01 View commit details
  2. new package

    Mahieu-Williame committed Sep 16, 2024
    Copy the full SHA
    4087d10 View commit details
  3. check empty array

    Mahieu-Williame committed Sep 16, 2024
    Copy the full SHA
    879ecb9 View commit details
  4. Copy the full SHA
    89d8724 View commit details

Commits on Oct 14, 2024

  1. define default value for recent field (zoom, xw_offset, yh_offset) in…

    … the AqcuisitionParamters class in the goal to read old acquisition
    Mahieu-Williame committed Oct 14, 2024
    Copy the full SHA
    ddee3ac View commit details

Commits on Oct 15, 2024

  1. insignificant change

    Mahieu-Williame committed Oct 15, 2024
    Copy the full SHA
    a0f1bc6 View commit details

Commits on Oct 18, 2024

  1. last version before merging the two branches install_without_lib and …

    …main, in transfer_data, del three metadata mask_index - x_mask_coord and y_mask_coord because they are array
    Mahieu-Williame committed Oct 18, 2024
    Copy the full SHA
    59437af View commit details

Commits on Oct 21, 2024

  1. Copy the full SHA
    f5c0493 View commit details

Commits on Nov 4, 2024

  1. add arg in the func_path function to ask if overwrite acqui is necess…

    …ary. In the case of post-processing, this question is not of insterest
    Mahieu-Williame committed Nov 4, 2024
    Copy the full SHA
    4a2c8f3 View commit details

Commits on Nov 7, 2024

  1. Copy the full SHA
    bb67482 View commit details

Commits on Nov 18, 2024

  1. Merge pull request #15 from openspyrit/install_without_lib

    Install without lib
    tbaudier authored Nov 18, 2024
    Copy the full SHA
    13304ba View commit details
  2. Merge pull request #19 from openspyrit/dev

    correcting numpy issue (spas: Update numpy #18)
    tbaudier authored Nov 18, 2024
    Copy the full SHA
    92289fb View commit details

Commits on Nov 19, 2024

  1. Copy the full SHA
    14a8d80 View commit details
  2. Merge pull request #20 from openspyrit/install_without_lib

    reco.nn change on spyrit, some objects have changed from numpy to torch
    tbaudier authored Nov 19, 2024
    Copy the full SHA
    209bf1a View commit details
  3. Copy the full SHA
    495b762 View commit details
  4. Copy the full SHA
    174e7a5 View commit details
  5. Copy the full SHA
    21d1b5b View commit details
  6. I have clean the acquisition module in the goal to split it in the fu…

    …ture into the acquisition, acquisition_SPC2D_1arm and acquisition_SPC2D_2arms modules
    Mahieu-Williame committed Nov 19, 2024
    Copy the full SHA
    df6cdd0 View commit details

Commits on Nov 25, 2024

  1. Copy the full SHA
    342525b View commit details

Commits on Dec 3, 2024

  1. numpy v2

    nducros committed Dec 3, 2024
    Copy the full SHA
    5e48ca8 View commit details

Commits on Dec 4, 2024

  1. readme install

    nducros committed Dec 4, 2024
    Copy the full SHA
    fce6cac View commit details
  2. Merge pull request #22 from openspyrit/manifest

    Manifest
    nducros authored Dec 4, 2024
    Copy the full SHA
    d7ed5d2 View commit details

Commits on Dec 16, 2024

  1. Copy the full SHA
    4dcbcc0 View commit details
  2. Copy the full SHA
    02d489e View commit details

Commits on Jan 16, 2025

  1. nothing important

    Mahieu-Williame committed Jan 16, 2025
    Copy the full SHA
    d6ceffa View commit details

Commits on Jan 31, 2025

  1. Copy the full SHA
    fe3fb95 View commit details

Commits on Mar 3, 2025

  1. Copy the full SHA
    87921f7 View commit details
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include spas *.txt
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# Single-Pixel Acquisition Software (SPAS) - Python version
# Single-Pixel Acquisition Software (SPAS)

A python toolbox for acquisition of images based on the single-pixel framework.
It has been tested using a Digital Light Processor [DLP7000](https://www.vialux.de/en/hi-speed-v-modules.html) from ViALUX GmbH and a Spectrometer [AvaSpec-ULS2048CL-EVO](https://www.avantes.com/products/spectrometers/starline/avaspec-uls2048cl-evo/) from Avantes, but may as well work for similar equipment with a few minor changes.
SPAS is python package designed for single-pixel acquisition.

## Installation (Windows only)
SPAS has been tested for controlling a [DLP7000](https://www.vialux.de/en/hi-speed-v-modules.html) Spatial Light Modulator and an [AvaSpec-ULS2048CL-EVO](https://www.avantes.com/products/spectrometers/starline/avaspec-uls2048cl-evo/) spectrometer. It should work as well for for similar equipment with a few changes.

1. Create a new environment (tested under conda)
SPAS is a companion package to the [SPyRiT](https://github.com/openspyrit/spyrit) package.

```powershell
conda create --name my_spas_env
conda activate my_spas_env
conda install -c anaconda pip
```

2. Install the [SPyRiT](https://github.com/openspyrit/spyrit) package (tested with version 1.0.0). Typically
# Installation

## For users
The SPAS package can be installed on Linux, MacOs and Windows.

```powershell
pip install requests torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install spyrit==1.0.0
pip install git+https://github.com/openspyrit/spas.git
```

Check your installation
``` python
from spas import read_metadata
```
This functions reads the metadata an existing acquisition (e.g., available on [SPIHIM](https://pilot-warehouse.creatis.insa-lyon.fr/))

2. Clone the SPAS repository
## For developers
The SPAS package can be installed on Linux, MacOs and Windows. However, it will be fully functional on Windows only due to DLL dependencies required for harware control.

* Clone the SPAS repository

```powershell
git clone git@github.com:openspyrit/spas.git
@@ -33,16 +38,15 @@ pip install -r requirements.txt
pip install -e .
```

3. Add DLLs
* Add DLLs (optional, for instrumentation control only)

The following dynamic-link libraries (DLLs) are required
The following dynamic-link libraries (DLLs) were required to control our instrumentation

* `avaspecx64.dll` provided by your Avantes distributor
* `alpV42.dll` available [here](https://www.vialux.de/en/hi-speed-download.html) by installing the entire ALP4 library
* `avaspecx64.dll` provided by your Avantes distributor
* `alpV42.dll` available [here](https://www.vialux.de/en/hi-speed-download.html) by installing the entire ALP4 library

They should be placed inside the `lib` folder

4. The typical directory structure is
* The DLLs should be placed inside the `lib` folder. The typical directory structure is

```
├───lib
@@ -62,12 +66,30 @@ They should be placed inside the `lib` folder
│ ├───Cov_64x64.npy
```

# API Documentation
https://spas.readthedocs.io/

# Contributors (alphabetical order)
* Thomas Baudier
* Guilherme Beneti-Martin
* [Nicolas Ducros](https://www.creatis.insa-lyon.fr/~ducros/WebPage/index.html)
* Laurent Mahieu Williame

# How to cite?
When using SPAS in scientific publications, please cite the following paper:

* G. Beneti-Martin, L Mahieu-Williame, T Baudier, N Ducros, "OpenSpyrit: an Ecosystem for Reproducible Single-Pixel Hyperspectral Imaging," Optics Express, Vol. 31, No. 10, (2023). https://doi.org/10.1364/OE.483937.

# License
This project is licensed under the LGPL-3.0 license - see the [LICENSE.md](LICENSE.md) file for details

# Getting started
## Preparation (just once)
### 1. Creating Walsh-Hadamard patterns

Run in Python:
``` python
from spas import walsh_patterns
from spas.generate import walsh_patterns
walsh_patterns(save_data=True)
```
By default the patterns are 1024x768 PNG images saved in `./Walsh_64_64/`.
165 changes: 165 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
83 changes: 0 additions & 83 deletions scripts/acquisition-recon-multiprocessing.py

This file was deleted.

Loading