Skip to main content

Python client for extracting data from CATE archives to numpy arrays

Project description

DESCRIPTION

Python client for extracting data from CATE archives to numpy arrays

INSTALLATION

pip install catenp

USAGE

See also catenp.catenumpy.Example

from catenp import Authenticate,ArchiveInfo,DatabaseInfo,GetData

# Authenticate to the server
tk = Authenticate(serverAddress,serverPort,cateUserName,catePassword)

# Get basic archive infor like channel raneg and sample rate
info = ArchiveInfo(serverAddress,serverPort,cateUserName)
print("Info: ")
for kk in info: print(kk,":",info[kk])


# Get database info and broad archive coverage
info = DatabaseInfo(serverAddress,serverPort,cateUserName)
print("Info: ")
for kk in info: 
    if kk !="segments": 
        print("  ",kk,":",info[kk])
    else:
        print("  segments:")
        for xx in info[kk]:
            for ll in xx: print("    ",ll,":",xx[ll]) 
        print("")


# Get detailed database coverage in a time and channel range 
cov = DatabaseCoverage(serverAddress,serverPort,cateUserName,
                        "2024-05-01T08:30:00+00:00",
                        "2024-05-01T09:30:00+00:00",
                        0,16000
                        )
print("Info: ")
for xx in cov["query"]: 
    print("\n")
    for kk in xx:
        if kk!="row_series_info": 
            print(kk,":",xx[kk])
        else:
            print("row_series_info:")
            for rr in xx["row_series_info"]:
                print(rr["min_time"],rr["max_time"],rr["min_channel"],rr["max_channel"],rr["data_url"])
                
                
# Extract some data for a time and channel range  
arr=GetData(serverAddress,serverPort,cateUserName,tstart,tstop,cstart,cstop)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catenp-0.1.3.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file catenp-0.1.3.tar.gz.

File metadata

  • Download URL: catenp-0.1.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for catenp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 00bc52d4293850ed0fd9b6bb87d6068fd5b1601d563d76f1c52890d7a19d99aa
MD5 255dca5a672ef408a72fa5a221e12d74
BLAKE2b-256 6401b20a25811a92e15fc43f304564ea82851921ffd51d3c321bde703e4cfa9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page