Data writers in QGL, Auspex, libaps2

It would be nice to have some documentation on how data is stored, processed, and passed around between the three software packages. I see four situations where data is passed into or out of files.

  • Data written to .aps2 files by QGL
  • Data read by libaps2 and set to the APS2
  • Data written by Auspex into .auspex data files
  • Data read by Auspex/Qlab.jl for analysis

These cover ~99% of the situations I can imagine in our normal data flow. The rest of this document is an exploration and note-to-future-self about how this process works and how it could be changed in the future.

QGL to .aps2 files

The first situation will require QGL to create sequence files for the APS2. Here, we'll create these files and read them back into the workspace to see how they are packed.


In [1]:
import QGL.config
from QGL import *

In [2]:
# a minimal example of a qubit control chain
cl = ChannelLibrary(db_resource_name=":memory:")
q2 = cl.new_qubit("q2")

# specify the particulars for a rack of APS2s
ip_addresses = [f"192.168.1.{i}" for i in [23, 24, 25, 28]]
aps2 = cl.new_APS2_rack("Maxwell", ip_addresses, tdm_ip="192.168.1.11")
aps2.px("TDM").trigger_interval = 500e-6
cl.set_master(aps2.px("TDM"))

# initialize all four APS2 to linear regime
for i in range(1,4):
    aps2.tx(i).ch(1).I_channel_amp_factor = 0.5
    aps2.tx(i).ch(1).Q_channel_amp_factor = 0.5
    aps2.tx(i).ch(1).amp_factor = 1

# create a digitizer - X6 in this case
dig_1  = cl.new_X6("MyX6", address=0)
dig_1.record_length = 1024 + 256

AM2 = cl.new_source("AutodyneM2", "HolzworthHS9000", "HS9004A-492-1", 
                     power=16.0, frequency= 6.74621e9, reference="10MHz")
q2src = cl.new_source("q2source", "HolzworthHS9000", "HS9004A-492-2", 
                     power=16.0, frequency=5.0122e9, reference="10MHz")

cl.set_measure(q2, aps2.tx(2), dig_1.channels[1], gate=False, trig_channel=aps2.tx(2).ch("m2"), generator=AM2)
cl.set_control(q2, aps2.tx(4), generator=q2src)


Creating engine...

In [3]:
seqs = [[X(q2),Y(q2),X(q2),MEAS(q2)]]

In [4]:
mf = compile_to_hardware(seqs, 'utils/file_doc')


Compiled 1 sequences.

So now we have .aps2 files in the utils/file_doc folder, along with a .json metafile. mf is a file path to the .json metafile that holds metadata about the sequence and where the .aps2 files are stored. Note, the file extension is set byt the dirver used in QGL. If you were using an APS1 or a APS3, you would see .aps1 or .aps3 files. Not these files are structurally the same, just name differently for clarity.


In [5]:
mf


Out[5]:
'/Users/mware/Github/AWGDir/utils/file_doc-meta.json'

In [6]:
import json

In [7]:
md = json.load(open(mf, "r"))
md


Out[7]:
{'axis_descriptor': [{'name': 'segment',
   'partition': 1,
   'points': [1],
   'unit': None}],
 'database_info': {'db_provider': 'sqlite',
  'db_resource_name': ':memory:',
  'library_id': 1,
  'library_name': 'working'},
 'edges': [],
 'instruments': {'Maxwell_U2': '/Users/mware/Github/AWGDir/utils/file_doc-Maxwell_U2.aps2',
  'Maxwell_U4': '/Users/mware/Github/AWGDir/utils/file_doc-Maxwell_U4.aps2'},
 'measurements': ['M-q2'],
 'num_measurements': 1,
 'num_sequences': 1,
 'qubits': ['q2'],
 'receivers': {'RecvChan-MyX6-2': 1}}

In [8]:
APS2_control_file = md["instruments"]["Maxwell_U4"]
APS2_measure_file = md["instruments"]["Maxwell_U2"]

The metafile is just there for house-keeping across multiple .aps2 files. It also provides a record of what QGL created for each experiment. The point of this notebook is to dive into the .aps2 file structure itself. We can start by looking at the function that creates the file: QGL/QGL/drivers/APS2Pattern.py and the write_sequence_file(). The relevant code is only ~20 lines long:

with open(fileName, 'wb') as FID:
    FID.write(b'APS2')                     # target hardware
    FID.write(np.float32(4.0).tobytes())   # Version
    FID.write(np.float32(4.0).tobytes())   # minimum firmware version
    FID.write(np.uint16(2).tobytes())      # number of channels
    # FID.write(np.uint16([1, 2]).tobytes()) # channelDataFor
    FID.write(np.uint64(instructions.size).tobytes()) # instructions length
    FID.write(instructions.tobytes()) # instructions in uint64 form

    #Create the groups and datasets
    for chanct in range(2):
        #Write the waveformLib to file
        if wfInfo[chanct][0].size == 0:
            #If there are no waveforms, ensure that there is some element
            #so that the waveform group gets written to file.
            #TODO: Fix this in libaps2
            data = np.array([0], dtype=np.int16)
        else:
            data = wfInfo[chanct][0]
        FID.write(np.uint64(data.size).tobytes()) # waveform data length for channel
        FID.write(data.tobytes())

Here we can see the data is just byte encoded and written to file in a particular order. First some basic information about the hardware and minimum firmware.


In [9]:
print(b'APS2')


b'APS2'

In [10]:
np.float32(4.0).tobytes()


Out[10]:
b'\x00\x00\x80@'

In [11]:
np.uint16(2).tobytes()


Out[11]:
b'\x02\x00'

In [12]:
with open(APS2_control_file, "rb") as f:
    print(f.read())


b'APS2\x00\x00\x80@\x00\x00\x80@\x02\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x91\x00\x00\x00\x00\x00/\x00\xa1\x00\x00\x00@\x00a\x00\xa1\x00\x00\x00\x00\x00@\x00!\x00\x00\x00\x05\x00\x00\x00\r\x0b\x00\x00\x00\x00\x01\x00\xa1\x06\x00\x00\x05\x00\x00\x00\r\x00\x00\x00\x05\x00\x00\x00\r#\x00\x00\x00\x00\x01\x00\xa1\x0c\x00\x00\x1d\x00 \x00\r\x00\x00\x00\x00\x00\x00\x00`4\x00\x00\x00\x00\x00\x00\x00t\x01W\x03\xb2\x05\x84\x08\xc2\x0bQ\x0f\x07\x13\xad\x16\x05\x1a\xcf\x1c\xd0\x1e\xdc\x1f\xdc\x1f\xd0\x1e\xcf\x1c\x05\x1a\xad\x16\x07\x13Q\x0f\xc2\x0b\x84\x08\xb2\x05W\x03t\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00t\x01W\x03\xb2\x05\x84\x08\xc2\x0bQ\x0f\x07\x13\xad\x16\x05\x1a\xcf\x1c\xd0\x1e\xdc\x1f\xdc\x1f\xd0\x1e\xcf\x1c\x05\x1a\xad\x16\x07\x13Q\x0f\xc2\x0b\x84\x08\xb2\x05W\x03t\x01\x00\x00\x00\x00\x00\x00\x00\x00'

Of course, this is just the most basic look at what's in the file. To pull out more useful information, QGL has some other function for exploring the data inside.


In [13]:
QGL.drivers.APS2Pattern.read_sequence_file(APS2_control_file)


Out[13]:
{'ch1': [[(1, 0.04541570015871078),
   (1, 0.10438285923574656),
   (1, 0.17800024417043095),
   (1, 0.2661457697472836),
   (1, 0.36747649859602),
   (1, 0.4786961298986693),
   (1, 0.5946770846050543),
   (1, 0.7087046758637529),
   (1, 0.8132096203149799),
   (1, 0.9003784641679893),
   (1, 0.9630081797094372),
   (1, 0.9957270174581858),
   (1, 0.9957270174581858),
   (1, 0.9630081797094372),
   (1, 0.9003784641679893),
   (1, 0.8132096203149799),
   (1, 0.7087046758637529),
   (1, 0.5946770846050543),
   (1, 0.4786961298986693),
   (1, 0.36747649859602),
   (1, 0.2661457697472836),
   (1, 0.17800024417043095),
   (1, 0.10438285923574656),
   (1, 0.04541570015871078),
   (1, 3.1146187425024613e-16),
   (1, -2.5844387463462135e-19),
   (1, -1.2216110335518833e-15),
   (1, 3.911873736643366e-15),
   (1, 2.8801850737119535e-15),
   (1, 4.678017320548365e-16),
   (1, 1.3403101491459762e-14),
   (1, 1.1111039982203213e-14),
   (1, 7.170440821592936e-15),
   (1, 1.7620036993235762e-15),
   (1, -4.722148206664456e-15),
   (1, 1.6586494447636563e-14),
   (1, 9.755311238037664e-15),
   (1, -2.454229527286706e-14),
   (1, -3.5329244680058904e-15),
   (1, 1.4342895087219723e-14),
   (1, 2.7780232002336545e-14),
   (1, 3.6132468274928846e-14),
   (1, -1.5014693578307762e-14),
   (1, -3.6029608721843285e-15),
   (1, 3.1289718242651454e-15),
   (1, 5.930580220618218e-15),
   (1, 5.728430286558786e-15),
   (1, -1.6915801519360628e-15),
   (1, 0.04541570015871078),
   (1, 0.10438285923574656),
   (1, 0.17800024417043095),
   (1, 0.2661457697472836),
   (1, 0.36747649859602),
   (1, 0.4786961298986693),
   (1, 0.5946770846050543),
   (1, 0.7087046758637529),
   (1, 0.8132096203149799),
   (1, 0.9003784641679893),
   (1, 0.9630081797094372),
   (1, 0.9957270174581858),
   (1, 0.9957270174581858),
   (1, 0.9630081797094372),
   (1, 0.9003784641679893),
   (1, 0.8132096203149799),
   (1, 0.7087046758637529),
   (1, 0.5946770846050543),
   (1, 0.4786961298986693),
   (1, 0.36747649859602),
   (1, 0.2661457697472836),
   (1, 0.17800024417043095),
   (1, 0.10438285923574656),
   (1, 0.04541570015871078),
   (120, 0.0)]],
 'ch2': [[(1, -4.449455346432087e-17),
   (1, -1.2783213444890575e-16),
   (1, -2.615849151249187e-16),
   (1, -4.56308391038667e-16),
   (1, -7.200462684279884e-16),
   (1, -1.0552206298403356e-15),
   (1, -1.456538776375719e-15),
   (1, -6.945058000584136e-15),
   (1, -2.390146940530979e-15),
   (1, 3.5306952006662057e-15),
   (1, -3.302165677534868e-15),
   (1, -1.0733307704813967e-14),
   (1, -3.902124495215065e-15),
   (1, 2.8328120572657805e-15),
   (1, -3.969524174992337e-15),
   (1, -9.562601206157764e-15),
   (1, -3.47165165134923e-15),
   (1, 1.1667033955021486e-15),
   (1, -9.38210936099583e-15),
   (1, -4.6812105881300534e-15),
   (1, -1.5644859121325727e-15),
   (1, 1.7483065823441045e-16),
   (1, -2.148096746490886e-15),
   (1, -6.230361942564736e-16),
   (1, 0.04541570015871078),
   (1, 0.10438285923574656),
   (1, 0.17800024417043095),
   (1, 0.2661457697472836),
   (1, 0.36747649859602),
   (1, 0.4786961298986693),
   (1, 0.5946770846050543),
   (1, 0.7087046758637529),
   (1, 0.8132096203149799),
   (1, 0.9003784641679893),
   (1, 0.9630081797094372),
   (1, 0.9957270174581858),
   (1, 0.9957270174581858),
   (1, 0.9630081797094372),
   (1, 0.9003784641679893),
   (1, 0.8132096203149799),
   (1, 0.7087046758637529),
   (1, 0.5946770846050543),
   (1, 0.4786961298986693),
   (1, 0.36747649859602),
   (1, 0.2661457697472836),
   (1, 0.17800024417043095),
   (1, 0.10438285923574656),
   (1, 0.04541570015871078),
   (1, 7.123626384530595e-16),
   (1, -6.13335801480113e-16),
   (1, 5.234342591405162e-15),
   (1, 2.0879580851125654e-15),
   (1, 1.5848296652200776e-14),
   (1, 1.0323638897809846e-14),
   (1, 2.9447488031467613e-18),
   (1, 2.5008174774914194e-14),
   (1, 1.1162072831946632e-14),
   (1, -7.054702599313358e-15),
   (1, 2.6431631422265732e-14),
   (1, 5.860582771740212e-15),
   (1, -1.560849798086026e-14),
   (1, 1.888143982566443e-14),
   (1, -1.7597744319838915e-15),
   (1, 2.7102426100921372e-14),
   (1, 8.338982754780859e-15),
   (1, -5.824682731101303e-15),
   (1, 1.2200771898733532e-14),
   (1, 1.4428220669003632e-15),
   (1, 1.043517773137929e-14),
   (1, 3.1412225555880143e-15),
   (1, -4.0854594248722917e-16),
   (1, -1.156970835828324e-15),
   (120, 0.0)]],
 'm1': [[]],
 'm2': [[]],
 'm3': [[]],
 'm4': [[]]}

In [14]:
QGL.drivers.APS2Pattern.read_sequence_file(APS2_measure_file)


Out[14]:
{'ch1': [[(24, 0.0),
   (24, 0.0),
   (24, 0.0),
   (1, 0.017946526675619582),
   (1, 0.0894884629471371),
   (1, 0.34550115980954704),
   (1, 0.7392259797338542),
   (1, 0.9383469661823953),
   (1, 0.9877914784519595),
   (1, 0.9976803809058723),
   (1, 0.9995116591380784),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 1.0),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9998779147845196),
   (1, 0.9995116591380784),
   (1, 0.9976803809058723),
   (1, 0.9877914784519595),
   (1, 0.9383469661823953),
   (1, 0.7392259797338542),
   (1, 0.34550115980954704),
   (1, 0.0894884629471371),
   (1, 0.017946526675619582)]],
 'ch2': [[(24, 0.0),
   (24, 0.0),
   (24, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0),
   (1, 0.0)]],
 'm1': [[]],
 'm2': [[(72, 0), (120, 1)]],
 'm3': [[]],
 'm4': [[]]}

It might be instructive to see what the pulses should look like so we can confirm the data in the files is what was intended.


In [15]:
plot_pulse_files(mf)


Note here, the data returned in the read_sequence_file methods and in plotting is just the waveform data and not the sequence instruction data. QGL has a variety of functions you can use to inspect the sequence data:


In [16]:
QGL.drivers.APS2Pattern.raw_instructions(APS2_control_file)


Out[16]:
array([10448491872987906048, 11601324317152903168, 11601379293808033792,
        2377970971995799552,   936748722576949248, 11601273739618025483,
         936748722576949254,   936748722576949248, 11601273739618025507,
         936783907351691276,  6917529027641081856], dtype=uint64)

In [17]:
QGL.drivers.APS2Pattern.read_instructions(APS2_control_file)


Out[17]:
[SYNC,
 MODULATION; write=1 | RESET_PHASE; nco_select=0xf,
 MODULATION; write=1 | SET_FREQ; nco_select=0x1, increment=0x40000000,
 WAIT,
 WFM; engine=3, write=1 | PLAY; TA_bit=0, count=5, addr=0,
 MODULATION; write=1 | MODULATE; nco_select=0x1, count=11,
 WFM; engine=3, write=1 | PLAY; TA_bit=0, count=5, addr=6,
 WFM; engine=3, write=1 | PLAY; TA_bit=0, count=5, addr=0,
 MODULATION; write=1 | MODULATE; nco_select=0x1, count=35,
 WFM; engine=3, write=1 | PLAY; TA_bit=1, count=29, addr=12,
 GOTO | target_addr=0]

Users will likely never need to inspect .aps2 files in this detail but the above is illustrative of what information is in the files. See the documentations for more details on what the instructions actually do when decoded by the hardware. The above is a representation of our simple X,Y,X sequence created above.

Data read buy libaps2

The data read by libaps2 can be specified by the user manually or read from files like .aps2 above with the load_sequence_file() function inside libaps2:

// Read the header information
char junk[100];
uint64_t buff_length;
uint16_t num_chans;

std::fstream file(seqFile, std::ios::binary | std::ios::in);
if( !file ) throw APS2_SEQFILE_FAIL;

file.read(junk, 12); // Don't need this info
file.read(reinterpret_cast<char *> (&num_chans), sizeof(uint16_t));

// Start anew
clear_channel_data();

// Read the instructions
file.read(reinterpret_cast<char *> (&buff_length), sizeof(uint64_t));
vector<uint64_t> instructions;
instructions.resize(buff_length);
file.read(reinterpret_cast<char *> (instructions.data()), buff_length*sizeof(uint64_t));
write_sequence(instructions);

// Read the waveforms
vector<int16_t> waveform;
for (int chanct = 0; chanct < num_chans; chanct++) {
  file.read(reinterpret_cast<char *> (&buff_length), sizeof(uint64_t));
  waveform.resize(buff_length);
  file.read(reinterpret_cast<char *> (waveform.data()), buff_length*sizeof(int16_t));
  set_waveform(chanct, waveform);
}

To manually set the values a user could use the write_sequence function to write sequence instruction information and the set_waveform function to write the waveform data.

Data written by Auspex

The other end of the data taking process involves saving experimental data to file. This data could have a very rich structure and will depend on how the data pipeline was constructed in Auspex and what was saved to file using the pipeline Writer. The writer uses a data structure called AuspexDataContainer specified in auspex/data_format. It creates a directory structure with a .auspex extension where the data files are stored. This choice to use directories was intentionally made to allow for multiple file writers to work at once. The files inside the folder have the following structure:

folder/data_set_name/
                        data.dat
                        data_meta.json

Where the .dat contains the actual data and the JSON file holds meta data about data in the .dat file. The data files are numpy memmaps as explained in more detail in the next section.

Data read by Auspex

The last situation is where data needs to be read from file after the experiment is over. This could be necessary for plotting, analysis, etc... Auspex has two main functions for doing this: open_data and load_data.


In [18]:
from auspex.analysis.helpers import open_data, load_data

In [19]:
auspex_data = load_data('/Users/mware/test_data.auspex/')

In [20]:
auspex_data


Out[20]:
{'q2-rr': {'data': {'data': array([[ 0.14135742-0.06671143j,  0.29278564+0.05685425j,
            0.2131958 +0.03631592j, ..., -0.2923584 +0.09896851j,
           -0.41983032+0.01977539j, -0.31851196-0.08001709j],
          [-0.0007019 -0.08493042j, -0.48803711+0.08099365j,
           -0.01580811-0.19561768j, ...,  0.10314941+0.0663147j ,
           -0.07260132-0.06164551j,  0.03952026+0.07626343j],
          [-0.12911987-0.04852295j, -0.07565308+0.03753662j,
            0.19259644-0.12484741j, ..., -0.00152588-0.09460449j,
           -0.10635376+0.00350952j, -0.14587402-0.28305054j],
          ...,
          [-0.23001099+0.16162109j, -0.105896  -0.22988892j,
           -0.37368774+0.04934692j, ..., -0.25598145+0.15072632j,
           -0.36584473-0.13699341j, -0.14022827+0.18487549j],
          [-0.20065308+0.16748047j, -0.08407593-0.03424072j,
           -0.45407104-0.06930542j, ..., -0.33081055+0.0390625j ,
           -0.21429443+0.05517578j, -0.24783325-0.03045654j],
          [-0.08676147+0.11917114j, -0.08621216-0.05252075j,
           -0.09036255-0.23977661j, ..., -0.17028809-0.10690308j,
           -0.51547241+0.05426025j, -0.38214111-0.13134766j]]),
   'descriptor': <DataStreamDescriptor(num_dims=2, num_points=104000)>}},
 'correlate': {'data': {'data': array([ 0.00503256-5.49766277e-03j,  0.00281466-3.76601699e-03j,
           0.00249286-3.77957141e-03j,  0.00287275-3.76664583e-03j,
           0.00268472-3.89111032e-03j,  0.00133055-1.82860467e-03j,
           0.00296799-3.74868804e-03j,  0.00105649-1.91575515e-03j,
           0.00455054-5.48675116e-03j,  0.00279697-3.40158165e-03j,
           0.00294863-3.66423068e-03j,  0.00275415-3.66222474e-03j,
           0.00268305-3.63108821e-03j,  0.00439169-5.54588103e-03j,
           0.0007358 -1.75500144e-03j,  0.00250994-3.97888917e-03j,
           0.00223185-3.46999777e-03j,  0.00238802-3.83870244e-03j,
           0.00281396-3.84324557e-03j,  0.00218446-3.60439438e-03j,
           0.00265555-3.85903987e-03j,  0.00444474-5.49906925e-03j,
           0.00044338-1.87222680e-03j,  0.0025624 -3.56030998e-03j,
           0.00262037-3.79086557e-03j,  0.00304992-3.98753780e-03j,
           0.00219933-3.64243951e-03j,  0.00073397-1.81686224e-03j,
           0.00448295-5.45891119e-03j,  0.00268807-3.88357532e-03j,
           0.00087901-1.92648880e-03j,  0.00283286-3.86187416e-03j,
           0.00310277-3.58513989e-03j,  0.00284479-3.71487364e-03j,
           0.00273731-3.58450053e-03j,  0.0041757 -5.30509889e-03j,
          -0.00084527-2.99648779e-03j, -0.00090973-2.85733765e-03j,
          -0.00078861-2.98382866e-03j, -0.00093037-2.89088521e-03j,
           0.00640526-5.89891593e-05j,  0.00621363-1.51414501e-04j,
           0.00619356-2.45853327e-05j,  0.00639398-2.57833637e-04j,
          -0.0051805 -3.70022657e-03j, -0.00515269-3.57952624e-03j,
          -0.00571281-3.56846356e-03j, -0.00555112-3.59255959e-03j,
           0.01009169-8.51847408e-03j,  0.00989109-8.48741463e-03j,
           0.00996326-8.32898764e-03j,  0.01002385-8.59731993e-03j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([5.92983379e-05+3.50000121e-05j, 6.26771389e-05+3.45729925e-05j,
          6.62286058e-05+3.64177773e-05j, 6.92895837e-05+3.43641205e-05j,
          6.30071620e-05+3.48318521e-05j, 6.32614779e-05+2.95167288e-05j,
          6.87551652e-05+3.58040973e-05j, 6.45376997e-05+2.85283063e-05j,
          5.65389399e-05+3.73396837e-05j, 6.49172714e-05+3.33378425e-05j,
          6.50657282e-05+3.31443955e-05j, 6.11466453e-05+3.41355698e-05j,
          6.84196686e-05+3.66155623e-05j, 5.72948744e-05+3.51603590e-05j,
          6.71185163e-05+2.99237927e-05j, 6.26382429e-05+3.40956836e-05j,
          6.56417883e-05+3.40122767e-05j, 6.52964197e-05+3.45820935e-05j,
          6.84108028e-05+3.38226040e-05j, 6.42955790e-05+3.56663991e-05j,
          6.44314647e-05+3.26914766e-05j, 5.78494104e-05+3.17869335e-05j,
          6.37654964e-05+2.96604011e-05j, 6.24392297e-05+3.31873300e-05j,
          6.51396245e-05+3.42420838e-05j, 6.54225526e-05+3.50385070e-05j,
          6.74318590e-05+3.53590145e-05j, 6.77831844e-05+2.85641191e-05j,
          5.56344082e-05+3.12768356e-05j, 6.50513500e-05+3.08234395e-05j,
          6.63642682e-05+2.90815515e-05j, 6.69864089e-05+3.58693737e-05j,
          6.80413437e-05+3.46864490e-05j, 6.40891280e-05+3.51425075e-05j,
          6.33127757e-05+3.32056292e-05j, 5.65327270e-05+3.26046394e-05j,
          1.74445032e-05+1.40040534e-05j, 1.75001457e-05+1.39747729e-05j,
          1.75808194e-05+1.44732866e-05j, 1.67287052e-05+1.35794613e-05j,
          3.06239455e-05+2.74588311e-05j, 2.77363127e-05+2.69958191e-05j,
          2.93575780e-05+2.89465439e-05j, 2.77199785e-05+2.85375045e-05j,
          3.94160073e-05+2.47553254e-05j, 4.02147171e-05+2.49823762e-05j,
          3.73200949e-05+2.56716437e-05j, 3.91769274e-05+2.54489833e-05j,
          4.09218694e-05+3.71355452e-05j, 4.12305713e-05+3.66385831e-05j,
          3.78338323e-05+3.74363991e-05j, 4.09504348e-05+3.67498226e-05j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q3-main': {'data': {'data': array([-0.01372028+0.01876312j, -0.01166953+0.01800883j,
          -0.01102237+0.01804137j, -0.01163625+0.01826019j,
          -0.01098599+0.01801384j, -0.01270232+0.01828203j,
          -0.01198212+0.01846523j, -0.01253404+0.01846761j,
          -0.01231064+0.0178351j , -0.0122677 +0.01828192j,
          -0.01193912+0.01835315j, -0.01256786+0.01799083j,
          -0.0124106 +0.01845093j, -0.01117278+0.01824678j,
          -0.01096596+0.01772151j, -0.0100453 +0.01789558j,
          -0.01038405+0.01782051j, -0.01062581+0.01783133j,
          -0.01176779+0.01901212j, -0.01126561+0.01822142j,
          -0.01021126+0.01814005j, -0.01151274+0.01840489j,
          -0.01085048+0.01841335j, -0.01119952+0.01796892j,
          -0.0117726 +0.01900449j, -0.01210133+0.01838049j,
          -0.01027179+0.01808855j, -0.011769  +0.01806093j,
          -0.01114371+0.01836464j, -0.0108681 +0.0182482j ,
          -0.01215823+0.01835577j, -0.01209071+0.01842953j,
          -0.01295355+0.01795776j, -0.01177435+0.01807834j,
          -0.01165302+0.01819693j, -0.0099817 +0.01797285j,
           0.01481665+0.0150639j ,  0.01528624+0.01431354j,
           0.01539598+0.01495706j,  0.015996  +0.01486507j,
          -0.03796243+0.02235928j, -0.03754861+0.02226552j,
          -0.03751343+0.0220558j , -0.03777768+0.02294066j,
           0.01481396+0.01504456j,  0.01509293+0.01476498j,
           0.01634294+0.01460875j,  0.01597392+0.01475937j,
          -0.03770018+0.02250256j, -0.0372444 +0.02200539j,
          -0.03761143+0.02216432j, -0.03760298+0.02267546j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([0.00093188+0.00014876j, 0.00088918+0.00014025j,
          0.00093857+0.00015056j, 0.00092799+0.00014456j,
          0.00093937+0.00013893j, 0.00089371+0.00014442j,
          0.00095752+0.00014379j, 0.00091941+0.00014654j,
          0.00088801+0.00014995j, 0.00091396+0.00014428j,
          0.0009166 +0.00013728j, 0.00089038+0.00014706j,
          0.00094252+0.00014767j, 0.00091094+0.00014883j,
          0.00093063+0.0001438j , 0.00093076+0.00014872j,
          0.00092941+0.00014249j, 0.00089681+0.00014324j,
          0.00093999+0.000142j  , 0.00092984+0.00014896j,
          0.00092032+0.00013857j, 0.00091034+0.00014311j,
          0.00091408+0.00015305j, 0.00090922+0.00014345j,
          0.00092963+0.0001436j , 0.00092606+0.00014498j,
          0.00095415+0.00014321j, 0.00093257+0.00014893j,
          0.00091804+0.00014826j, 0.00090109+0.00013537j,
          0.00095387+0.00015372j, 0.00093372+0.00014345j,
          0.0009355 +0.00013995j, 0.00093008+0.00013958j,
          0.00090735+0.00015248j, 0.00088551+0.00014211j,
          0.00037256+0.00013899j, 0.0003318 +0.00014554j,
          0.00034466+0.00015078j, 0.00032667+0.0001407j ,
          0.000174  +0.00011991j, 0.00017676+0.00011115j,
          0.00017155+0.00011775j, 0.00017545+0.00011446j,
          0.00033328+0.00014287j, 0.00034267+0.00014286j,
          0.0003085 +0.00014777j, 0.00033355+0.00014945j,
          0.00016111+0.00011989j, 0.00020115+0.0001149j ,
          0.00015573+0.00011107j, 0.00016942+0.00011558j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q2-main': {'data': {'data': array([-0.21082539-0.01154156j, -0.21598453-0.0102796j ,
          -0.2122628 -0.00743111j, -0.21295621-0.00911182j,
          -0.21195979-0.01181885j, -0.20728793-0.01669141j,
          -0.20805388-0.0144841j , -0.20547552-0.01401611j,
          -0.2114826 -0.01103287j, -0.20743567-0.01612018j,
          -0.20435995-0.01763492j, -0.20899553-0.01077438j,
          -0.20994795-0.01547096j, -0.21059593-0.01159688j,
          -0.21041017-0.00849313j, -0.20839189-0.01140884j,
          -0.21262625-0.01393439j, -0.21721539-0.01011887j,
          -0.20983708-0.01291982j, -0.21003951-0.01122446j,
          -0.2103922 -0.01056697j, -0.20752765-0.01192252j,
          -0.2089884 -0.00891245j, -0.20406174-0.0132438j ,
          -0.20663705-0.01377797j, -0.20949117-0.01334669j,
          -0.21110732-0.01057185j, -0.20887247-0.01254921j,
          -0.20507274-0.01520171j, -0.21494058-0.01182599j,
          -0.2046523 -0.01158699j, -0.21539362-0.00903612j,
          -0.20796933-0.01711588j, -0.20728712-0.01795599j,
          -0.20655949-0.0158718j , -0.20578032-0.01678867j,
          -0.12632805-0.06795485j, -0.12376489-0.07107419j,
          -0.12325667-0.07138211j, -0.1211373 -0.06819742j,
          -0.12401898-0.07137949j, -0.1229359 -0.07009326j,
          -0.1225423 -0.07019426j, -0.12486652-0.0690457j ,
          -0.29414969+0.05007744j, -0.29352548+0.05215198j,
          -0.29796355+0.05071866j, -0.29558226+0.05304024j,
          -0.29558354+0.0475778j , -0.29568903+0.05256502j,
          -0.29323979+0.04882895j, -0.29495291+0.05146513j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([0.01907288+0.01498157j, 0.01877505+0.01482793j,
          0.0194251 +0.01591372j, 0.01992072+0.01452585j,
          0.01926845+0.01529229j, 0.01830045+0.01549605j,
          0.01953746+0.01536815j, 0.01806878+0.01515687j,
          0.0190502 +0.01624418j, 0.01929422+0.01520147j,
          0.01866471+0.01603785j, 0.01886537+0.01518523j,
          0.01885456+0.01593285j, 0.01971486+0.01557136j,
          0.01853556+0.01610634j, 0.01936782+0.01459867j,
          0.01868234+0.01498717j, 0.01961165+0.01527781j,
          0.01883332+0.0152531j , 0.01904209+0.01530172j,
          0.01961723+0.01516333j, 0.0183416 +0.01544647j,
          0.01975007+0.01545114j, 0.0183444 +0.01481893j,
          0.01808718+0.01546568j, 0.01942234+0.01438905j,
          0.01922584+0.01578327j, 0.01914264+0.01542609j,
          0.0184158 +0.01482222j, 0.01883849+0.01506309j,
          0.01907821+0.01505021j, 0.01846754+0.01516136j,
          0.01989039+0.01509646j, 0.01957062+0.01597709j,
          0.01898063+0.01463969j, 0.01890519+0.01549299j,
          0.01103968+0.01110384j, 0.01175207+0.01243694j,
          0.0115892 +0.01150508j, 0.01130054+0.01091561j,
          0.0120169 +0.01132764j, 0.01213643+0.01132257j,
          0.01175771+0.01177163j, 0.01070149+0.01180458j,
          0.0119192 +0.01167808j, 0.01193321+0.0110586j ,
          0.01210951+0.01146015j, 0.01133175+0.01082647j,
          0.01215906+0.01249067j, 0.01132955+0.0114162j ,
          0.01140202+0.01162902j, 0.01242162+0.01148022j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q3-rr': {'data': {'data': array([[-0.0055542 -0.00924683j,  0.00695801-0.02130127j,
            0.01626587+0.00494385j, ..., -0.03234863+0.01086426j,
           -0.02996826+0.00869751j, -0.0574646 +0.02880859j],
          [-0.01318359+0.00650024j,  0.02276611+0.00152588j,
            0.02832031+0.02017212j, ..., -0.03329468+0.03131104j,
           -0.0350647 +0.01211548j, -0.03302002+0.02529907j],
          [-0.02612305+0.01391602j, -0.03970337+0.03308105j,
           -0.04171753+0.01754761j, ..., -0.05340576+0.00915527j,
           -0.04055786+0.0206604j , -0.03448486+0.02346802j],
          ...,
          [-0.04751587+0.03305054j, -0.0567627 +0.012146j  ,
           -0.04833984+0.01754761j, ..., -0.05029297+0.02935791j,
           -0.02947998+0.00991821j, -0.04522705+0.02038574j],
          [-0.03448486+0.01251221j,  0.01593018-0.00158691j,
            0.02529907+0.01687622j, ..., -0.04815674+0.01654053j,
           -0.04379272+0.0279541j , -0.03952026+0.02212524j],
          [ 0.02108765+0.02285767j,  0.03311157+0.04019165j,
           -0.02563477+0.01327515j, ..., -0.04782104+0.0322876j ,
           -0.04467773+0.02523804j, -0.02227783+0.01409912j]]),
   'descriptor': <DataStreamDescriptor(num_dims=2, num_points=104000)>}}}

In [21]:
dat = open_data('/Users/mware/test_data.auspex/', groupname="q2-main", datasetname="data")
# because no file numer is given, this functions the same as load data

In [22]:
dat


Out[22]:
{'q2-rr': {'data': {'data': array([[ 0.14135742-0.06671143j,  0.29278564+0.05685425j,
            0.2131958 +0.03631592j, ..., -0.2923584 +0.09896851j,
           -0.41983032+0.01977539j, -0.31851196-0.08001709j],
          [-0.0007019 -0.08493042j, -0.48803711+0.08099365j,
           -0.01580811-0.19561768j, ...,  0.10314941+0.0663147j ,
           -0.07260132-0.06164551j,  0.03952026+0.07626343j],
          [-0.12911987-0.04852295j, -0.07565308+0.03753662j,
            0.19259644-0.12484741j, ..., -0.00152588-0.09460449j,
           -0.10635376+0.00350952j, -0.14587402-0.28305054j],
          ...,
          [-0.23001099+0.16162109j, -0.105896  -0.22988892j,
           -0.37368774+0.04934692j, ..., -0.25598145+0.15072632j,
           -0.36584473-0.13699341j, -0.14022827+0.18487549j],
          [-0.20065308+0.16748047j, -0.08407593-0.03424072j,
           -0.45407104-0.06930542j, ..., -0.33081055+0.0390625j ,
           -0.21429443+0.05517578j, -0.24783325-0.03045654j],
          [-0.08676147+0.11917114j, -0.08621216-0.05252075j,
           -0.09036255-0.23977661j, ..., -0.17028809-0.10690308j,
           -0.51547241+0.05426025j, -0.38214111-0.13134766j]]),
   'descriptor': <DataStreamDescriptor(num_dims=2, num_points=104000)>}},
 'correlate': {'data': {'data': array([ 0.00503256-5.49766277e-03j,  0.00281466-3.76601699e-03j,
           0.00249286-3.77957141e-03j,  0.00287275-3.76664583e-03j,
           0.00268472-3.89111032e-03j,  0.00133055-1.82860467e-03j,
           0.00296799-3.74868804e-03j,  0.00105649-1.91575515e-03j,
           0.00455054-5.48675116e-03j,  0.00279697-3.40158165e-03j,
           0.00294863-3.66423068e-03j,  0.00275415-3.66222474e-03j,
           0.00268305-3.63108821e-03j,  0.00439169-5.54588103e-03j,
           0.0007358 -1.75500144e-03j,  0.00250994-3.97888917e-03j,
           0.00223185-3.46999777e-03j,  0.00238802-3.83870244e-03j,
           0.00281396-3.84324557e-03j,  0.00218446-3.60439438e-03j,
           0.00265555-3.85903987e-03j,  0.00444474-5.49906925e-03j,
           0.00044338-1.87222680e-03j,  0.0025624 -3.56030998e-03j,
           0.00262037-3.79086557e-03j,  0.00304992-3.98753780e-03j,
           0.00219933-3.64243951e-03j,  0.00073397-1.81686224e-03j,
           0.00448295-5.45891119e-03j,  0.00268807-3.88357532e-03j,
           0.00087901-1.92648880e-03j,  0.00283286-3.86187416e-03j,
           0.00310277-3.58513989e-03j,  0.00284479-3.71487364e-03j,
           0.00273731-3.58450053e-03j,  0.0041757 -5.30509889e-03j,
          -0.00084527-2.99648779e-03j, -0.00090973-2.85733765e-03j,
          -0.00078861-2.98382866e-03j, -0.00093037-2.89088521e-03j,
           0.00640526-5.89891593e-05j,  0.00621363-1.51414501e-04j,
           0.00619356-2.45853327e-05j,  0.00639398-2.57833637e-04j,
          -0.0051805 -3.70022657e-03j, -0.00515269-3.57952624e-03j,
          -0.00571281-3.56846356e-03j, -0.00555112-3.59255959e-03j,
           0.01009169-8.51847408e-03j,  0.00989109-8.48741463e-03j,
           0.00996326-8.32898764e-03j,  0.01002385-8.59731993e-03j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([5.92983379e-05+3.50000121e-05j, 6.26771389e-05+3.45729925e-05j,
          6.62286058e-05+3.64177773e-05j, 6.92895837e-05+3.43641205e-05j,
          6.30071620e-05+3.48318521e-05j, 6.32614779e-05+2.95167288e-05j,
          6.87551652e-05+3.58040973e-05j, 6.45376997e-05+2.85283063e-05j,
          5.65389399e-05+3.73396837e-05j, 6.49172714e-05+3.33378425e-05j,
          6.50657282e-05+3.31443955e-05j, 6.11466453e-05+3.41355698e-05j,
          6.84196686e-05+3.66155623e-05j, 5.72948744e-05+3.51603590e-05j,
          6.71185163e-05+2.99237927e-05j, 6.26382429e-05+3.40956836e-05j,
          6.56417883e-05+3.40122767e-05j, 6.52964197e-05+3.45820935e-05j,
          6.84108028e-05+3.38226040e-05j, 6.42955790e-05+3.56663991e-05j,
          6.44314647e-05+3.26914766e-05j, 5.78494104e-05+3.17869335e-05j,
          6.37654964e-05+2.96604011e-05j, 6.24392297e-05+3.31873300e-05j,
          6.51396245e-05+3.42420838e-05j, 6.54225526e-05+3.50385070e-05j,
          6.74318590e-05+3.53590145e-05j, 6.77831844e-05+2.85641191e-05j,
          5.56344082e-05+3.12768356e-05j, 6.50513500e-05+3.08234395e-05j,
          6.63642682e-05+2.90815515e-05j, 6.69864089e-05+3.58693737e-05j,
          6.80413437e-05+3.46864490e-05j, 6.40891280e-05+3.51425075e-05j,
          6.33127757e-05+3.32056292e-05j, 5.65327270e-05+3.26046394e-05j,
          1.74445032e-05+1.40040534e-05j, 1.75001457e-05+1.39747729e-05j,
          1.75808194e-05+1.44732866e-05j, 1.67287052e-05+1.35794613e-05j,
          3.06239455e-05+2.74588311e-05j, 2.77363127e-05+2.69958191e-05j,
          2.93575780e-05+2.89465439e-05j, 2.77199785e-05+2.85375045e-05j,
          3.94160073e-05+2.47553254e-05j, 4.02147171e-05+2.49823762e-05j,
          3.73200949e-05+2.56716437e-05j, 3.91769274e-05+2.54489833e-05j,
          4.09218694e-05+3.71355452e-05j, 4.12305713e-05+3.66385831e-05j,
          3.78338323e-05+3.74363991e-05j, 4.09504348e-05+3.67498226e-05j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q3-main': {'data': {'data': array([-0.01372028+0.01876312j, -0.01166953+0.01800883j,
          -0.01102237+0.01804137j, -0.01163625+0.01826019j,
          -0.01098599+0.01801384j, -0.01270232+0.01828203j,
          -0.01198212+0.01846523j, -0.01253404+0.01846761j,
          -0.01231064+0.0178351j , -0.0122677 +0.01828192j,
          -0.01193912+0.01835315j, -0.01256786+0.01799083j,
          -0.0124106 +0.01845093j, -0.01117278+0.01824678j,
          -0.01096596+0.01772151j, -0.0100453 +0.01789558j,
          -0.01038405+0.01782051j, -0.01062581+0.01783133j,
          -0.01176779+0.01901212j, -0.01126561+0.01822142j,
          -0.01021126+0.01814005j, -0.01151274+0.01840489j,
          -0.01085048+0.01841335j, -0.01119952+0.01796892j,
          -0.0117726 +0.01900449j, -0.01210133+0.01838049j,
          -0.01027179+0.01808855j, -0.011769  +0.01806093j,
          -0.01114371+0.01836464j, -0.0108681 +0.0182482j ,
          -0.01215823+0.01835577j, -0.01209071+0.01842953j,
          -0.01295355+0.01795776j, -0.01177435+0.01807834j,
          -0.01165302+0.01819693j, -0.0099817 +0.01797285j,
           0.01481665+0.0150639j ,  0.01528624+0.01431354j,
           0.01539598+0.01495706j,  0.015996  +0.01486507j,
          -0.03796243+0.02235928j, -0.03754861+0.02226552j,
          -0.03751343+0.0220558j , -0.03777768+0.02294066j,
           0.01481396+0.01504456j,  0.01509293+0.01476498j,
           0.01634294+0.01460875j,  0.01597392+0.01475937j,
          -0.03770018+0.02250256j, -0.0372444 +0.02200539j,
          -0.03761143+0.02216432j, -0.03760298+0.02267546j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([0.00093188+0.00014876j, 0.00088918+0.00014025j,
          0.00093857+0.00015056j, 0.00092799+0.00014456j,
          0.00093937+0.00013893j, 0.00089371+0.00014442j,
          0.00095752+0.00014379j, 0.00091941+0.00014654j,
          0.00088801+0.00014995j, 0.00091396+0.00014428j,
          0.0009166 +0.00013728j, 0.00089038+0.00014706j,
          0.00094252+0.00014767j, 0.00091094+0.00014883j,
          0.00093063+0.0001438j , 0.00093076+0.00014872j,
          0.00092941+0.00014249j, 0.00089681+0.00014324j,
          0.00093999+0.000142j  , 0.00092984+0.00014896j,
          0.00092032+0.00013857j, 0.00091034+0.00014311j,
          0.00091408+0.00015305j, 0.00090922+0.00014345j,
          0.00092963+0.0001436j , 0.00092606+0.00014498j,
          0.00095415+0.00014321j, 0.00093257+0.00014893j,
          0.00091804+0.00014826j, 0.00090109+0.00013537j,
          0.00095387+0.00015372j, 0.00093372+0.00014345j,
          0.0009355 +0.00013995j, 0.00093008+0.00013958j,
          0.00090735+0.00015248j, 0.00088551+0.00014211j,
          0.00037256+0.00013899j, 0.0003318 +0.00014554j,
          0.00034466+0.00015078j, 0.00032667+0.0001407j ,
          0.000174  +0.00011991j, 0.00017676+0.00011115j,
          0.00017155+0.00011775j, 0.00017545+0.00011446j,
          0.00033328+0.00014287j, 0.00034267+0.00014286j,
          0.0003085 +0.00014777j, 0.00033355+0.00014945j,
          0.00016111+0.00011989j, 0.00020115+0.0001149j ,
          0.00015573+0.00011107j, 0.00016942+0.00011558j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q2-main': {'data': {'data': array([-0.21082539-0.01154156j, -0.21598453-0.0102796j ,
          -0.2122628 -0.00743111j, -0.21295621-0.00911182j,
          -0.21195979-0.01181885j, -0.20728793-0.01669141j,
          -0.20805388-0.0144841j , -0.20547552-0.01401611j,
          -0.2114826 -0.01103287j, -0.20743567-0.01612018j,
          -0.20435995-0.01763492j, -0.20899553-0.01077438j,
          -0.20994795-0.01547096j, -0.21059593-0.01159688j,
          -0.21041017-0.00849313j, -0.20839189-0.01140884j,
          -0.21262625-0.01393439j, -0.21721539-0.01011887j,
          -0.20983708-0.01291982j, -0.21003951-0.01122446j,
          -0.2103922 -0.01056697j, -0.20752765-0.01192252j,
          -0.2089884 -0.00891245j, -0.20406174-0.0132438j ,
          -0.20663705-0.01377797j, -0.20949117-0.01334669j,
          -0.21110732-0.01057185j, -0.20887247-0.01254921j,
          -0.20507274-0.01520171j, -0.21494058-0.01182599j,
          -0.2046523 -0.01158699j, -0.21539362-0.00903612j,
          -0.20796933-0.01711588j, -0.20728712-0.01795599j,
          -0.20655949-0.0158718j , -0.20578032-0.01678867j,
          -0.12632805-0.06795485j, -0.12376489-0.07107419j,
          -0.12325667-0.07138211j, -0.1211373 -0.06819742j,
          -0.12401898-0.07137949j, -0.1229359 -0.07009326j,
          -0.1225423 -0.07019426j, -0.12486652-0.0690457j ,
          -0.29414969+0.05007744j, -0.29352548+0.05215198j,
          -0.29796355+0.05071866j, -0.29558226+0.05304024j,
          -0.29558354+0.0475778j , -0.29568903+0.05256502j,
          -0.29323979+0.04882895j, -0.29495291+0.05146513j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>},
  'variance': {'data': array([0.01907288+0.01498157j, 0.01877505+0.01482793j,
          0.0194251 +0.01591372j, 0.01992072+0.01452585j,
          0.01926845+0.01529229j, 0.01830045+0.01549605j,
          0.01953746+0.01536815j, 0.01806878+0.01515687j,
          0.0190502 +0.01624418j, 0.01929422+0.01520147j,
          0.01866471+0.01603785j, 0.01886537+0.01518523j,
          0.01885456+0.01593285j, 0.01971486+0.01557136j,
          0.01853556+0.01610634j, 0.01936782+0.01459867j,
          0.01868234+0.01498717j, 0.01961165+0.01527781j,
          0.01883332+0.0152531j , 0.01904209+0.01530172j,
          0.01961723+0.01516333j, 0.0183416 +0.01544647j,
          0.01975007+0.01545114j, 0.0183444 +0.01481893j,
          0.01808718+0.01546568j, 0.01942234+0.01438905j,
          0.01922584+0.01578327j, 0.01914264+0.01542609j,
          0.0184158 +0.01482222j, 0.01883849+0.01506309j,
          0.01907821+0.01505021j, 0.01846754+0.01516136j,
          0.01989039+0.01509646j, 0.01957062+0.01597709j,
          0.01898063+0.01463969j, 0.01890519+0.01549299j,
          0.01103968+0.01110384j, 0.01175207+0.01243694j,
          0.0115892 +0.01150508j, 0.01130054+0.01091561j,
          0.0120169 +0.01132764j, 0.01213643+0.01132257j,
          0.01175771+0.01177163j, 0.01070149+0.01180458j,
          0.0119192 +0.01167808j, 0.01193321+0.0110586j ,
          0.01210951+0.01146015j, 0.01133175+0.01082647j,
          0.01215906+0.01249067j, 0.01132955+0.0114162j ,
          0.01140202+0.01162902j, 0.01242162+0.01148022j]),
   'descriptor': <DataStreamDescriptor(num_dims=1, num_points=52)>}},
 'q3-rr': {'data': {'data': array([[-0.0055542 -0.00924683j,  0.00695801-0.02130127j,
            0.01626587+0.00494385j, ..., -0.03234863+0.01086426j,
           -0.02996826+0.00869751j, -0.0574646 +0.02880859j],
          [-0.01318359+0.00650024j,  0.02276611+0.00152588j,
            0.02832031+0.02017212j, ..., -0.03329468+0.03131104j,
           -0.0350647 +0.01211548j, -0.03302002+0.02529907j],
          [-0.02612305+0.01391602j, -0.03970337+0.03308105j,
           -0.04171753+0.01754761j, ..., -0.05340576+0.00915527j,
           -0.04055786+0.0206604j , -0.03448486+0.02346802j],
          ...,
          [-0.04751587+0.03305054j, -0.0567627 +0.012146j  ,
           -0.04833984+0.01754761j, ..., -0.05029297+0.02935791j,
           -0.02947998+0.00991821j, -0.04522705+0.02038574j],
          [-0.03448486+0.01251221j,  0.01593018-0.00158691j,
            0.02529907+0.01687622j, ..., -0.04815674+0.01654053j,
           -0.04379272+0.0279541j , -0.03952026+0.02212524j],
          [ 0.02108765+0.02285767j,  0.03311157+0.04019165j,
           -0.02563477+0.01327515j, ..., -0.04782104+0.0322876j ,
           -0.04467773+0.02523804j, -0.02227783+0.01409912j]]),
   'descriptor': <DataStreamDescriptor(num_dims=2, num_points=104000)>}}}

In [23]:
dat, desc = open_data(25, '/Users/mware/IpythonNotebooks/explorations/Tomography/', groupname="q2-main", datasetname="data", date="200428")

In [24]:
dat


Out[24]:
array([ 0.11757491+8.94790649e-04j,  0.11372945+7.61291504e-04j,
        0.1097108 +3.41381836e-03j,  0.11565305+3.85566711e-03j,
        0.11406972-6.02569580e-05j,  0.11434543+1.45050049e-03j,
        0.12690302+1.96986389e-03j,  0.1236591 -2.21801758e-03j,
        0.12270319+2.78347778e-03j,  0.11674556+2.14483643e-03j,
        0.12332887-3.34823608e-04j,  0.11484883+7.74255371e-03j,
        0.11116234+1.95097351e-03j,  0.11834564+6.18302917e-03j,
        0.12073071+2.30850220e-04j,  0.11195461-1.55059814e-03j,
        0.11595827+2.38290405e-03j,  0.11267494+3.08003235e-03j,
        0.11376691+1.71936035e-03j,  0.11398874+2.71911621e-04j,
        0.11998241-1.44273376e-03j,  0.1172005 +4.31504822e-03j,
        0.12728264-2.39776611e-04j,  0.11995641-1.02386475e-03j,
        0.11623866+3.69152832e-03j,  0.11876387+3.94175720e-03j,
        0.11855029+6.38311768e-03j,  0.11070195+1.48429871e-03j,
        0.1203999 +7.78686523e-04j,  0.11650262+5.32414246e-03j,
        0.11384222+2.78633118e-03j,  0.11785681+7.35473633e-04j,
        0.11780998+6.74194336e-04j,  0.12144   +3.45570374e-03j,
        0.11512149+5.73417664e-03j,  0.12375719+2.01152039e-03j,
        0.23769463+2.36080322e-02j,  0.23703453+2.32244568e-02j,
        0.23687009+2.72785034e-02j,  0.23238553+2.14438934e-02j,
        0.23264581+2.15387421e-02j,  0.23855638+1.85415802e-02j,
        0.23789389+2.28363190e-02j,  0.23314722+2.50514526e-02j,
        0.00359274-1.44960022e-02j,  0.00078139-9.72546387e-03j,
        0.00313727-1.27454376e-02j,  0.00106787-9.33773804e-03j,
       -0.00164244-1.41509552e-02j, -0.0014646 -1.20254364e-02j,
        0.00271283-1.48720703e-02j,  0.00379713-2.01625977e-02j])

In [25]:
desc


Out[25]:
<DataStreamDescriptor(num_dims=1, num_points=52)>

The .dat files themselves are binary packed memmaps. They can be accessed amnually with numpy.memmap.


In [26]:
test_file = '/Users/mware/test_data.auspex/q2-main/data.dat'

In [27]:
test_data = np.memmap(test_file, dtype=complex, mode='r')

In [28]:
test_data


Out[28]:
memmap([-0.21082539-0.01154156j, -0.21598453-0.0102796j ,
        -0.2122628 -0.00743111j, -0.21295621-0.00911182j,
        -0.21195979-0.01181885j, -0.20728793-0.01669141j,
        -0.20805388-0.0144841j , -0.20547552-0.01401611j,
        -0.2114826 -0.01103287j, -0.20743567-0.01612018j,
        -0.20435995-0.01763492j, -0.20899553-0.01077438j,
        -0.20994795-0.01547096j, -0.21059593-0.01159688j,
        -0.21041017-0.00849313j, -0.20839189-0.01140884j,
        -0.21262625-0.01393439j, -0.21721539-0.01011887j,
        -0.20983708-0.01291982j, -0.21003951-0.01122446j,
        -0.2103922 -0.01056697j, -0.20752765-0.01192252j,
        -0.2089884 -0.00891245j, -0.20406174-0.0132438j ,
        -0.20663705-0.01377797j, -0.20949117-0.01334669j,
        -0.21110732-0.01057185j, -0.20887247-0.01254921j,
        -0.20507274-0.01520171j, -0.21494058-0.01182599j,
        -0.2046523 -0.01158699j, -0.21539362-0.00903612j,
        -0.20796933-0.01711588j, -0.20728712-0.01795599j,
        -0.20655949-0.0158718j , -0.20578032-0.01678867j,
        -0.12632805-0.06795485j, -0.12376489-0.07107419j,
        -0.12325667-0.07138211j, -0.1211373 -0.06819742j,
        -0.12401898-0.07137949j, -0.1229359 -0.07009326j,
        -0.1225423 -0.07019426j, -0.12486652-0.0690457j ,
        -0.29414969+0.05007744j, -0.29352548+0.05215198j,
        -0.29796355+0.05071866j, -0.29558226+0.05304024j,
        -0.29558354+0.0475778j , -0.29568903+0.05256502j,
        -0.29323979+0.04882895j, -0.29495291+0.05146513j])

In [29]:
np.size(test_data)


Out[29]:
52

Anyone using Auspex should never have to work at this level. This breakdown of the file structures is presented only for reference.