auspex.filters package

Submodules

auspex.filters.average module

class auspex.filters.average.Averager(axis=None, threshold=0.5, **kwargs)

Takes data and collapses along the specified axis.

axis = <Parameter(name='axis',value=None)>
final_counts = <OutputConnector(name=)>
final_init()
final_variance = <OutputConnector(name=)>
partial_average = <OutputConnector(name=)>
process_data(data)
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
threshold = <FloatParameter(name='threshold',value=None)>
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

auspex.filters.channelizer module

class auspex.filters.channelizer.Channelizer(frequency=None, bandwidth=None, decimation_factor=None, follow_axis=None, follow_freq_offset=None, **kwargs)

Digital demodulation and filtering to select a particular frequency multiplexed channel. If an axis name is supplied to follow_axis then the filter will demodulate at the freqency axis_frequency_value - follow_freq_offset otherwise it will demodulate at frequency. Note that the filter coefficients are still calculated with respect to the frequency paramter, so it should be chosen accordingly when follow_axis is defined.

bandwidth = <FloatParameter(name='bandwidth',value=5000000.0)>
decimation_factor = <IntParameter(name='decimation_factor',value=4)>
final_init()
follow_axis = <Parameter(name='follow_axis',value='')>
follow_freq_offset = <FloatParameter(name='follow_freq_offset',value=0.0)>
frequency = <FloatParameter(name='frequency',value=10000000.0)>
init_filters(frequency, bandwidth)
process_data(data)
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

update_references(frequency)

auspex.filters.correlator module

class auspex.filters.correlator.Correlator(filter_name=None, **kwargs)
filter_name = 'Correlator'
operation()

Must be overridden with the desired mathematical function

sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
unit(base_unit)

Must be overridden accoriding the desired mathematical function e.g. return base_unit + “^{}”.format(len(self.sink.input_streams))

auspex.filters.debug module

class auspex.filters.debug.Passthrough(*args, **kwargs)
process_data(data)
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
class auspex.filters.debug.Print(*args, **kwargs)

Debug printer that prints data comming through filter

process_data(data)
sink = <InputConnector(name=)>

auspex.filters.elementwise module

class auspex.filters.elementwise.ElementwiseFilter(filter_name=None, **kwargs)

Perform elementwise operations on multiple streams: e.g. multiply or add all streams element-by-element

filter_name = 'GenericElementwise'
main()

Generic run method which waits on a single stream and calls process_data on any new_data

operation()

Must be overridden with the desired mathematical function

sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
unit(base_unit)

Must be overridden accoriding the desired mathematical function e.g. return base_unit + “^{}”.format(len(self.sink.input_streams))

update_descriptors()

Must be overridden depending on the desired mathematical function

auspex.filters.filter module

class auspex.filters.filter.Filter(name=None, **kwargs)

Any node on the graph that takes input streams with optional output streams

checkin()

For any filter-specific loop needs

configure_with_proxy(proxy_obj)

For use with bbndb, sets this filter’s properties using a FilterProxy object taken from the filter database.

descriptor_map(input_descriptors)

Return a dict of the output descriptors.

execute_on_run()
main()

Generic run method which waits on a single stream and calls process_data on any new_data

on_done()

To be run when the done signal is received, in case additional steps are needed (such as flushing a plot or data).

process_message(msg)

To be overridden for interesting default behavior

push_resource_usage()
push_to_all(message)
run()

Method to be run in sub-process; can be overridden in sub-class

shutdown()
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

auspex.filters.framer module

class auspex.filters.framer.Framer(axis=None, **kwargs)

Mete out data in increments defined by the specified axis.

axis = <Parameter(name='axis',value=None)>
final_init()
process_data(data)
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>

auspex.filters.integrator module

class auspex.filters.integrator.KernelIntegrator(**kwargs)
bias = <FloatParameter(name='bias',value=0.0)>
box_car_start = <FloatParameter(name='box_car_start',value=0.0)>
box_car_stop = <FloatParameter(name='box_car_stop',value=1e-07)>
demod_frequency = <FloatParameter(name='demod_frequency',value=0.0)>

Integrate with a given kernel. Kernel will be padded/truncated to match record length

kernel = <Parameter(name='kernel',value=None)>
process_data(data)
simple_kernel = <BoolParameter(name='simple_kernel',value=True)>
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

auspex.filters.io module

class auspex.filters.io.DataBuffer(**kwargs)

Writes data to IO.

checkin()

For any filter-specific loop needs

final_init()
get_data()
main()

Generic run method which waits on a single stream and calls process_data on any new_data

process_data(data)
sink = <InputConnector(name=)>
class auspex.filters.io.WriteToFile(filename=None, groupname=None, datasetname=None, **kwargs)

Writes data to file using the Auspex container type, which is a simple directory structure with subdirectories, binary datafiles, and json meta files that store the axis descriptors and other information.

datasetname = <Parameter(name='datasetname',value='data')>
filename = <Parameter(name='filename',value=None)>
final_init()
get_data()
get_data_while_running(return_queue)

Return data to the main thread or user as requested. Use a MP queue to transmit.

groupname = <Parameter(name='groupname',value='main')>
process_data(data)
sink = <InputConnector(name=)>

auspex.filters.plot module

class auspex.filters.plot.ManualPlotter(name='', x_label=['X'], y_label=['y'], y_lim=None, numplots=1)

Establish a figure, then give the user complete control over plot creation and data. There isn’t any reason to run this as a process, but we provide the same interface for convenience.

add_data_trace(name, custom_mpl_kwargs={}, subplot_num=0)
add_fit_trace(name, custom_mpl_kwargs={}, subplot_num=0)
add_trace(name, matplotlib_kwargs={}, subplot_num=0)
desc()
execute_on_run()
send(message)
set_data(trace_name, xdata, ydata)
set_done()
set_quit()
start()
stop()
class auspex.filters.plot.MeshPlotter(*args, name='', plot_mode=None, x_label='', y_label='', **plot_args)
desc()
execute_on_run()
on_done()

To be run when the done signal is received, in case additional steps are needed (such as flushing a plot or data).

plot_mode = <Parameter(name='plot_mode',value='quad')>
process_direct(data)
send(message)
sink = <InputConnector(name=)>
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

class auspex.filters.plot.Plotter(*args, name='', plot_dims=None, plot_mode=None, **plot_args)
axis_label(index)
desc()
execute_on_run()
final_init()
get_final_plot(quad_funcs=[<ufunc 'absolute'>, <function angle>])
on_done()

To be run when the done signal is received, in case additional steps are needed (such as flushing a plot or data).

plot_dims = <IntParameter(name='plot_dims',value=0)>
plot_mode = <Parameter(name='plot_mode',value='quad')>
process_data(data)
send(message)
set_done()
set_quit()
sink = <InputConnector(name=)>
update()
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

SingleShotMeasurement auspex.filters.singleshot module —————————-

class auspex.filters.singleshot.SingleShotMeasurement(save_kernel=False, optimal_integration_time=False, zero_mean=False, set_threshold=False, logistic_regression=False, **kwargs)
TOLERANCE = 0.001
compute_filter()

Compute the single shot kernel and obtain single-shot measurement fidelity.

Expects that the data will be in self.ground_data and self.excited_data, which are (T, N)-shaped numpy arrays, with T the time axis and N the number of shots.

final_init()
logistic_fidelity()
logistic_regression = <BoolParameter(name='logistic_regression',value=False)>
optimal_integration_time = <BoolParameter(name='optimal_integration_time',value=False)>
process_data(data)

Fill the ground and excited data bins

save_kernel = <BoolParameter(name='save_kernel',value=False)>
set_threshold = <BoolParameter(name='set_threshold',value=False)>
sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
update_descriptors()

This method is called whenever the connectivity of the graph changes. This may have implications for the internal functioning of the filter, in which case update_descriptors should be overloaded. Any simple changes to the axes within the StreamDescriptors should take place via the class method descriptor_map.

zero_mean = <BoolParameter(name='zero_mean',value=False)>

auspex.filters.stream_selectors module

class auspex.filters.stream_selectors.AlazarStreamSelector(name=None, **kwargs)

Digital demodulation and filtering to select a particular frequency multiplexed channel

channel = <IntParameter(name='channel',value=None)>
get_channel(channel_proxy)

Create and return a channel object corresponding to this stream selector

get_descriptor(stream_selector, receiver_channel)

Get the axis descriptor corresponding to this stream selector. For the Alazar cards this is always just a time axis.

sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
class auspex.filters.stream_selectors.X6StreamSelector(name=None, **kwargs)

Digital demodulation and filtering to select a particular frequency multiplexed channel

channel = <IntParameter(name='channel',value=None)>
dsp_channel = <IntParameter(name='dsp_channel',value=None)>
get_channel(channel_proxy)

Create and return a channel object corresponding to this stream selector

get_descriptor(stream_selector, receiver_channel)

Get the axis descriptor corresponding to this stream selector. If it’s an integrated stream, then the time axis has already been eliminated. Otherswise, add the time axis.

sink = <InputConnector(name=)>
source = <OutputConnector(name=)>
stream_type = <Parameter(name='stream_type',value='demodulated')>

Module contents