XClock Logo

User Guide

  • Installation
    • Prerequisites
      • System Requirements
      • DAQ Device Software
        • LabJack T4/T7/T8
    • Installing XClock
      • Method 1: Using uv (Recommended)
      • Method 2: Using pip
      • Method 3: Development Installation
    • Verifying Installation
      • Test Command-Line Tool
      • Test Python Import
      • Test Device Connection (Optional)
    • Troubleshooting
      • Import Errors
      • LabJack Connection Issues
      • Permission Issues on Linux
    • Next Steps
  • Quick Start Guide
    • Prerequisites
    • Your First Clock
      • Using Python
      • Using CLI
    • Multiple Synchronized Clocks
      • Python Example
      • CLI Example
    • Recording Timestamps
      • Python Example
      • CLI Example
    • Understanding the Timestamp Format
    • Continuous vs. Pulsed Clocks
      • Continuous Clocks
      • Pulsed Clocks
    • Trigger-Based Start
      • Python Example
      • CLI Example
    • Common Patterns
      • Pattern 1: Synchronize Two Cameras
      • Pattern 2: Test Device Connectivity
      • Pattern 3: Short Test Pulse
    • Next Steps
    • Common Issues
      • Clock frequency not exactly as requested
      • Device already in use
      • No pulses generated
  • Command-Line Interface
    • Installation
    • Basic Usage
    • Commands
      • start
      • stop
    • Global Options
      • --clock-tick-rates RATES
      • --device DEVICE
      • --duration SECONDS
      • --number-of-pulses PULSES
      • --when {now,on_trigger}
      • --timeout SECONDS
      • --record-timestamps
      • --detect-edges-on CHANNELS
      • --verbose / -v
    • Examples
      • Example 1: Simple Clock
      • Example 2: Multiple Synchronized Clocks
      • Example 3: Exact Pulse Count
      • Example 4: Continuous Clock with Manual Stop
      • Example 5: Trigger-Based Start
      • Example 6: Record Timestamps
      • Example 7: Monitor Additional Channels
      • Example 8: Verbose Debugging
      • Example 9: Camera Synchronization
    • Understanding Output
      • Normal Output
      • Verbose Output
      • Trigger Wait Output
      • Timestamp File Format
    • Error Handling
      • Common Errors
    • See Also
  • Device Support
    • Supported Devices
      • LabJack T4
        • Wiring Diagram
        • Pin Configuration
        • Available Channels
        • Clock Frequency Limitations
        • Example: Basic LabJack T4 Usage
        • Troubleshooting LabJack T4
      • Dummy DAQ Device
        • Example: Using Dummy Device
    • Device Comparison
    • Connection Examples
      • Single Camera Synchronization
      • Multi-Camera Setup
      • External Trigger Start
    • Electrical Specifications
      • LabJack T4 Output
      • Signal Buffering
    • Device-Specific Best Practices
      • LabJack T4
      • General
    • Performance Characteristics
      • Timing Accuracy
      • Timestamp Resolution
    • Future Device Support
    • See Also

Developer Guide

  • Adding New Device Support
    • Overview
    • Prerequisites
    • Step 1: Understand the Interface
      • Required Interface
    • Step 2: Create Your Device Class
    • Step 3: Write Tests
    • Step 4: Register in CLI (Optional)
    • Step 5: Update Package Exports
    • Step 6: Document Your Device
    • Best Practices
      • Error Handling
      • Logging
      • Resource Cleanup
      • Type Hints
    • Advanced Features
      • Timestamp Recording
      • Hardware Synchronization
      • Frequency Calculation
    • Testing Checklist
    • Common Pitfalls
      • 1. Not Handling Resource Cleanup
      • 2. Ignoring Frequency Limitations
      • 3. Thread Safety
      • 4. Hardware State
      • 5. Channel Validation
    • Example: Complete Minimal Device
    • Getting Help
    • See Also

API Reference

  • Devices API Reference
    • Overview
    • Abstract Base Class
      • ClockDaqDevice
        • Class Methods
        • Instance Methods
    • Device Implementations
      • LabJackT4
      • DummyDaqDevice
    • Data Classes
      • ClockChannel
    • Enumerations
      • EdgeType
    • Complete Example
    • See Also
  • Edge Detection API Reference
    • Overview
    • Key Concepts
      • Timestamp Recording
      • Edge Types
      • Timestamp Format
    • CSV Output Format
    • Device-Specific Implementation
      • LabJack Edge Streaming
        • LabJackEdgeStreamer
    • Usage Examples
      • Basic Timestamp Recording
      • Monitoring Additional Channels
      • Analyzing Recorded Timestamps
      • Separating Clocks
      • Detecting Missed Pulses
    • Rollover Handling
    • Performance Considerations
      • Streaming Rate
      • Memory Usage
      • File Size Estimation
    • Error Handling
      • Common Issues
    • Advanced Usage
      • Custom Processing Pipeline
    • See Also
  • Errors API Reference
    • Overview
    • Exception Hierarchy
    • Exception Classes
      • XClockException
      • XClockValueError
      • XClockDeviceError
      • XClockTimeoutError
    • Error Handling Patterns
      • Pattern 1: Catch All XClock Errors
      • Pattern 2: Handle Specific Errors Differently
      • Pattern 3: Retry on Specific Errors
      • Pattern 4: Graceful Degradation
      • Pattern 5: Context Manager (if implemented)
    • Best Practices
      • 1. Always Close Devices
      • 2. Provide Context in Error Messages
      • 3. Log Errors Appropriately
      • 4. Validate Early
    • Error Messages
    • Common Error Scenarios
      • Scenario 1: Device Not Found
      • Scenario 2: Invalid Configuration
      • Scenario 3: Resource Cleanup Errors
    • See Also
XClock
  • Search


© Copyright 2024, Joscha Schmiedt.

Built with Sphinx using a theme provided by Read the Docs.