Skip to content
Snippets Groups Projects
Iaga2002.md 612 B
Newer Older
  • Learn to ignore specific revisions
  • Jeremy M Fee's avatar
    Jeremy M Fee committed
    IAGA2002 IO Factory
    ===================
    
    IAGA Ascii Exchange format.
    
    https://www.ngdc.noaa.gov/IAGA/vdat/iagaformat.html
    
    `geomagio.iaga2002.IAGA2002Factory`
    
    ## Command Line Example
    (backslashes added for readability)
    ```
    geomag.py \
    
        --input iaga2002
        --input-file /PATH/TO/IAGAFILE
    
    Jeremy M Fee's avatar
    Jeremy M Fee committed
        --inchannels H D Z F
    
        --output iaga2002
        --output-stdout
    
    Jeremy M Fee's avatar
    Jeremy M Fee committed
    ```
    
    
    ## API Example
    ```python
    from geomagio.iaga2002 import IAGA2002Factory
    from obspy.core import UTCDateTime
    
    factory = IAGA2002Factory()
    data = None
    with open('/PATH/TO/IAGAFILE', 'r') as f:
        data = factory.parse_string(f.read())
    print(data)
    ```