Comments (4)
Hi - I am working on a nanosatellite which will be flying with a Ocean Optics USB4000 spectrometer, and will be using python-seabreeze for onboard science data acquisition (python-seabreze is going to space!)
In support of this mission, I have written documentation for the spectrometer class, based on the documentation here:
https://oceanoptics.com/api/seabreeze/_sea_breeze_a_p_i_8h.html
In addition, our mission requires the use of the pixel binning feature, which is not currently implemented in python-seabreaze, but should be fairly trivial to add.
I was wondering if you could take a look at the documentation I have written, and see if it all checks out.
class Spectrometer:
To be added:
set_pixel_binning_factor(factor)
Description:
This function sets the pixel binning factor on the device.
Parameters:
factor - The desired pixel binning factor
Return:
none
get_pixel_binning_factor(factor)
Description:
This function gets the pixel binning factor on the device.
Parameters:
none
Return:
The current pixel binning factor
get_max_pixel_binning_factor()
Description:
This function gets the max pixel binning factor on the device.
Parameters:
boxcar_width - The width of the boxcar smoothing function to be used. Values are typically 1 to 15.
Return:
none
Note:
self._pixels and self._wavelengths will need to be updated when the
pixel binning factor is set.
Other than that, these functions follow the same form as as the code
for lamp_set_enable. Just copy and paste all the lamp code, and change
the names
Current functions:
boxcar_width(boxcar_width)
Description:
This function sets width of the boxcar filter in the the device's internal memory if that feature is supported.
Parameters:
boxcar_width - The width of the boxcar smoothing function to be used. Values are typically 1 to 15.
Return:
none
close()
Description:
This function closes the spectrometer attached to the system.
Parameters:
none
Return:
none
continuous_strobe_set_enable(enable)
Description:
This function sets the continuous strobe enable state on the device.
Parameters:
enable - A boolean used for denoting the desired state (on/off) of the continuous strobe generator. If the value of enable is nonzero, then the continuous strobe will operate. If the value of enable is zero, then the continuous strobe will stop. Note that on some devices the continuous strobe enable is tied to other enables (such as lamp enable or single strobe enable) which may cause side effect
Return:
none
continuous_strobe_set_period_micros(period_micros)
Description:
This function sets the continuous strobe period on the device.
Parameters:
period_micros The new period of the continous strobe measured in microseconds
Return:
none
eeprom_read_slot(slot)
Description:
This function reads a string out of the device's EEPROM slot and returns the result.
Parameters:
slot - The number of the slot to read out. Possible values are 0 through 17
Return:
the value read out of the EEPROM slot
from_serial_number(cls, serial=None)
Description:
Get spectrometer from serial number
Parameters:
serial - Serial number of spectrometer. If this is left blank, pick the first spectrometer
Return:
Spectrometer object
get_boxcar_width()
Description:
This function reads out an the width of the boxcar filter from the device's internal memory if that feature is supported.
Parameters:
none
Return:
the width of the boxcar filter (values typically 0-15)
get_scans_to_average()
Description:
This function reads out an the number of scans to average from the device's internal memory if that feature is supported.
Parameters:
none
Return:
the number of scans to average as an unsigned short integer
integration_time_micros(integration_time_micros)
Description:
This function sets the integration time for the specified device. This function should not be responsible for performing stability scans.
Parameters:
integration_time_micros - The new integration time in units of microseconds
Return:
none
intensities(correct_dark_counts=False, correct_nonlinearity=False)
Description:
This acquires a spectrum and returns the answer as a numpy array. In this mode, auto-nulling should be automatically performed for devices that support it.
Parameters:
correct_dark_counts (optional)
correct_nonlinearity (optional)
Return:
The intensity at each wavelength
irrad_calibration()
Description:
This function reads out an irradiance calibration from the spectrometer's internal memory if that feature is supported.
Parameters:
none
Return:
Irradiance calibration scalars (one per pixel)
irrad_calibration_collection_area()
Description:
This function reads an irradiance collection area from the device's internal memory if that feature is supported.
Parameters:
none
Return:
collection area (usually in units of cm^2) read from device
lamp_set_enable(enable)
Description:
This function sets the strobe enable on the spectrometer.
Parameters:
none
Return:
enable - A value for denoting the desired value (high/low) of the strobe-enable pin. If the value of enable is zero, then the pin should be set low. If the value of enable is non-zero, then the pin should be set high.
light_sources()
Description:
This function gets the number of light sources that are represented by each featureID. Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.
Parameters:
none
Return:
a tupple containint the number of light sources (e.g. bulbs) for each feature
minimum_integration_time_micros()
Description:
This function returns the smallest integration time setting, in microseconds, that is valid for the spectrometer.
Parameters:
none
Return:
Returns minimum legal integration time in microseconds
model()
Description:
return model of spectrometer
Parameters:
none
Return:
model
pixels()
Description:
This returns an integer denoting the number of pixels in a formatted spectrum.
Parameters:
none
Return:
the length of a formatted spectrum.
scans_to_average(scans_to_average)
Description:
This function sets the number of scans to average in the the device's internal memory if that feature is supported.
Parameters:
scans_to_average - The number of spectrum scans used to generate a less noisy spectrum due to averaging
Return:
none
serial_number()
Description:
This function gets device serial number
Parameters:
none
Return:
Device serial number
shutter_set_open(state)
Description:
This function sets the shutter state on the device.
Parameters:
state - A value used for denoting the desired state (opened/closed) of the shutter. If the value of opened is non-zero, then the shutter will open. If the value of opened is zero, then the shutter will close.
Return:
none
spectrum(correct_dark_counts=False, correct_nonlinearity=False)
Description:
This function gets wavelengths and intensities
Parameters:
none
Return:
wavelengths and intensities
stray_light_coeffs()
Description:
This function reads out stray light coefficients from the device's internal memory if that feature is supported.
Parameters:
none
Return:
stray light coefficients
tec_get_temperature_C()
Description:
This function reads the actual temperature of the TEC and returns the value in degrees celsius.
Parameters:
none
Return:
The TEC temperature in degrees celsius.
tec_set_enable(enable)
Description:
This function enables the TEC feature on the device.
Parameters:
enable - A character that denotes the desired TEC enable state. If the value of enable is zero, the TEC should be disabled. If the value of enable is non-zero, the TEC should be enabled.
Return:
none
tec_set_temperature_C(set_point_C)
Description:
This function sets the target (setpoint) TEC temperature.
Parameters:
set_point_C - desired temperature, in degrees celsius.
Return:
none
trigger_mode(mode)
Description:
This function sets the trigger mode for the specified device. Note that requesting an unsupported mode will result in an error.
Parameters:
mode - (Input) a trigger mode (0 = normal, 1 = software, 2 = synchronization, 3 = external hardware, etc - check your particular spectrometer's Data Sheet)
Return:
none
wavelengths()
Description:
This function gets the wavelengths for the spectrometer
Parameters:
none
Return:
the wavelengths for the spectrometer
from python-seabreeze.
Hi @aztennenbaum,
wow, very very cool! Is it a cubesat? when will it be launched? is there more info on your mission?
For adding the documentation it would be best if you create a pull request. Then it's easiest for me to comment on everything.
I will be very busy the next 3 weeks, but after that, I'll have some time to help :)
-Andreas
from python-seabreeze.
Very very much appreciated!!!
from python-seabreeze.
sphinx docs are now on https://python-seabreeze.readthedocs.io/en/latest/
from python-seabreeze.
Related Issues (20)
- i cant turn the lamp on HOT 3
- Buffer dtype mismatch error in write_calibration HOT 2
- 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
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.