def post(self, args):
        # Find our attached component
        my_component = find_component("org.labthings.example.mycomponent")

        # Get arguments and start a background task
        n_averages = args.get("averages")
        return my_component.average_data(n_averages)
    def put(self, new_property_value):
        # Find our attached component
        my_component = find_component("org.labthings.example.mycomponent")

        # Apply the new value
        my_component.integration_time = new_property_value

        return my_component.integration_time
    def post(self, new_property_value):
        """Change the current magic_denoise value"""

        # Find our attached component
        my_component = find_component("org.labthings.example.mycomponent")

        # Apply the new value
        my_component.magic_denoise = new_property_value

        return my_component.magic_denoise
    def post(self, args):
        """Start an averaged measurement"""
        logging.warning("Starting a measurement")

        # Find our attached component
        my_component = find_component("org.labthings.example.mycomponent")

        # Get arguments and start a background task
        n_averages = args.get("averages")

        logging.warning("Finished a measurement")

        # Return the task information
        return my_component.average_data(n_averages)
    def get(self):
        """Show the current data value"""

        # Find our attached component
        my_component = find_component("org.labthings.example.mycomponent")
        return my_component.data
    def get(self):
        """Show the current magic_denoise value"""

        # When a GET request is made, we'll find our attached component
        my_component = find_component("org.labthings.example.mycomponent")
        return my_component.magic_denoise
 def get(self):
     # Find our attached component
     my_component = find_component("org.labthings.example.mycomponent")
     return my_component.data
 def get(self):
     # When a GET request is made, we'll find our attached component
     my_component = find_component("org.labthings.example.mycomponent")
     return my_component.integration_time