-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
non-linearity corrections lead to infinities #40
Comments
The non-linearity correction uses coefficients stored on the spectrometer. |
I tried it and got a back a zero...
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? |
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) |
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. |
Yep, it returns all zeros:
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. |
Running
intens = spec.intensities(correct_dark_counts=True)
returns dark corrected counts, but running
intens = spec.intensities(correct_dark_counts=True, correct_nonlinearity=True)
returns infinities, as if the correction involved dividing by zero. Is there a possibility that to get nonlinearity corrections I have to do some particular exposures first? Sorry, looked in the limited documentation and didn't see anything obvious.
The text was updated successfully, but these errors were encountered: