Skip to main content

A small package for sending and receiving data to and from the CTAC VizLab.

Project description

vizlab-data-transfer

This package enables easy transferring of data to and from the VizLab!

How to set up

To use this package, we need a proper connection to Carnegie's local network. You can do this in a couple ways:

  • By using a Carnegie-managed device connected to the CarnegieEmployees network
  • By logging in with your Carnegie VPN

You'll need to set the VizLab local IP and appropriate port number - look to internal Carnegie resources for these:

from vizlab_data_transfer import vizlab

vizlab.set_ip(IP)
vizlab.set_port(PORT)

These values are stored internally by the package and persist between sessions, so set them once and you're good to go!

How to use

This package is designed to be as straightforward as possible. To send Python data to the system, use the vizlab.send() method:

from vizlab_data_transfer import vizlab

vizlab.send(data) # give a single dataset
vizlab.send([table, fig1, fig2]) # or a list of them...

Currently we support a variety of Python objects:

  • numpy ndarrays and recarrays
  • astropy FITS Table objects
  • matplotlib figures
  • pandas dataframes
  • Pillow images

Feel free to leave an issue on this repository if there's a Python object you'd like support for!

Likewise, to receive data back from the system use vizlab.receive():

from vizlab_data_transfer import vizlab

# NOTE: VizLab must be in 'receive' state before this is run so server is ready to meet this request
data = vizlab.receive() 

Currently only numeric data of type np.float32 can be returned.

Please consult the examples folder for more detailed use-cases!

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

vizlab_data_transfer-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vizlab_data_transfer-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file vizlab_data_transfer-0.1.0.tar.gz.

File metadata

  • Download URL: vizlab_data_transfer-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vizlab_data_transfer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9eb196362b8864ad4f8ec6c94730d096c5c3f1a4964331e2cfbf2b78f3da4cf7
MD5 043f38819cf52491e7605019c9246b0f
BLAKE2b-256 cb22d3a16fb345dfd01bbe8de7541ca591ef9a5cfabd409b2ee5d9ec2588e554

See more details on using hashes here.

File details

Details for the file vizlab_data_transfer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vizlab_data_transfer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 275f7c293c64e1ddc897b9b9f261816b47828a33d259ce01b3320c5e5af77fad
MD5 e8bed1bb11c870b03b77340c6880e852
BLAKE2b-256 d480796629f2948f3d744de00de6ecd68f5351e795a22b6d47be6ee5ed76218b

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