Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEPro lower intensities compared with OceanView - "hidden" settings? #201

Open
kkakosim opened this issue Jun 19, 2023 · 1 comment
Open

Comments

@kkakosim
Copy link

spectrometer and system information

  • model: QEPro
  • operating system: Windows 10Pro x64
  • python version: 3.11.3
  • python-seabreeze version: 1.3.0
  • installed-via: pip

current problem

the spectrum intensities through seabreeze are lower than with OceanView e.g. shifted by an amount, although the settings appear to the same (i.e., integration time). I wonder if there are more settings that I am not configuring through seabreeze but are automatically there with OceanView.

I am using it through a dash platform but to make it clearer, I removed all the layout information

minimal code example and error (attached the full file)

import pandas as pd
import numpy as np
import seabreeze
from seabreeze.spectrometers import Spectrometer

# Global variables
bg_spectrum = []
curr_spectrum = []

# Utility functions
def collect_spec():
    # Replace with your actual function
    try:
        spec = Spectrometer.from_first_available()
        spec.open()
    except:
        spec.close()
        spec = Spectrometer.from_first_available()
        spec.open()
    averaging = 5
    spec.model
    spec.integration_time_micros(532000)
    #spec.trigger_mode(0)
    spec.features['strobe_lamp'][0].enable_lamp(True)
    time.sleep(1)
    intensities = spec.intensities(correct_dark_counts=True) / averaging
    for i in range(averaging-1):
        time.sleep(1) 
        intensities += spec.intensities() / averaging   
    wavelengths = spec.wavelengths()
    spec.features['strobe_lamp'][0].enable_lamp(False)
    spec.close()

def update_graph():
    global bg_spectrum, curr_spectrum
    bg_spectrum = collect_spec()
    
    time.sleep(10)

    curr_spectrum = collect_spec()
    curr_spectrum[1] = [-np.log10(a / b) for a, b in zip(curr_spectrum[1], bg_spectrum[1])]

update_graph()
@ap--
Copy link
Owner

ap-- commented Jul 16, 2023

Hi @kkakosim

Could you attach a plot comparing the two spectra?
What do you mean with "shifted"? A constant offset?

Cheers,
Andreas 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants