Git Product home page Git Product logo

instrument_logger's Introduction

This is a package that implements a logging class and defines an interface for instruments that can be logged by the class.

instrument_logger

Getting Started

%python3 -m pip install git+https://github.com/natecostello/instrument_logger
%python3
>>> from instrument_logger import InstrumentLogger
>>> il = InstrumentLogger()

Working idea / rough spec:

InstrumentLogger:

  • a class for logging data from instruments to a file in a csv or simlar format that we can use panda's to analyze.
  • it can recieve a name that is prepended to the file it writes to, which is always named by the time/date of it when it starts logging
  • it can log continuously, at a requested frequency
  • it can be stopped logging continuously
  • it can log on demand if not logging continuously
  • it logs all data from all instruments assigned to it
  • each log entry is time/date stamped
  • it can be queried for its last log entry data, in which case it will return a dict of all parameter measurements keyed by parameter name including the timestamp for the log entry.
  • it can be queried for its last log entry data, in which case it will return a dict of all parameter measurements keyed by '[instrument name].[parameter name].[parameter unit]' including the timestamp for the log entry.

Instrument:

  • a thing that measures things and can be asked to provide data. This will be an abstract interface that is implemented by things. The interface is what logger uses.
  • for each parameter it measures, it has a string name and a string unit
  • it can be queried for an individual parameter measurement by that parameters's name
  • it can be queried for all of its parameters at once, in which case it returns a dict of measurements key'd by '[instrument name].[parameter name].[parameter unit]'.
  • when queried for a parameter it should not block, meaning it must buffer its latest value.

instrument_logger's People

Contributors

natecostello avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.