sofarocean / sofar-api-client-python

Python Client for Wavefleet
Apache License 2.0
7 stars 5 forks source link

Add processing_sources / processingSources to support cellular HDR #40

Closed tcj closed 10 months ago

tcj commented 10 months ago

for example:

d = spot.grab_data(start_date = '2023-09-20', end_date = '2023-09-25', 
    include_waves = True, 
    include_directional_moments = True, 
    processing_sources = 'all',
    limit = 12)

default to embedded

tcj commented 10 months ago
#!/usr/bin/env python3

from pysofar.sofar import SofarApi
from pysofar.spotter import Spotter

import json

spotid = 'SPOT-30___C'

api = SofarApi()

spot = Spotter(spotid, spotid)
spot.update()

# print(spot)

d = spot.grab_data(start_date = '2023-09-20', end_date = '2023-09-25', 
    include_waves = True, 
    include_directional_moments = True, 
    processing_sources = 'all',
    limit = 12)

print(json.dumps(d, indent=2))