Giter VIP home page Giter VIP logo

Comments (5)

ap-- avatar ap-- commented on August 25, 2024 1

possible for all spectrometers with version 1.0.0 🎉

In [1]: from seabreeze.spectrometers import Spectrometer                                                 
In [2]: spec = Spectrometer.from_first_available()                                                       
In [3]: spec.max_intensity                                                                               
Out[3]: 65535.0

from python-seabreeze.

ap-- avatar ap-- commented on August 25, 2024

short answer:

You shouldn't, but when using the pyseabreeze backend (it's not possible using the cseabreeze backend):

spec._dev.interface._MAX_PIXEL_VALUE

long answer:

These values are hardcoded in the seabreeze library (and therefore the cseabreeze backend) and model specific. pyseabreeze uses the same model specific values. When you know your USB product_Id, you know the max_pixel_value. Because of this you do not need to query this during runtime.
python-seabreeze returns spectra normalized to 1. (If it doesn't, consider it a bug.)

from python-seabreeze.

yakir12 avatar yakir12 commented on August 25, 2024

"python-seabreeze returns spectra normalized to 1" => fantastic!
Thanks a lot!

from python-seabreeze.

yakir12 avatar yakir12 commented on August 25, 2024

So the whole reasoning behind this issue is the need to know if something got saturated or not. I'm plotting the spectra and want to put a limit to the y-axis. This way a user will know if the integration time is too large. We have a couple of different specs in our lab (and might get others in the future), and I'd like it to work dynamically with "any" spectrometer.
spec._dev.interface._MAX_PIXEL_VALUE works great (for any Julia users, the equivalent command is spec[:_dev][:interface][:_MAX_PIXEL_VALUE]), but yea, if you meant for the spectra to come out scaled to one, they still don't.

from python-seabreeze.

ap-- avatar ap-- commented on August 25, 2024

Small update:

As soon as this gets fully merged, I'll add support for normalizing all spectra to the maximum intensity value, independent of the backend.

from python-seabreeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.