Comments (6)
The non-linearity correction uses coefficients stored on the spectrometer.
They are stored in the Spectrometer class in spec._nc
Can you report the contents of spec._nc?
Maybe we need to protect against nonsensical nonlinearity coefficients in pyseabreeze.
from python-seabreeze.
I tried it and got a back a zero...
In [1]: import seabreeze.spectrometers as sb
In [2]: devices = sb.list_devices()
...: spec = sb.Spectrometer(devices[0])
...:
In [3]: spec._nc
Out[3]: poly1d([ 0.])
So it looks non-sensical if you divide by this. I've tested this with both of our Ocean Optics USB2000's and they both produce the same results.
Is this something I should contact Ocean Optics about (the coefficients being missing) or is it maybe that those coefficients were not stored for USB2000's?
from python-seabreeze.
So it could be, that your spectrometer just doesn't have any coefficients stored or it could be a problem with pyseabreeze. Report back with the output of:
print "order: '%s'" % spec.eeprom_read_slot(14)
for i in range(6, 14):
print "'%s'" % spec.eeprom_read_slot(i)
from python-seabreeze.
I think this is a bug in pyseabreeze. The order returned by your USB2000 spec.eeprom_read_slot(14) will be 0.
In this case cseabreeze will internally return a zero length vector and consequently raise an Exception, that the device does not support nonlinearity correction.
Pyseabreeze, currently just assumes that there are 8 coefficients stored, and will return a list with eight zeros.
from python-seabreeze.
Yep, it returns all zeros:
order: 'b'0\x00\x00\x000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
'b'0.000000e+000\x00\x00''
So I guess the USB2000 doesn't support nonlinearity corrections.
from python-seabreeze.
So I guess the USB2000 doesn't support nonlinearity corrections.
Well... to be nitpicky: you could still do nonlinearity correction, the device just doesn't store predetermined coefficients.
In a way if you are concerned about the linearity of your relative intensity measures, you should measure the nonlinearity coefficients PER PIXEL and not use the predetermined 7th order polynomial for the whole sensor that's (maybe) stored on the device.
But back to topic: pyseabreeze should raise an error when the polynomial order is 0.
from python-seabreeze.
Related Issues (20)
- C seabreeze doesn't report firmware version HOT 1
- Problem with set_integration_time, the spectrometer doesn't wait for spectrum acquisition. HOT 3
- Seabreeze and SR4 Spectrometers HOT 20
- Extract cseabreeze into its own module HOT 1
- Rewrite Transport to use bMaxPacketSize
- ADC1000 error with external interrupt HOT 10
- USB2000 Issue reading intensities HOT 1
- Edge Trigger Issue Continues HOT 3
- QEPro lower intensities compared with OceanView - "hidden" settings? HOT 1
- Flame-S in version 2.4.0 pyseabreeze and trigger mode HOT 2
- Overflow, still alive and well HOT 1
- Getting CPython errors when building from source HOT 1
- Install on raspberry pi HOT 5
- Basic SR2 support HOT 2
- Drivers Dont have valid signatures HOT 8
- Support for SR6 / HR6 HOT 5
- USB2000 and some Flame S error at initialization due to fpga firmware version register check HOT 4
- HDX spectrometer connected via USB errors after manually interrupting connection HOT 2
- Ethernet Support for HDX HOT 6
- OceanHR4 connection issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-seabreeze.