File Loading & Format Support¶
Cute Plot provides comprehensive support for multiple file formats with intelligent loading strategies optimized for performance.
Supported File Formats¶
CSV Files (.csv)¶
- Headers: Automatic header detection
- Separators: Comma, semicolon, tab (auto-detected)
- Date/Time: Automatic datetime parsing and conversion
- Large files: Lazy loading for files > 2GB
- Performance: Optimized with direct Float32 casting
PSCAD Files (.inf, .out)¶
- Info files: PSCAD .inf metadata files
- Output files: PSCAD .out time-series data
- Auto-detection: Intelligent format recognition
- Power systems: Specialized handling for power system data
PSS/E Files (.out)¶
- Dynamic output: PSS/E dynamic simulation results
- Format detection: Distinguished from PSCAD .out files
- Time-series: Full support for PSS/E time-series data
Loading Methods¶
File Menu¶
- Click File → Open
- Select one or multiple files
- Files process automatically
Drag & Drop¶
- OS Integration: Drag files from file explorer
- Multiple files: Drop multiple files simultaneously
- Template support: Automatic template application when available
Supported Locations¶
- Local files: Full file system access
- Network drives: Mapped network locations
- Removable media: USB drives, external storage
Loading Strategies¶
Intelligent Loading Decision¶
Cute Plot automatically chooses the optimal loading strategy:
# Loading decision logic
if file_size > 2GB and supports_lazy_loading:
use_lazy_loading()
else:
use_normal_loading()
Normal Loading¶
For smaller files (< 2GB): - Complete load: Entire file loaded into memory - Full processing: All data columns processed - Immediate access: All series immediately available - Performance: Optimized with Float32 casting
Lazy Loading¶
For large files (≥ 2GB): - Preview mode: Load first 200 rows as preview - On-demand: Full data loaded when series selected - Memory efficient: Minimal memory footprint - Progress feedback: Loading progress indicators
Data Processing Pipeline¶
1. File Detection & Reading¶
# Format detection
loader = get_loader(file_path) # Auto-detects format
result = loader.load() # Uses appropriate strategy
2. Column Processing¶
- Header detection: Automatic identification
- Name cleaning: Remove quotes, spaces
- Duplicate handling: Auto-rename duplicate columns
- Type conversion: Convert to Float32 for performance
3. Index Creation¶
- Time column: First column becomes time index
- Datetime parsing: Automatic format detection
- Zero offset: Time series normalized to start at 0
- Format support: Multiple datetime formats
4. Data Validation¶
- Column validation: Check for empty or invalid columns
- Data quality: Identify and report issues
- Error handling: Graceful handling of format issues
File Management¶
File Widgets¶
Each loaded file appears as a FileWidget in the sidebar: - Display name: Editable file name - Expansion: Click to show/hide series - Context menu: Right-click for options
Series Widgets¶
Individual data columns appear as SeriesWidget entries: - Column name: Original data column name - Selection: Click to select/deselect - Draggable: Drag to plots for visualization
File Operations¶
Rename Files¶
- Right-click file in sidebar
- Select Rename File
- Enter new name
- Press Enter to confirm
Close Files¶
- Right-click file in sidebar
- Select Close File
- File and all series removed from session
Performance Optimization¶
Loading Performance¶
- Parallel processing: Multi-threaded file processing
- Memory optimization: Efficient data structures
- Progress tracking: Real-time loading progress
- Error recovery: Graceful handling of loading issues
Processing Optimizations¶
# Direct Float32 casting during CSV read
schema = {col: pl.Float32 for col in columns}
df = pl.read_csv(file_path, schema=schema)
Memory Management¶
- Pyramid downsampling: Multi-level data representation
- Lazy evaluation: Process data only when needed
- Garbage collection: Automatic cleanup of unused data
Troubleshooting¶
Common Loading Issues¶
File Format Not Recognized¶
- Check extension: Ensure file has correct extension
- Content validation: Verify file contains expected data format
- Format examples: See format specifications below
Large File Performance¶
- Memory: Ensure sufficient RAM (8GB+ recommended)
- Patience: Large files may take time to process
- Lazy loading: Files >2GB automatically use lazy loading
Corrupted or Invalid Data¶
- Partial loading: Files with some invalid data may partially load
- Error messages: Check notifications for specific issues
- Data validation: Verify source data integrity
File Format Specifications¶
CSV Requirements¶
- First column: Time or index values - Headers: Column names in first row - Data: Numeric values onlyPSCAD Requirements¶
- .inf files: Valid PSCAD metadata format
- .out files: PSCAD binary output format
- Paired files: .inf and .out files should be in same directory
PSS/E Requirements¶
- .out files: Valid PSS/E dynamic simulation output
- Format validation: Must contain recognizable PSS/E headers
Advanced Loading Options¶
Lazy Loading Control¶
Override automatic lazy loading decision:
Custom Processing¶
For specialized data formats:
1. Extend BaseFileLoader
class
2. Implement custom load_normal()
and load_lazy()
methods
3. Register new loader in LOADERS
registry
Batch Loading¶
For multiple related files: 1. Select multiple files in file dialog 2. Files process in sequence 3. Progress tracking for entire batch
File Loading Best Practices¶
File Organization¶
- Consistent naming: Use clear, descriptive file names
- Directory structure: Organize related files together
- File sizes: Consider breaking very large files into segments
Performance Tips¶
- Close unused files: Remove files not currently needed
- Memory monitoring: Watch memory usage with large files
- Template preparation: Prepare templates for repeated workflows
Data Preparation¶
- Clean data: Remove invalid rows/columns before loading
- Consistent formats: Ensure consistent datetime formats
- Column names: Use descriptive, unique column names
Next Steps¶
After loading files successfully: 1. Learn Series Management 2. Explore Plotting & Visualization 3. Try Data Querying
Loading tip: Use drag & drop for quick file loading, especially with templates