pyASDReader


NamepyASDReader JSON
Version 1.2.3 PyPI version JSON
download
home_pageNone
SummaryA Python library for reading and parsing all versions of ASD binary spectral files
upload_time2025-10-07 03:00:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Kai Cao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords asd spectral files spectroradiometer remote sensing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### pyASDReader - Python ASD Spectral File Reader

[![PyPI version](https://img.shields.io/pypi/v/pyASDReader?style=flat-square)](https://pypi.org/project/pyASDReader/)
[![Python versions](https://img.shields.io/pypi/pyversions/pyASDReader?style=flat-square)](https://pypi.org/project/pyASDReader/)
[![License](https://img.shields.io/github/license/KaiTastic/pyASDReader?style=flat-square)](https://github.com/KaiTastic/pyASDReader/blob/main/LICENSE)
[![Tests](https://img.shields.io/github/actions/workflow/status/KaiTastic/pyASDReader/python-package.yml?branch=main&label=tests&style=flat-square)](https://github.com/KaiTastic/pyASDReader/actions)
[![Coverage](https://img.shields.io/codecov/c/github/KaiTastic/pyASDReader?style=flat-square)](https://codecov.io/gh/KaiTastic/pyASDReader)

pyASDReader is a robust Python library designed to read and parse all versions (v1-v8) of ASD (Analytical Spectral Devices) binary spectral files. It provides seamless access to spectral data, metadata, and calibration information from various ASD instruments including FieldSpec, LabSpec, TerraSpec, and more.

---

## 🚀 Key Features

- **Universal Compatibility**: Supports all ASD file versions (v1-v8) and instruments
  - FieldSpec series (4 Hi-Res NG, 4 Hi-Res, 4 Standard-Res, 4 Wide-Res)
  - LabSpec series (4 Bench, 4 Hi-Res, 4 Standard-Res)
  - TerraSpec series (4 Hi-Res, 4 Standard-Res)
  - HandHeld series (2 Pro, 2), AgriSpec, and more
  
- **Comprehensive Data Access**: Extract all spectral information
  - Spectral data (reflectance, radiance, irradiance)
  - Wavelength arrays and derivative calculations
  - Complete metadata and instrument parameters
  - Calibration data and reference measurements
  
- **Advanced Processing**: Built-in spectral analysis tools
  - First and second derivative calculations
  - Log(1/R) transformations
  - Type-safe enum constants for file attributes
  - Robust error handling and validation

## Requirements

- Python >=3.8
- numpy >=1.20.0

## Installation

### Stable Release (Recommended)

```bash
pip install pyASDReader
```

### Development Installation

For contributors and advanced users:

```bash
# Clone the repository
git clone https://github.com/KaiTastic/pyASDReader.git
cd pyASDReader

# Install in editable mode with development dependencies
pip install -e ".[dev]"

# Install with all dependencies (dev + docs + testing)
pip install -e ".[all]"
```

## Documentation

- **[CHANGELOG](CHANGELOG.md)** - Version history, feature updates, and bug fixes
- **[Version Management Guide](VERSION_MANAGEMENT.md)** - Release workflow, branch strategy, and CI/CD automation
- **[GitHub Issues](https://github.com/KaiTastic/pyASDReader/issues)** - Report bugs and request features
- **[GitHub Discussions](https://github.com/KaiTastic/pyASDReader/discussions)** - Ask questions and share ideas

## Quick Start

```python
from pyASDReader import ASDFile

# Method 1: Load file during initialization
asd_file = ASDFile("path/to/your/spectrum.asd")

# Method 2: Create instance first, then load
asd_file = ASDFile()
asd_file.read("path/to/your/spectrum.asd")

# Access basic data
wavelengths = asd_file.wavelengths    # Wavelength array
reflectance = asd_file.reflectance    # Reflectance values
metadata = asd_file.metadata          # File metadata
```

## Usage Examples

### Basic Spectral Data Access

```python
import numpy as np
import matplotlib.pyplot as plt
from pyASDReader import ASDFile

# Load ASD file
asd = ASDFile("sample_spectrum.asd")

# Basic information
print(f"File version: {asd.asdFileVersion}")
print(f"Instrument: {asd.metadata.instrumentModel}")
print(f"Number of channels: {len(asd.wavelengths)}")
print(f"Spectral range: {asd.wavelengths[0]:.1f} - {asd.wavelengths[-1]:.1f} nm")

# Plot spectrum
plt.figure(figsize=(10, 6))
plt.plot(asd.wavelengths, asd.reflectance)
plt.xlabel('Wavelength (nm)')
plt.ylabel('Reflectance')
plt.title('ASD Spectrum')
plt.grid(True)
plt.show()
```

### Advanced Spectral Analysis

```python
# Access different spectral measurements
reflectance = asd.reflectance                 # Raw reflectance
abs_reflectance = asd.absoluteReflectance     # Absolute reflectance
radiance = asd.radiance                       # Radiance data
irradiance = asd.irradiance                   # Irradiance data

# Derivative calculations
refl_1st_deriv = asd.reflectance1stDeriv      # First derivative
refl_2nd_deriv = asd.reflectance2ndDeriv      # Second derivative

# Log(1/R) transformations
log1r = asd.log1R                             # Log(1/R)
log1r_1st_deriv = asd.log1R1stDeriv          # Log(1/R) first derivative
log1r_2nd_deriv = asd.log1R2ndDeriv          # Log(1/R) second derivative
```

### Error Handling and Validation

```python
from pyASDReader import ASDFile
import os

def safe_read_asd(file_path):
    """Safely read ASD file with error handling."""
    try:
        # Check if file exists
        if not os.path.exists(file_path):
            raise FileNotFoundError(f"ASD file not found: {file_path}")
        
        # Load the file
        asd = ASDFile(file_path)
        
        # Validate data
        if asd.wavelengths is None or len(asd.wavelengths) == 0:
            raise ValueError("Invalid or empty wavelength data")
        
        if asd.reflectance is None or len(asd.reflectance) == 0:
            raise ValueError("Invalid or empty reflectance data")
        
        print(f"✓ Successfully loaded: {os.path.basename(file_path)}")
        print(f"  Channels: {len(asd.wavelengths)}")
        print(f"  Range: {asd.wavelengths[0]:.1f}-{asd.wavelengths[-1]:.1f} nm")
        
        return asd
        
    except Exception as e:
        print(f"✗ Error loading {file_path}: {str(e)}")
        return None

# Usage
asd_file = safe_read_asd("spectrum.asd")
if asd_file is not None:
    # Process the file
    pass
```

### Batch Processing

```python
import glob
from pathlib import Path

def process_asd_directory(directory_path, output_format='csv'):
    """Process all ASD files in a directory."""
    asd_files = glob.glob(os.path.join(directory_path, "*.asd"))
    
    print(f"Found {len(asd_files)} ASD files")
    
    for file_path in asd_files:
        try:
            asd = ASDFile(file_path)
            
            # Extract filename without extension
            base_name = Path(file_path).stem
            
            if output_format == 'csv':
                # Save as CSV
                output_path = f"{base_name}_spectrum.csv"
                data = np.column_stack([asd.wavelengths, asd.reflectance])
                np.savetxt(output_path, data, delimiter=',', 
                          header='Wavelength(nm),Reflectance', comments='')
                print(f"✓ Saved: {output_path}")
                
        except Exception as e:
            print(f"✗ Error processing {file_path}: {str(e)}")

# Usage
process_asd_directory("./asd_data/", output_format='csv')
```

## API Reference

### Core Classes

#### `ASDFile`

The main class for reading and parsing ASD files.

**Constructor:**
```python
ASDFile(file_path: str = None)
```

**Key Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `wavelengths` | `numpy.ndarray` | Wavelength array (nm) |
| `reflectance` | `numpy.ndarray` | Reflectance values |
| `absoluteReflectance` | `numpy.ndarray` | Absolute reflectance |
| `radiance` | `numpy.ndarray` | Radiance data |
| `irradiance` | `numpy.ndarray` | Irradiance data |
| `reflectance1stDeriv` | `numpy.ndarray` | First derivative of reflectance |
| `reflectance2ndDeriv` | `numpy.ndarray` | Second derivative of reflectance |
| `log1R` | `numpy.ndarray` | Log(1/R) transformation |
| `log1R1stDeriv` | `numpy.ndarray` | First derivative of Log(1/R) |
| `log1R2ndDeriv` | `numpy.ndarray` | Second derivative of Log(1/R) |
| `metadata` | `object` | File metadata and instrument info |
| `asdFileVersion` | `int` | ASD file format version |

**Methods:**
```python
read(file_path: str) -> None
    """Load and parse an ASD file."""
```

## Technical Documentation

### ASD File Format Support

pyASDReader supports all ASD file format versions and instrument models:

#### Supported Instruments

| **FieldSpec Series** | **LabSpec Series** | **TerraSpec Series** |
|---------------------|-------------------|---------------------|
| FieldSpec 4 Hi-Res NG | LabSpec 4 Bench | TerraSpec 4 Hi-Res |
| FieldSpec 4 Hi-Res | LabSpec 4 Hi-Res | TerraSpec 4 Standard-Res |
| FieldSpec 4 Standard-Res | LabSpec 4 Standard-Res | |
| FieldSpec 4 Wide-Res | LabSpec range | |

| **HandHeld Series** | **Other Models** |
|-------------------|------------------|
| HandHeld 2 Pro | AgriSpec |
| HandHeld 2 | |

#### File Structure Mapping

| **ASD File Component** | **pyASDReader Property** |
|----------------------|-------------------------|
| Spectrum File Header | `asdFileVersion`, `metadata` |
| Spectrum Data | `spectrumData` |
| Reference File Header | `referenceFileHeader` |
| Reference Data | `referenceData` |
| Classifier Data | `classifierData` |
| Dependent Variables | `dependants` |
| Calibration Header | `calibrationHeader` |
| Absolute/Base Calibration | `calibrationSeriesABS`, `calibrationSeriesBSE` |
| Lamp Calibration Data | `calibrationSeriesLMP` |
| Fiber Optic Data | `calibrationSeriesFO` |
| Audit Log | `auditLog` |
| Digital Signature | `signature` |

### Validation and Testing

pyASDReader has been extensively tested against **ASD ViewSpecPro 6.2.0** to ensure accuracy:

#### ✅ **Validated Features**
- Digital Number (DN) values
- Reflectance calculations (raw, 1st derivative, 2nd derivative)
- Absolute reflectance computations
- Log(1/R) transformations (raw, 1st derivative, 2nd derivative)
- Wavelength accuracy and calibration

#### 🔄 **In Development**
- Radiance calculations
- Irradiance processing  
- Parabolic jump correction algorithms

### Upcoming Features

#### Spectral Discontinuities Correction

Advanced correction algorithms for spectral jumps at detector boundaries:

- **Hueni Method**: Temperature-based correction using empirical formulas
- **ASD Parabolic Method**: Parabolic interpolation for jump correction
- Support for both automated and manual correction parameters

#### Enhanced File Format Conversion

Comprehensive export capabilities beyond the standard ASCII format:
- Multiple output formats (CSV, JSON, HDF5, NetCDF)
- Customizable data selection and filtering
- Batch processing with parallel execution
- Integration with popular spectral analysis libraries


## Citation

If you use pyASDReader in your research, please cite it using the following information:

**BibTeX format**:
```bibtex
@software{cao2025pyasdreader,
  author = {Cao, Kai},
  title = {pyASDReader: A Python Library for ASD Spectral File Reading},
  year = {2025},
  url = {https://github.com/KaiTastic/pyASDReader},
  version = {1.2.3}
}
```

**Plain text citation**:
```
Cao, Kai. (2025). pyASDReader: A Python Library for ASD Spectral File Reading. Available at: https://github.com/KaiTastic/pyASDReader
```

## References

### Official Documentation
- [ASD Inc. (2017). ASD File Format: Version 8 (Revision): 1-10](https://www.malvernpanalytical.com/en/learn/knowledge-center/user-manuals/asd-file-format-v8)
- ASD Inc. Indico Version 7 File Format: 1-9
- ASD Inc. (2008). ViewSpec Pro User Manual: 1-24  
- ASD Inc. (2015). FieldSpec 4 User Manual: 1-10

### Scientific References
- [Hueni, A. and A. Bialek (2017). "Cause, Effect, and Correction of Field Spectroradiometer Interchannel Radiometric Steps." IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 10(4): 1542-1551](https://ieeexplore.ieee.org/document/7819458)

## License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for complete details.

---

<div align="center">

**[⬆ Back to Top](#pyasdreader)**

Made with ❤️ for the spectroscopy community

[![GitHub stars](https://img.shields.io/github/stars/KaiTastic/pyASDReader?style=social)](https://github.com/KaiTastic/pyASDReader/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/KaiTastic/pyASDReader?style=social)](https://github.com/KaiTastic/pyASDReader/network/members)

</div>


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyASDReader",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Kai Cao <caokai_cgs@163.com>",
    "keywords": "ASD, spectral files, spectroradiometer, remote sensing",
    "author": null,
    "author_email": "Kai Cao <caokai_cgs@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/a2/05/2370be89b246eceab6800628ed93ba603ea2b6cbcb0adf538df8ad7368dd/pyasdreader-1.2.3.tar.gz",
    "platform": null,
    "description": "### pyASDReader - Python ASD Spectral File Reader\n\n[![PyPI version](https://img.shields.io/pypi/v/pyASDReader?style=flat-square)](https://pypi.org/project/pyASDReader/)\n[![Python versions](https://img.shields.io/pypi/pyversions/pyASDReader?style=flat-square)](https://pypi.org/project/pyASDReader/)\n[![License](https://img.shields.io/github/license/KaiTastic/pyASDReader?style=flat-square)](https://github.com/KaiTastic/pyASDReader/blob/main/LICENSE)\n[![Tests](https://img.shields.io/github/actions/workflow/status/KaiTastic/pyASDReader/python-package.yml?branch=main&label=tests&style=flat-square)](https://github.com/KaiTastic/pyASDReader/actions)\n[![Coverage](https://img.shields.io/codecov/c/github/KaiTastic/pyASDReader?style=flat-square)](https://codecov.io/gh/KaiTastic/pyASDReader)\n\npyASDReader is a robust Python library designed to read and parse all versions (v1-v8) of ASD (Analytical Spectral Devices) binary spectral files. It provides seamless access to spectral data, metadata, and calibration information from various ASD instruments including FieldSpec, LabSpec, TerraSpec, and more.\n\n---\n\n## \ud83d\ude80 Key Features\n\n- **Universal Compatibility**: Supports all ASD file versions (v1-v8) and instruments\n  - FieldSpec series (4 Hi-Res NG, 4 Hi-Res, 4 Standard-Res, 4 Wide-Res)\n  - LabSpec series (4 Bench, 4 Hi-Res, 4 Standard-Res)\n  - TerraSpec series (4 Hi-Res, 4 Standard-Res)\n  - HandHeld series (2 Pro, 2), AgriSpec, and more\n  \n- **Comprehensive Data Access**: Extract all spectral information\n  - Spectral data (reflectance, radiance, irradiance)\n  - Wavelength arrays and derivative calculations\n  - Complete metadata and instrument parameters\n  - Calibration data and reference measurements\n  \n- **Advanced Processing**: Built-in spectral analysis tools\n  - First and second derivative calculations\n  - Log(1/R) transformations\n  - Type-safe enum constants for file attributes\n  - Robust error handling and validation\n\n## Requirements\n\n- Python >=3.8\n- numpy >=1.20.0\n\n## Installation\n\n### Stable Release (Recommended)\n\n```bash\npip install pyASDReader\n```\n\n### Development Installation\n\nFor contributors and advanced users:\n\n```bash\n# Clone the repository\ngit clone https://github.com/KaiTastic/pyASDReader.git\ncd pyASDReader\n\n# Install in editable mode with development dependencies\npip install -e \".[dev]\"\n\n# Install with all dependencies (dev + docs + testing)\npip install -e \".[all]\"\n```\n\n## Documentation\n\n- **[CHANGELOG](CHANGELOG.md)** - Version history, feature updates, and bug fixes\n- **[Version Management Guide](VERSION_MANAGEMENT.md)** - Release workflow, branch strategy, and CI/CD automation\n- **[GitHub Issues](https://github.com/KaiTastic/pyASDReader/issues)** - Report bugs and request features\n- **[GitHub Discussions](https://github.com/KaiTastic/pyASDReader/discussions)** - Ask questions and share ideas\n\n## Quick Start\n\n```python\nfrom pyASDReader import ASDFile\n\n# Method 1: Load file during initialization\nasd_file = ASDFile(\"path/to/your/spectrum.asd\")\n\n# Method 2: Create instance first, then load\nasd_file = ASDFile()\nasd_file.read(\"path/to/your/spectrum.asd\")\n\n# Access basic data\nwavelengths = asd_file.wavelengths    # Wavelength array\nreflectance = asd_file.reflectance    # Reflectance values\nmetadata = asd_file.metadata          # File metadata\n```\n\n## Usage Examples\n\n### Basic Spectral Data Access\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom pyASDReader import ASDFile\n\n# Load ASD file\nasd = ASDFile(\"sample_spectrum.asd\")\n\n# Basic information\nprint(f\"File version: {asd.asdFileVersion}\")\nprint(f\"Instrument: {asd.metadata.instrumentModel}\")\nprint(f\"Number of channels: {len(asd.wavelengths)}\")\nprint(f\"Spectral range: {asd.wavelengths[0]:.1f} - {asd.wavelengths[-1]:.1f} nm\")\n\n# Plot spectrum\nplt.figure(figsize=(10, 6))\nplt.plot(asd.wavelengths, asd.reflectance)\nplt.xlabel('Wavelength (nm)')\nplt.ylabel('Reflectance')\nplt.title('ASD Spectrum')\nplt.grid(True)\nplt.show()\n```\n\n### Advanced Spectral Analysis\n\n```python\n# Access different spectral measurements\nreflectance = asd.reflectance                 # Raw reflectance\nabs_reflectance = asd.absoluteReflectance     # Absolute reflectance\nradiance = asd.radiance                       # Radiance data\nirradiance = asd.irradiance                   # Irradiance data\n\n# Derivative calculations\nrefl_1st_deriv = asd.reflectance1stDeriv      # First derivative\nrefl_2nd_deriv = asd.reflectance2ndDeriv      # Second derivative\n\n# Log(1/R) transformations\nlog1r = asd.log1R                             # Log(1/R)\nlog1r_1st_deriv = asd.log1R1stDeriv          # Log(1/R) first derivative\nlog1r_2nd_deriv = asd.log1R2ndDeriv          # Log(1/R) second derivative\n```\n\n### Error Handling and Validation\n\n```python\nfrom pyASDReader import ASDFile\nimport os\n\ndef safe_read_asd(file_path):\n    \"\"\"Safely read ASD file with error handling.\"\"\"\n    try:\n        # Check if file exists\n        if not os.path.exists(file_path):\n            raise FileNotFoundError(f\"ASD file not found: {file_path}\")\n        \n        # Load the file\n        asd = ASDFile(file_path)\n        \n        # Validate data\n        if asd.wavelengths is None or len(asd.wavelengths) == 0:\n            raise ValueError(\"Invalid or empty wavelength data\")\n        \n        if asd.reflectance is None or len(asd.reflectance) == 0:\n            raise ValueError(\"Invalid or empty reflectance data\")\n        \n        print(f\"\u2713 Successfully loaded: {os.path.basename(file_path)}\")\n        print(f\"  Channels: {len(asd.wavelengths)}\")\n        print(f\"  Range: {asd.wavelengths[0]:.1f}-{asd.wavelengths[-1]:.1f} nm\")\n        \n        return asd\n        \n    except Exception as e:\n        print(f\"\u2717 Error loading {file_path}: {str(e)}\")\n        return None\n\n# Usage\nasd_file = safe_read_asd(\"spectrum.asd\")\nif asd_file is not None:\n    # Process the file\n    pass\n```\n\n### Batch Processing\n\n```python\nimport glob\nfrom pathlib import Path\n\ndef process_asd_directory(directory_path, output_format='csv'):\n    \"\"\"Process all ASD files in a directory.\"\"\"\n    asd_files = glob.glob(os.path.join(directory_path, \"*.asd\"))\n    \n    print(f\"Found {len(asd_files)} ASD files\")\n    \n    for file_path in asd_files:\n        try:\n            asd = ASDFile(file_path)\n            \n            # Extract filename without extension\n            base_name = Path(file_path).stem\n            \n            if output_format == 'csv':\n                # Save as CSV\n                output_path = f\"{base_name}_spectrum.csv\"\n                data = np.column_stack([asd.wavelengths, asd.reflectance])\n                np.savetxt(output_path, data, delimiter=',', \n                          header='Wavelength(nm),Reflectance', comments='')\n                print(f\"\u2713 Saved: {output_path}\")\n                \n        except Exception as e:\n            print(f\"\u2717 Error processing {file_path}: {str(e)}\")\n\n# Usage\nprocess_asd_directory(\"./asd_data/\", output_format='csv')\n```\n\n## API Reference\n\n### Core Classes\n\n#### `ASDFile`\n\nThe main class for reading and parsing ASD files.\n\n**Constructor:**\n```python\nASDFile(file_path: str = None)\n```\n\n**Key Properties:**\n| Property | Type | Description |\n|----------|------|-------------|\n| `wavelengths` | `numpy.ndarray` | Wavelength array (nm) |\n| `reflectance` | `numpy.ndarray` | Reflectance values |\n| `absoluteReflectance` | `numpy.ndarray` | Absolute reflectance |\n| `radiance` | `numpy.ndarray` | Radiance data |\n| `irradiance` | `numpy.ndarray` | Irradiance data |\n| `reflectance1stDeriv` | `numpy.ndarray` | First derivative of reflectance |\n| `reflectance2ndDeriv` | `numpy.ndarray` | Second derivative of reflectance |\n| `log1R` | `numpy.ndarray` | Log(1/R) transformation |\n| `log1R1stDeriv` | `numpy.ndarray` | First derivative of Log(1/R) |\n| `log1R2ndDeriv` | `numpy.ndarray` | Second derivative of Log(1/R) |\n| `metadata` | `object` | File metadata and instrument info |\n| `asdFileVersion` | `int` | ASD file format version |\n\n**Methods:**\n```python\nread(file_path: str) -> None\n    \"\"\"Load and parse an ASD file.\"\"\"\n```\n\n## Technical Documentation\n\n### ASD File Format Support\n\npyASDReader supports all ASD file format versions and instrument models:\n\n#### Supported Instruments\n\n| **FieldSpec Series** | **LabSpec Series** | **TerraSpec Series** |\n|---------------------|-------------------|---------------------|\n| FieldSpec 4 Hi-Res NG | LabSpec 4 Bench | TerraSpec 4 Hi-Res |\n| FieldSpec 4 Hi-Res | LabSpec 4 Hi-Res | TerraSpec 4 Standard-Res |\n| FieldSpec 4 Standard-Res | LabSpec 4 Standard-Res | |\n| FieldSpec 4 Wide-Res | LabSpec range | |\n\n| **HandHeld Series** | **Other Models** |\n|-------------------|------------------|\n| HandHeld 2 Pro | AgriSpec |\n| HandHeld 2 | |\n\n#### File Structure Mapping\n\n| **ASD File Component** | **pyASDReader Property** |\n|----------------------|-------------------------|\n| Spectrum File Header | `asdFileVersion`, `metadata` |\n| Spectrum Data | `spectrumData` |\n| Reference File Header | `referenceFileHeader` |\n| Reference Data | `referenceData` |\n| Classifier Data | `classifierData` |\n| Dependent Variables | `dependants` |\n| Calibration Header | `calibrationHeader` |\n| Absolute/Base Calibration | `calibrationSeriesABS`, `calibrationSeriesBSE` |\n| Lamp Calibration Data | `calibrationSeriesLMP` |\n| Fiber Optic Data | `calibrationSeriesFO` |\n| Audit Log | `auditLog` |\n| Digital Signature | `signature` |\n\n### Validation and Testing\n\npyASDReader has been extensively tested against **ASD ViewSpecPro 6.2.0** to ensure accuracy:\n\n#### \u2705 **Validated Features**\n- Digital Number (DN) values\n- Reflectance calculations (raw, 1st derivative, 2nd derivative)\n- Absolute reflectance computations\n- Log(1/R) transformations (raw, 1st derivative, 2nd derivative)\n- Wavelength accuracy and calibration\n\n#### \ud83d\udd04 **In Development**\n- Radiance calculations\n- Irradiance processing  \n- Parabolic jump correction algorithms\n\n### Upcoming Features\n\n#### Spectral Discontinuities Correction\n\nAdvanced correction algorithms for spectral jumps at detector boundaries:\n\n- **Hueni Method**: Temperature-based correction using empirical formulas\n- **ASD Parabolic Method**: Parabolic interpolation for jump correction\n- Support for both automated and manual correction parameters\n\n#### Enhanced File Format Conversion\n\nComprehensive export capabilities beyond the standard ASCII format:\n- Multiple output formats (CSV, JSON, HDF5, NetCDF)\n- Customizable data selection and filtering\n- Batch processing with parallel execution\n- Integration with popular spectral analysis libraries\n\n\n## Citation\n\nIf you use pyASDReader in your research, please cite it using the following information:\n\n**BibTeX format**:\n```bibtex\n@software{cao2025pyasdreader,\n  author = {Cao, Kai},\n  title = {pyASDReader: A Python Library for ASD Spectral File Reading},\n  year = {2025},\n  url = {https://github.com/KaiTastic/pyASDReader},\n  version = {1.2.3}\n}\n```\n\n**Plain text citation**:\n```\nCao, Kai. (2025). pyASDReader: A Python Library for ASD Spectral File Reading. Available at: https://github.com/KaiTastic/pyASDReader\n```\n\n## References\n\n### Official Documentation\n- [ASD Inc. (2017). ASD File Format: Version 8 (Revision): 1-10](https://www.malvernpanalytical.com/en/learn/knowledge-center/user-manuals/asd-file-format-v8)\n- ASD Inc. Indico Version 7 File Format: 1-9\n- ASD Inc. (2008). ViewSpec Pro User Manual: 1-24  \n- ASD Inc. (2015). FieldSpec 4 User Manual: 1-10\n\n### Scientific References\n- [Hueni, A. and A. Bialek (2017). \"Cause, Effect, and Correction of Field Spectroradiometer Interchannel Radiometric Steps.\" IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 10(4): 1542-1551](https://ieeexplore.ieee.org/document/7819458)\n\n## License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for complete details.\n\n---\n\n<div align=\"center\">\n\n**[\u2b06 Back to Top](#pyasdreader)**\n\nMade with \u2764\ufe0f for the spectroscopy community\n\n[![GitHub stars](https://img.shields.io/github/stars/KaiTastic/pyASDReader?style=social)](https://github.com/KaiTastic/pyASDReader/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/KaiTastic/pyASDReader?style=social)](https://github.com/KaiTastic/pyASDReader/network/members)\n\n</div>\n\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Kai Cao\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "A Python library for reading and parsing all versions of ASD binary spectral files",
    "version": "1.2.3",
    "project_urls": {
        "Bug Reports": "https://github.com/KaiTastic/pyASDReader/issues",
        "Changelog": "https://github.com/KaiTastic/pyASDReader/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/KaiTastic/pyASDReader#readme",
        "Homepage": "https://github.com/KaiTastic/pyASDReader",
        "Issues": "https://github.com/KaiTastic/pyASDReader/issues",
        "PyPI": "https://pypi.org/project/pyASDReader/",
        "Repository": "https://github.com/KaiTastic/pyASDReader",
        "Source": "https://github.com/KaiTastic/pyASDReader"
    },
    "split_keywords": [
        "asd",
        " spectral files",
        " spectroradiometer",
        " remote sensing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fe0852475cf5e19f7d58c0b8eafde38812c7893d7a28a335efe251fdb841d12e",
                "md5": "bfdea1c49bd35f0ae9761b08dbf32315",
                "sha256": "a97be56e1f48b93beb29e99d6341e976d54eb35a05bcbb27d960e81b8180441c"
            },
            "downloads": -1,
            "filename": "pyasdreader-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bfdea1c49bd35f0ae9761b08dbf32315",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 21710,
            "upload_time": "2025-10-07T03:00:19",
            "upload_time_iso_8601": "2025-10-07T03:00:19.086354Z",
            "url": "https://files.pythonhosted.org/packages/fe/08/52475cf5e19f7d58c0b8eafde38812c7893d7a28a335efe251fdb841d12e/pyasdreader-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a2052370be89b246eceab6800628ed93ba603ea2b6cbcb0adf538df8ad7368dd",
                "md5": "f4bf89ae5a06cbfc23ab527f86519560",
                "sha256": "4ab8bca2a49a3463bca51f872932d98cfa53c644d4e2308ed93ba324dd994592"
            },
            "downloads": -1,
            "filename": "pyasdreader-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f4bf89ae5a06cbfc23ab527f86519560",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 629837,
            "upload_time": "2025-10-07T03:00:20",
            "upload_time_iso_8601": "2025-10-07T03:00:20.526752Z",
            "url": "https://files.pythonhosted.org/packages/a2/05/2370be89b246eceab6800628ed93ba603ea2b6cbcb0adf538df8ad7368dd/pyasdreader-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 03:00:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KaiTastic",
    "github_project": "pyASDReader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyasdreader"
}
        
Elapsed time: 1.79537s