Last active
December 11, 2015 16:58
-
-
Save kanzure/4631087 to your computer and use it in GitHub Desktop.
spectrometer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Spectrometer: | |
def read(self): | |
""" | |
Reads the data from the last capture. | |
""" | |
raise NotImplementedError("This must be implemented by the subclass.") | |
def detect(self): | |
""" | |
Returns whether or not this type of spectrometer seems to be present. | |
""" | |
raise NotImplementedError("This must be implemented by the subclass.") | |
class Biorad199x(Spectrometer): | |
def read(self): | |
return "device data goes here" | |
class Hitachi(Spectrometer): | |
def read(self): | |
return [0.5] * 500 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment