I am currently working with the Ocean Optics Spectrometer Hr2000+ which is needed to scan the reflection/transmission of several samples.
I downloaded the driver provided on the NI website and used the given "Acquire Continuous Waveform" as the base for my program (i aleady added some functions like graph scaling, boxcar averaging and saving the current data from the graph to a txt). Basically it works totally fine. The only problem is that the "intensity" or "spectra" on the y-axis has an offset. If no light gets to the Spectrometer the noise fluctuates around 625 points and it should fluctuate around 0 like it does in the already existing programm from Ocean Optics (Oceanview).
I could just hardcode the offset away but i do not know the actual value of the offset.
I thank you for your help in advance
Blast from the past.
I believe OceanOptics actuall yuses part of the linear sensor array to determine the "dark" value per scan and can use this as a baseline to do an "automatic" dark correction. I don't know if their drivers expose this functionality or not, maybe this is part of the difference you see. I do remember interfacing myself with such spectrometers in the past and having a bunch of "dead" pixels at the start of each scan until I realised what they were for.
The "Read Spectrum" VI has a black pixel median output which you may be able to use.
What I have done is take some number of readings (depending on integration time), at the start of your program with all light sources off. Take the average of all readings as the dark reading and subtract this from all future acquisitions. This will probably make values of some pixels negative. You could use in range and coerce to make sure it doesn't go below 0, but for my application I didn't care.