DOI: 10.5061/dryad.547d7wmh8
title: Miniaturized spectral sensing with a tunable optoelectronic interface

description: Reconstructive optoelectronic spectroscopy has generated significant
 interest in the miniaturization of traditional spectroscopic tools, such
 as spectrometers. However, most state-of-the-art demonstrations face
 fundamental limits of rank-deficiency in the photoresponse matrix. In this
 work, we demonstrate a miniaturized spectral sensing system using an
 electrically tunable compact optoelectronic interface, which generates
 distinguishable photoresponses from various input spectra, enabling
 accurate spectral identification with a device footprint of 5μm×5μm. We
 report narrow-band spectral sensing with peak accuracies of ∼0.19 nm in
 free space and ∼2.45 nm on-chip. Additionally, we implement broadband
 complex spectral sensing for material identification, applicable to
 organic dyes, metals, semiconductors, and dielectrics. This work advances
 high-performance, miniaturized optical spectroscopy for both free-space
 and on-chip applications, offering cost-effective solutions, broad
 applicability, and scalable manufacturing.
description: This is the very initial code version we used, this is a python
 version adapted from our earlier work, which was in Matlab (check
 https://doi.org/10.5281/zenodo.7012876). we believe python will provide
 more convenience in e.g., utilizing deep learning and AI based algorithm
 for further optimization.
description: We have submitted our raw data (**Data.3__Sam_15H.11092022.zip**) and
 initial code version (in Python) we used. ## Descriptions **1.File
 structure** Data.3__Sam_15H.11092022.zip         |- Learning Matrix      
           |-- Responsivity_-20.txt                 |--
 Responsivity_-19.txt                 |-- ...                 |--
 Responsivity_20.txt         |- Test Signal 1                 |--
 Signal_520nm.txt                 |-- Signal_560nm.txt                 |--
 ...                 |-- Signal_720nm.txt **2.File description** (1)
 Learning Matrix     This folder contains the photoresponsivity matrix
 measured at different gate voltage settings (marked at the end of the
 filename). Each file represents a photoresponse mapping
 (**lamda_Vds_Ids**). In this dataset, each mapping has 23 columns,
 referring to 23 different wavelengths (here, from 500 to 720 nm with a
 step of 10 nm).  (2) Test Signal 1     This folder includes 6 testing
 electrical signals (**Vgs_Vds_Ids**) measured with an 'unknown'
 input spectrum. The ground truth of this 'unknown' spectrum is
 marked in the filename. Each file has 41 columns, which correspond to the
 41 gate voltage settings (**Vgs**, from -20 to 20 V, with a step of 1 V).
 **3.Training and testing** The **python code**, and the two folders
 (**Learning Matrix** and **Test Signal**) should be placed in the same
 folder. The testing signal could be changed from one to another in the
 code by modifying the file to be loaded to variable
 '*Signal_matrix*'. The code will generate a series of
 identification results (one result at each gate voltage setting), and
 final output result is produced at last after averaging all valid results.
 The filter settings in the code select the valid results, thus modifying
 these filter settings can optimise the final output result. There are also
 possibilities in the code that enable tracking the intermediate (e.g.,
 residual, weight coefficient) in the identification process, as well as
 the visualisation of these variables.