Comments (4)
Currently the TemperatureFeature is not wrapped in the cseabreeze backend.
And the only two Spectrometers that support it are the STS and the Spark.
But using the pyseabreeze backend it should be possible to jerry-rig it...
This is untested and (if it works) will only work with a STS or a Spark spectrometer:
import seabreeze
seabreeze.use('pyseabreeze')
import seabreeze.spectrometers as sb
import struct
# open first spectrometer
spec = sb.Spectrometer.from_serial_number()
# query number of temperature sensors
_N = spec._dev.interface.query(0x00400000, "")
N = struct.unpack("<B", _N)[0]
print "N =", N
# read temperatures
for i in range(N):
try:
temp = spec._dev.interface.query(0x00400001, struct.pack("<B", i))
except Exception as e:
print "Error reading sensor", i, "('%s')" % str(e)
else:
print "temp", i, "=", struct.unpack("<f", temp)
from python-seabreeze.
I have tested it with a STS and the output is:
N = 3
temp 0 = (29.172489166259766,)
temp 1 = (-34.25904846191406,)
temp 2 = (55.93994903564453,)
I think that temp 0 value corresponds to the temperature in Celsius.
from python-seabreeze.
From the STS datasheet page 30:
The microcontroller sensor will report values much higher than the detector board
thermistor because the microcontroller integrated circuit runs at a higher temperature.
The STS contains three memory locations for the temperature sensor as follows:
0 = Detector Board Thermistor
1 = Reserved/Internal Use
2 = Microcontroller Sensor Temperature
And:
Units are in °C.
from python-seabreeze.
with version 1.0.0 all supported SeaBreeze features are wrapped, which means, it should be possible to do this now 🎉
# if your spectometer supports the temperature feature
from seabreeze.spectrometers import Spectrometer
spec = Spectrometer.from_first_available()
spec.f.temperature.temperature_get_all()
from python-seabreeze.
Related Issues (20)
- Read gpio with raw_usb_bus_access? HOT 2
- UrlError when installing windows driver by os_setup HOT 4
- USB2000 must be read three times before getting intensities HOT 3
- 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
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.