class documentation
class OFMThing(lt.Thing): (source)
Known subclasses: openflexure_microscope_server.things.camera.BaseCamera, openflexure_microscope_server.things.smart_scan.SmartScanThing, openflexure_microscope_server.things.stage_measure.RangeofMotionThing
A custom LabThings Thing class for the OpenFlexure Microscope.
| Method | __enter__ |
Set the data directory when the Thing is entered. |
| Method | __exit__ |
Close the OFMThing. |
| Method | create |
Create a RelativeDataPath object with this Thing set as the saving Thing. |
| Property | data |
The data directory for this thing. |
| Property | show |
Whether to show in the Gallery. |
| Class Variable | _show |
Undocumented |
| Instance Variable | _data |
Undocumented |
overridden in
openflexure_microscope_server.things.camera.BaseCamera, openflexure_microscope_server.things.smart_scan.SmartScanThingSet the data directory when the Thing is entered.
def __exit__(self, _exc_type:
type[ BaseException], _exc_value: BaseException | None, _traceback: TracebackType | None):
(source)
¶
overridden in
openflexure_microscope_server.things.camera.BaseCamera, openflexure_microscope_server.things.smart_scan.SmartScanThingClose the OFMThing.
This is needed for the context manager protocol to work. Currently it doesn't do anything.
Create a RelativeDataPath object with this Thing set as the saving Thing.
| Parameters | |
path:str | The relative path within the data directory of this Thing's data dir that the data should be saved to. |
absolute:bool | Set to True if the current path is absolute. A relative path will be returned. A validation error will be raised if the absolute path is not within the data directory. |
| Returns | |
RelativeDataPath | A RelativeDataPath object with the saving Thing already set. |