Skip to content

Instantly share code, notes, and snippets.

@kanzure
Last active December 11, 2015 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanzure/4631087 to your computer and use it in GitHub Desktop.
Save kanzure/4631087 to your computer and use it in GitHub Desktop.
spectrometer
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