SciViewer
View scientific data files directly in VS Code.
- HDF5 (
.h5, .hdf5) - Hierarchical Data Format
- Pickle (
.pkl, .pickle, .p) - Python serialized objects
- Parquet (
.parquet, .pqt) - Columnar data format
- NumPy (
.npy) - NumPy array files
Features
- 📁 Tree view of file structure with expand/collapse
- 📊 View dataset metadata (shape, dtype, attributes)
- 👁️ Preview dataset values
- 🎨 Integrates with VS Code light/dark themes
- ↻ Refresh button to reload changed files
Requirements
- Python 3.x with appropriate packages:
pip install h5py numpy pandas pyarrow
h5py - required for HDF5 files
numpy, pandas - recommended for full pickle support
pyarrow - required for parquet files
Installation
- Install from VS Code Marketplace (search "SciViewer")
- Ensure Python is available in your PATH
- (Optional) Configure
sciViewer.pythonPath if Python is not auto-detected
Usage
Simply open any supported file in VS Code. The custom viewer will automatically display the file structure.
- Click on groups (📁) to expand/collapse
- Click on datasets (📊) to view details and data preview
Pickle Support
Pickle files display Python objects as a tree:
dict → expandable group
list, tuple, set → expandable group with indexed children
numpy.ndarray → dataset with shape, dtype, preview
pandas.DataFrame → dataset with shape, preview of first rows
- Scalars (
int, float, str, etc.) → dataset with value preview
- Custom objects → dataset with
str() representation
Parquet Support
Parquet files display a tabular view with:
- Summary - row count, column count, compression, file size
- Schema - column names and data types
- Preview - first 10 rows as a table
NumPy Array Support
NumPy .npy files display:
- Shape - array dimensions
- Dtype - data type
- Preview - first 20 elements (flattened)
Extension Settings
| Setting |
Description |
Default |
sciViewer.pythonPath |
Path to Python interpreter |
Auto-detect |
Troubleshooting
"No module named 'h5py'"
- Install h5py:
pip install h5py
- Or set
sciViewer.pythonPath to a Python environment that has h5py
"Failed to spawn Python"
- Ensure Python is installed and in your PATH
- Or set
sciViewer.pythonPath to the full path of your Python executable
License
MIT
| |