ruidaqan.gui package#

Módulos asociados a la interfase gráfica.

La lectura, el procesamiento y en análisis de resultados se hacen con los módulos ubicados en la carpeta script.

Submodules#

ruidaqan.gui.ScientificDoubleSpinBox module#

class ruidaqan.gui.ScientificDoubleSpinBox.FloatValidator[fuente]#

Bases: QValidator

Validates float inputs for ScientificDoubleSpinBox

fixup(string: str) str[fuente]#

Fixes up input text to create a valid float. Puts an empty string on failure.

static intermediate_float_string(string: str) bool[fuente]#

Checks if string makes a valid partial float, keeping in mind locale dependent decimal separators.

static intermediate_integer_string(string: str) bool[fuente]#

Checks if string makes a valid partial integer, keeping in mind locale dependent decimal separators.

static valid_float_string(string: str) bool[fuente]#

Checks if string makes a valid float, keeping in mind locale dependent decimal separators.

validate(string: str, position: int) State[fuente]#

Validates input string to see if it is a valid float or partial float.

Notas

State is not used, but required because we are overriding an internal method.

class ruidaqan.gui.ScientificDoubleSpinBox.ScientificDoubleSpinBox(*args, **kwargs)[fuente]#

Bases: QDoubleSpinBox

Subclass of QDoubleSpinBox that allows for scientific notation and is locale independent.

fixup(string: str) str[fuente]#

Fixes up strings that are considered intermediate when spinbox focus is lost.

stepBy(steps: int)[fuente]#

Increases or decreases the value of the least significant digit by 1.

textFromValue(value: float) str[fuente]#

Turns internal float value into user viewable string.

validate(string: str, position: int) -> (<enum 'State'>, <class 'str'>, <class 'int'>)[fuente]#

Returns the validity of the string, using a QtGui.QValidator object.

Notas

Return type depends on whether PySide or PyQt is being used.

valueFromText(string: str) float[fuente]#

Turns user viewable string into a float.

ruidaqan.gui.acquisition_window module#

class ruidaqan.gui.acquisition_window.AcquisitionWindow(output_file_HDF)[fuente]#

Bases: QMainWindow

acq_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

acquisition_finished()[fuente]#

Finaliza la adquisicón una vez completadas todas las historias

acumula_historias(new_data)[fuente]#
center()[fuente]#

Center window on screen

cip_finished(data)[fuente]#
closeEvent(self, a0: QCloseEvent | None)[fuente]#
data_saturated(tipo, canales)[fuente]#

Finaliza la adquisicón una vez completadas todas las historias

finished_all_histories()[fuente]#

Finaliza la adquisicón una vez completadas todas las historias y el ingreso manual de Ip (si es que no se adquiere)

init_cip_win()[fuente]#
init_daq_io()[fuente]#
init_ui()[fuente]#

Define and initialize GUI

show_ayuda_win()[fuente]#
start_signal_btn_click()[fuente]#

Start and Stop the data acquisition

class ruidaqan.gui.acquisition_window.BackgroundWindow(data_folder)[fuente]#

Bases: QMainWindow

Window for background measurement

acumula_historias_volt(new_data)[fuente]#

Acumula datos para luego promediar

background_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

center()[fuente]#

Center window on screen

closeEvent(self, a0: QCloseEvent | None)[fuente]#
close_rangeadj_win()[fuente]#
data_saturated(tipo, canales)[fuente]#

Finaliza la adquisicón una vez completadas todas las historias

finished_all_histories()[fuente]#

Finaliza la adquisicón una vez completadas todas las historias

init_daq_io()[fuente]#
init_ui()[fuente]#
range_adjusted(new_ranges)[fuente]#
show_ayuda_win()[fuente]#
show_rangeadj_win()[fuente]#
start_signal_btn_click()[fuente]#

Start and Stop the data acquisition

class ruidaqan.gui.acquisition_window.RangeAdjustmentWindow(tipo_med=None)[fuente]#

Bases: QMainWindow

TODO

accept_adj_clicked()[fuente]#
accept_cur_clicked()[fuente]#
acumula_historias_volt(new_data)[fuente]#

Acumula datos para luego promediar

cancel_btn_clicked()[fuente]#
center()[fuente]#

Center window on screen

closeEvent(self, a0: QCloseEvent | None)[fuente]#
data_saturated(tipo, canales)[fuente]#

Finaliza la adquisicón una vez completadas todas las historias

init_daq_io()[fuente]#
init_ui()[fuente]#
rangeadj_adjusted#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

rangeadj_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

select_ranges(data)[fuente]#

Métdoo donde se elije el rango

No va a funcionar bien cuando se trabaje con datos simulados porque los coeficientes de calibración no generan los voltajes reales.

Se ajusta el rango trabajando en voltaje, es más conservativo que trabajar con los int16 (en general la tarjeta satura apenas por encima del valor máximo del rango)

show_ayuda_win()[fuente]#
start_adjusting()[fuente]#
start_monitoring()[fuente]#

ruidaqan.gui.resultados_window module#

class ruidaqan.gui.resultados_window.FittingTableModel(data=None, labels=None)[fuente]#

Bases: QAbstractTableModel

TODO

columnCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#
data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any[fuente]#
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any[fuente]#
rowCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#
class ruidaqan.gui.resultados_window.FittingView(data=None, labels=None, fit='linear')[fuente]#

Bases: QWidget

delete()[fuente]#

TODO: no dejar borrar primer columna

init_ui()[fuente]#
load_original()[fuente]#
show_fitted_data(values, best_fit)[fuente]#

Muestra ajuste en el gráfico y valores numéricos

update_data(data)[fuente]#
class ruidaqan.gui.resultados_window.ShowSpectrumFittedValues(serie=None, folder='/home/pablo/Descargas/ruidaqan/datos')[fuente]#

Bases: QMainWindow

Clase para acumular y procesar los resultados del ajuste

TODO: Se deben deshabilitar (no se pueden ocultar) los tabs innecesarios que sobran cuando se mide con un detector

add_new_data(data)[fuente]#

Método para agregar datos a la tabla

cargar_archivo()[fuente]#
center()[fuente]#

Center window on screen

closeEvent(self, a0: QCloseEvent | None)[fuente]#
delete()[fuente]#

Borra datos seleccionado

end_measurement()[fuente]#
init_ui()[fuente]#
load()[fuente]#
load_file()[fuente]#
prediccion_pot_I(new_value)[fuente]#

Predice potencia o corrientes en base a coeficientes de calibración

prev_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

save()[fuente]#
set_column_width()[fuente]#
show_about_win()[fuente]#
show_ayuda_win()[fuente]#
class ruidaqan.gui.resultados_window.TableModel(data=None, header=None)[fuente]#

Bases: QAbstractTableModel

Modelo para acumular y procesar resultados de los ajustes

columnCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#
data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any[fuente]#
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any[fuente]#
rowCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#

ruidaqan.gui.cip module#

class ruidaqan.gui.cip.InputIpValues[fuente]#

Bases: QMainWindow

add()[fuente]#

Add an item to our todo list, getting the text from the QLineEdit .todoEdit and then clearing it.

center()[fuente]#

Center window on screen

cip_manual_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

closeEvent(self, a0: QCloseEvent | None)[fuente]#
delete()[fuente]#

Borra datos seleccionado

end_measurement()[fuente]#
init_ui()[fuente]#
load()[fuente]#
save()[fuente]#
class ruidaqan.gui.cip.TableModel(data=None, header=None)[fuente]#

Bases: QAbstractTableModel

columnCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#
data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any[fuente]#
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any[fuente]#
rowCount(self, parent: QModelIndex = QModelIndex()) int[fuente]#

ruidaqan.gui.config module#

ruidaqan.gui.data_io module#

class ruidaqan.gui.data_io.DataWriter(filename='Output_Data.dat')[fuente]#

Bases: object

Write data to file

close_file()[fuente]#
write_data(incoming_data)[fuente]#
class ruidaqan.gui.data_io.WriteHDF5File(filename, cfg_gral, cfg_adv, cfg_meas)[fuente]#

Bases: object

Clase para escribir datos de mediciónen nuevo formato

append_manual_cip(cip_manual)[fuente]#

Guarda los datos de Ip ingresados de forma manual

append_new_data(new_data, cip_data=None)[fuente]#

Método para agregar datos durante la adquisición

ruidaqan.gui.data_io.read_RUI_background(filename)[fuente]#
ruidaqan.gui.data_io.read_background(filename)[fuente]#

Lee archivo con las corrientes de fondo (nuevo formato)

ruidaqan.gui.data_io.write_RUI_background(names, mean_datas, std_datas)[fuente]#

Graba los resultados de la medición de fondo en el formato del FERCIN3

ruidaqan.gui.data_io.write_RUI_file(filename, data, cfg_gral, cfg_adv, cfg_meas, cip_manual=None)[fuente]#

Escribe un archivo con el formato .RUI del FERCIN3

Sólo para comparar programas de procesamiento

Se asume una tarjeta con 16 bits de resolución

ruidaqan.gui.data_io.write_background(filename, mean_datas, std_datas)[fuente]#

ruidaqan.gui.procesamiento_window module#

class ruidaqan.gui.procesamiento_window.FitWindow(file_name=None, from_acquisition=False)[fuente]#

Bases: QMainWindow

TODO

center()[fuente]#

Center window on screen

change_spec()[fuente]#
closeEvent(self, a0: QCloseEvent | None)[fuente]#
close_previous_win()[fuente]#
fit_spectrums()[fuente]#

Ajusta todos los espectros a la vez

fit_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

get_norm_spectrums()[fuente]#
get_time_file()[fuente]#

Lee el archivo temporal .RUI o .h5

graba_resultados()[fuente]#
init_ui()[fuente]#

Define and initialize GUI

load_core()[fuente]#
load_reactor_file()[fuente]#
plot_temporal_signals()[fuente]#
process_time_file()[fuente]#
region_changed()[fuente]#
region_changed_spin(val_ch)[fuente]#
show_about_win()[fuente]#
show_ayuda_win()[fuente]#
show_previous_win()[fuente]#

ruidaqan.gui.measurement_window module#

GUI for the neutron noise measurement program

class ruidaqan.gui.measurement_window.AdvanceConfigurationWindow(parent=None)[fuente]#

Bases: QMainWindow

Ventana de configuración avanzada

advconf_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

cfg_adv_change(_, changes)[fuente]#
closeEvent(event)[fuente]#

Manage closing oscilloscope window

show_ayuda_win()[fuente]#
class ruidaqan.gui.measurement_window.DialogFileExists(filename)[fuente]#

Bases: QDialog

Diálogo para tratar con archivos existentes

Tal vez habría que moverlo a otro archivo

class ruidaqan.gui.measurement_window.MeasurementWindow(data_folder)[fuente]#

Bases: QMainWindow

Measurement window GUI

Configure parameters for a specific measurement

closeEvent(self, a0: QCloseEvent | None)[fuente]#
close_acq_win()[fuente]#
close_fit_win()[fuente]#
close_osc_win()[fuente]#
close_rangeadj_win()[fuente]#
meas_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

output_file_exists()[fuente]#

Define el nombre del archvivo en que se guardarán los datos

output_file_HDF: Nombre para el formato nuevo

range_adjusted()[fuente]#
show_acq_win()[fuente]#
show_ayuda_win()[fuente]#
show_fit_win()[fuente]#
show_osc_win()[fuente]#
show_rangeadj_win()[fuente]#

ruidaqan.gui.misc_functions module#

ruidaqan.gui.misc_functions.calculate_mean_value(data)[fuente]#
ruidaqan.gui.misc_functions.calculate_spectrum_gui(data, fs=1.0)[fuente]#

Estimación espectral para la graficación

ruidaqan.gui.misc_functions.int_to_volt(incoming_data, coeficientes)[fuente]#

Convierte datos de I16 a voltaje con coeficientes de calibración

incoming_data: list of numpy array (int16) coeficientes: list of numpy array (floats)

Ambas entradas deben ser lista con igual tamaño

ruidaqan.gui.misc_functions.weighted_average(data, weights)[fuente]#

ave(data) = sum(data*weights) / sum(weights)

var(data) = var(data) * mean(weights**2) / mean(weights)**2 / n std(data) = sqrt(var(data))

ruidaqan.gui.oscilloscope_window module#

class ruidaqan.gui.oscilloscope_window.OscilloscopeWindow[fuente]#

Bases: QMainWindow

actualiza_dispositivo(new_dev)[fuente]#
cambio_configuracion(_, changes)[fuente]#
cambio_num_canales(_, change)[fuente]#
closeEvent(self, a0: QCloseEvent | None)[fuente]#
init_daq_io()[fuente]#
init_ui()[fuente]#

Define and initialize GUI

osc_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

show_ayuda_win()[fuente]#
start_signal_btn_click()[fuente]#

ruidaqan.gui.parameters module#

class ruidaqan.gui.parameters.AdvancedParamTree(n_det=2, cip=True, reset=False)[fuente]#

Bases: ParamTreeBase

Configuración avanzada

actualiza_cadenas_med(nuevas_cadenas)[fuente]#

Se aagregan o quitan cadenas de medición

actualiza_cip()[fuente]#
get_ADC_ranges()[fuente]#
get_ADC_resolution()[fuente]#
get_DC_channels()[fuente]#

» Devuelve los canales utilizados para medir las DC’s

get_channels(tipos=None)[fuente]#

Devuelve los canales utilizados para la adquisició

Se puede especifica el tipo de canal que se quiere leer. Si tipos = None devuelve todos los canales

Ordenados por cadena y por tipo:

[ Cadena1(AC) Cadena1(DC) Cadena1(AC filtro) Cadena2(AC) …CadenaCIp(DC) ]

tipo: string or list of string [“AC”, “DC”, “AC filtro”]

get_channels_coefs(channels, ranges)[fuente]#

Devuelve los coeficientes de la calibración para pasar de raw a voltaje

[Cadena1.AC Cadena1.DC Cadena1.AC_filtro Cadena2.AC … Cadena.CIp]

get_channels_labels()[fuente]#

Devuelve los labels para cada canal

[Cadena1.AC Cadena1.DC Cadena1.AC_filtro Cadena2.AC … Cadena.CIp]

get_channels_ranges()[fuente]#

Devuelve los rangos para cada canal

[Cadena1.AC Cadena1.DC Cadena1.AC_filtro Cadena2.AC … Cadena.CIp]

set_channels_limits(limits)[fuente]#

Aplica «limits» a los limits de todos los canales. El mismo para todos.

set_channels_names(new_names=None)[fuente]#

Escribe los valores de los canales

Si new_names == None, se elige un orden por default (polémtico). De lo contrario se usa new_names

TODO: chequear que coincidan tamaños entre new_names y los canales

set_channels_range_limits(limits)[fuente]#

Aplica «limits» a los rangos de todos los canales. El mismo para todos.

set_channels_ranges(ranges)[fuente]#

Setea los rangos para cada canal

El orden de «Values» debe ser [Cadena1.AC Cadena1.DC Cadena1.AC_filtro Cadena2.AC … Cadena.CIp]

Cada elemento debe ser una tupla (min, max). Ejemplo: (-10, 10)

update_device(new_dev)[fuente]#

Reemplaza el dispositivo en todos los canales

class ruidaqan.gui.parameters.EspMedParamTree(n_det=2, cip=True, reset=False)[fuente]#

Bases: ParamTreeBase

Configuración de parámetros específicoss a una dada medición

get_AC_gains()[fuente]#

Devuelve la ganancia de la componente AC de cada cadena

Ordenados por cadena:

[AC_gain_1 AC_gain_2 ….]

get_comments()[fuente]#

Devuelve los comentarios para cada cadena de medición

Ordenados por cadena:

[ comment_1 comment_2 …]

get_offsets()[fuente]#

Devuelve los offsets de los amplificadores utilizadas para cada cadena

Ordenados por cadena:

[ Offset_1 Offset_2 …. Offset_CIp]]

get_sensitivities()[fuente]#

Devuelve las sensibilidades de los amplificadores utilizadas para cada cadena

Ordenados por cadena:

[ Sensibilidad_1 Sensibilidad_2 …. Sensibilidad_CIp]

hide_AC_gains()[fuente]#

Oculta el parámetro AC_gain de todas las cadenas

Ordenados por cadena:

[AC_gain_1 AC_gain_2 ….]

class ruidaqan.gui.parameters.GeneralParamTree(reset=False)[fuente]#

Bases: ParamTreeBase

Configuración de parámetros generales de la medición

class ruidaqan.gui.parameters.OscilloscopeParamTree(n_chan=1, reset=False)[fuente]#

Bases: ParamTreeBase

Configuración de parámetros generales de la medición

actualizar_numero_canales(nuevos_canales)[fuente]#
property device#
get_channels()[fuente]#

Devuelve los canales utilizados para la adquisición

get_colors()[fuente]#

Devuelve los colores utilizados para cada canal

get_names()[fuente]#

Devuelve los nombres utilizados para cada canal

get_ranges()[fuente]#

Devuelve los rangos utilizados para cada canal

set_channels_limits(new_names=None)[fuente]#

Escribe los valores de los canales

set_channels_names(new_names=None)[fuente]#

Escribe los valores de los canales

class ruidaqan.gui.parameters.ParamTreeBase(name, params, reset=False)[fuente]#

Bases: ParameterTree

get_param_value(*childs)[fuente]#

Get the current value of a parameter.

paramChange#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

print()[fuente]#
save_settings()[fuente]#
send_change(param, changes)[fuente]#
set_param_limits(value, *childs)[fuente]#

Set the limits of a parameter.

set_param_value(value, *childs)[fuente]#

Set the current value of a parameter.

set_whole_tree(method)[fuente]#

Set properties for the whole tree

method = «readonly», «writable», «enabled»

ruidaqan.gui.plotter module#

class ruidaqan.gui.plotter.Legend(channels, names)[fuente]#

Bases: QWidget

on_new_data(data)[fuente]#
class ruidaqan.gui.plotter.LegendItem(color, name, channel)[fuente]#

Bases: QWidget

property channel#
paintEvent(self, a0: QPaintEvent | None)[fuente]#
set_current_mean(data)[fuente]#
class ruidaqan.gui.plotter.PlotProcessing(axis_lbls=('', ''), units=('', ''))[fuente]#

Bases: QWidget

Widget para graficar durante el procesamiento

load_plot(x_data, datas, labels)[fuente]#

Carga por primera vez los datos par agraficar

labels es una lista con el nombre de cada elemento de datas

datas y labels deben ser listas de igual tamaño

x_data es un solo vector compartido por todos los datas

plot(x, y, plotname, color)[fuente]#
update_plot()[fuente]#

Actualiza los gráficos dependiendo qué está chequeado

class ruidaqan.gui.plotter.SignalPlot(legend=None, tipo=None)[fuente]#

Bases: PlotWidget

update_plot(incoming_data, x_data=None)[fuente]#
class ruidaqan.gui.plotter.TabsPlot(cfg_adv, cfg_meas)[fuente]#

Bases: QWidget

Widget para graficar los datos durante la adquisición

init_ui()[fuente]#
update_plots(incoming_data)[fuente]#

ruidaqan.gui.plotter_oscilloscope module#

class ruidaqan.gui.plotter_oscilloscope.Legend(colores, nombres, canales)[fuente]#

Bases: QWidget

on_new_data(data)[fuente]#
update_channels(channels)[fuente]#
update_colors(colors)[fuente]#
update_names(names)[fuente]#
update_num_legends(new_numb, chan_prop)[fuente]#

Agrega o quita el widget de la leyenda

new_numb : (float) nueva cantidad de canales chan_prot: (list) propiedades de los canales agregados

class ruidaqan.gui.plotter_oscilloscope.LegendItem(color, name, channel)[fuente]#

Bases: QWidget

property channel#
property color#
property name#
paintEvent(self, a0: QPaintEvent | None)[fuente]#
set_current_mean(data)[fuente]#
class ruidaqan.gui.plotter_oscilloscope.SignalPlot(legend=None, tipo=None)[fuente]#

Bases: PlotWidget

update_legend(leg)[fuente]#
update_plot(incoming_data, x_data=None)[fuente]#

ruidaqan.gui.procesado_gui module#

class ruidaqan.gui.procesado_gui.ProgresoMedicion(esp_med_par, cfg_adv, tipo_med=None, par_fondo=None)[fuente]#

Bases: QWidget

Clase para controlar y visualizar el progreso de la medición

Se debe instanciar en cada medición.

  • Convierte de I16 a float

  • Muestra en pantalla valores de voltaje y corrientes promedio por historia

  • Comprueba la saturación de los rangos de los canales (en int16)

  • Comprueba la saturación a la entrada del anti-aliasing (en volts)

  • Lleva registro de lo adquirido

Envía las siguientes señales:

data_in_volts: en cada historia medida, Envia los datos convertidos a voltaje para su graficación

all_histories_read: cuando se adquieren todas las hitorias solicitadas

data_saturation(tipo, chns): cuando hay saturación. En «tipo» se indica

«Rango» -> Saturación en los rangos de la tarjeta «AC_AA» -> Saturación en el filtro antialiasing «chns»: lista con índices de los canales saturados

all_histories_read#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

check_saturation_antialiasing(ac_data)[fuente]#
check_saturation_ranges(incoming_data)[fuente]#

Comprueba si se produce saturación en el rango de la DAC usado

data_in_volts#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

data_saturation#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

init_ui()[fuente]#
new_history(data)[fuente]#
update_background_parameters(sensitivities, offsets)[fuente]#

Parche para pasar parámetros durante medicioń de fondo

valores_control#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

class ruidaqan.gui.procesado_gui.ShowRangesUtilization(cfg_adv)[fuente]#

Bases: QWidget

Clase para mostrar la utilización de los rangos utilizados por la DAQ TODO

init_ui()[fuente]#
update(self)[fuente]#
update(self, a0: QRect)
update(self, a0: QRegion)
update(self, ax: int, ay: int, aw: int, ah: int)
class ruidaqan.gui.procesado_gui.VentanaControlDC(tot_hist, n_det, labels, cip, offsets)[fuente]#

Bases: QMainWindow

Ventana para mostrar en grande los valores de DC durante la adquisición

Sirve para visualizar fácilmente y tomar decisiones en la estabilización del reactor

center()[fuente]#

Center window on screen

closeEvent(self, a0: QCloseEvent | None)[fuente]#
control_win_closed#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

init_ui()[fuente]#

ES una copia de ProgresoMedicion()

ruidaqan.gui.reader module#

class ruidaqan.gui.reader.GetDevicesInfo[fuente]#

Bases: object

Obtiene información sobre la placa de adquisición de NI

dev_names : Lista con todos los dispositivos instalados en el sistema

device_info(dev_name) : método para obtener información de un dispositivo específico

device_info(dev_name).ai_ranges : Lista con rangos disponibles

device_info(dev_name).channel_names : Lista con los nombres de canales disponibles

device_info(dev_name).scaling_coeff(ai_channel_name, ai_range): coeficientes para convertir a voltage para un dado canal y un dado rango. Si bien por default son los mismos para todos los canales, se podrían configurar de forma individual.

device_info(dev_name='Dev1')[fuente]#
class ruidaqan.gui.reader.SignalReader(sample_rate, sample_size, channels, ranges, **kargs)[fuente]#

Bases: QThread

Thread for capturing input signal through DAQ

TODO: Add reset device.

Parámetros:
  • sample_rate (float) – Frecuencia de muestreo

  • sample_size (float) – Cantidad de puntos a leer

  • channels (list) – Canales a medir

  • ranges (list of tuples) – (v_min, V_max) de cada canal a medir

  • kargs

    reading_type: string: «float»(default), «int16»

    Tipo de dato que se va a leer

    terminal_cfg: string: «RSE» (default), «NRSE»

    Tipo de conexión para los canales (se usa la misma para todos)

create_task()[fuente]#
incoming_data#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

restart()[fuente]#
run()[fuente]#

Start thread for data acuisition. Called by QThread.start()

ruidaqan.gui.reader_debug module#

class ruidaqan.gui.reader_debug.GetDevicesInfo[fuente]#

Bases: object

Simula información sobre la placa de adquisición de NI

dev_names : Lista con todos los dispositivos instalados en el sistema

device_info(dev_name) : método para obtener información de un dispositivo específico

device_info(dev_name).ai_ranges : Lista con rangos disponibles

device_info(dev_name).channel_names : Lista con los nombres de canales disponibles

device_info(dev_name).scaling_coeff(ai_channel_name, ai_range): coeficientes para convertir a voltage para un dado canal y un dado rango. Si bien por default son los mismos para todos los canales, se podrían configurar de forma individual.

device_info(dev_name='Dev1')[fuente]#
class ruidaqan.gui.reader_debug.SignalReader(sample_rate, sample_size, channels, *args, **kargs)[fuente]#

Bases: QThread

Thread for simulating a signal

incoming_data#

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

restart()[fuente]#
run()[fuente]#

Start thread for data simulation. Called by QThread.start()

ruidaqan.gui.ruidaq_main module#

GUI for the neutron noise measurement program

class ruidaqan.gui.ruidaq_main.MainWindow(parent=None)[fuente]#

Bases: QMainWindow

Main Window.

cfg_gral_change(_, changes)[fuente]#

Cuando se cambia cantidad de detectores y medición de CIp se actualizan los datos de la configuración avanzada

closeEvent(self, a0: QCloseEvent | None)[fuente]#
close_advconf_win()[fuente]#
close_background_win()[fuente]#
close_meas_win()[fuente]#
close_osc_win()[fuente]#
escribe_coeficientes()[fuente]#

Escribe coeficientes de conversión int16 a voltaje.

Se utiliza solamente para procesar los archivos .RUI

init_estructura_datos()[fuente]#
init_ui()[fuente]#
show_about_win()[fuente]#
show_advconf_win()[fuente]#
show_ayuda_win()[fuente]#
show_background_win()[fuente]#
show_meas_win()[fuente]#
show_osc_win()[fuente]#

ruidaqan.gui.ventanas_ayuda module#

class ruidaqan.gui.ventanas_ayuda.AboutWindow(parent=None)[fuente]#

Bases: QMainWindow

Ventana para información del programa

class ruidaqan.gui.ventanas_ayuda.VentanaAyuda(parent=None, referencia=None)[fuente]#

Bases: QMainWindow

Ventana para mostrar ayuda dentro del programa.

center()[fuente]#

Center window on screen