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:
QValidatorValidates 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.
- class ruidaqan.gui.ScientificDoubleSpinBox.ScientificDoubleSpinBox(*args, **kwargs)[fuente]#
Bases:
QDoubleSpinBoxSubclass 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.
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
- data_saturated(tipo, canales)[fuente]#
Finaliza la adquisicón una vez completadas todas las historias
- class ruidaqan.gui.acquisition_window.BackgroundWindow(data_folder)[fuente]#
Bases:
QMainWindowWindow for background measurement
- 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
- class ruidaqan.gui.acquisition_window.RangeAdjustmentWindow(tipo_med=None)[fuente]#
Bases:
QMainWindowTODO
- data_saturated(tipo, canales)[fuente]#
Finaliza la adquisicón una vez completadas todas las historias
- 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)
ruidaqan.gui.resultados_window module#
- class ruidaqan.gui.resultados_window.FittingTableModel(data=None, labels=None)[fuente]#
Bases:
QAbstractTableModelTODO
- class ruidaqan.gui.resultados_window.FittingView(data=None, labels=None, fit='linear')[fuente]#
Bases:
QWidget
- class ruidaqan.gui.resultados_window.ShowSpectrumFittedValues(serie=None, folder='/home/pablo/Descargas/ruidaqan/datos')[fuente]#
Bases:
QMainWindowClase 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
- 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
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.
- 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
ruidaqan.gui.config module#
ruidaqan.gui.data_io module#
- class ruidaqan.gui.data_io.DataWriter(filename='Output_Data.dat')[fuente]#
Bases:
objectWrite data to file
- class ruidaqan.gui.data_io.WriteHDF5File(filename, cfg_gral, cfg_adv, cfg_meas)[fuente]#
Bases:
objectClase para escribir datos de mediciónen nuevo formato
- 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.procesamiento_window module#
- class ruidaqan.gui.procesamiento_window.FitWindow(file_name=None, from_acquisition=False)[fuente]#
Bases:
QMainWindowTODO
- 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
ruidaqan.gui.measurement_window module#
GUI for the neutron noise measurement program
- class ruidaqan.gui.measurement_window.AdvanceConfigurationWindow(parent=None)[fuente]#
Bases:
QMainWindowVentana 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
- class ruidaqan.gui.measurement_window.DialogFileExists(filename)[fuente]#
Bases:
QDialogDiá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:
QMainWindowMeasurement window GUI
Configure parameters for a specific measurement
- 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
ruidaqan.gui.misc_functions module#
- ruidaqan.gui.misc_functions.calculate_spectrum_gui(data, fs=1.0)[fuente]#
Estimación espectral para la graficación
ruidaqan.gui.oscilloscope_window module#
- class ruidaqan.gui.oscilloscope_window.OscilloscopeWindow[fuente]#
Bases:
QMainWindow- 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
ruidaqan.gui.parameters module#
- class ruidaqan.gui.parameters.AdvancedParamTree(n_det=2, cip=True, reset=False)[fuente]#
Bases:
ParamTreeBaseConfiguración avanzada
- 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.
- class ruidaqan.gui.parameters.EspMedParamTree(n_det=2, cip=True, reset=False)[fuente]#
Bases:
ParamTreeBaseConfiguració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]]
- class ruidaqan.gui.parameters.GeneralParamTree(reset=False)[fuente]#
Bases:
ParamTreeBaseConfiguración de parámetros generales de la medición
- class ruidaqan.gui.parameters.OscilloscopeParamTree(n_chan=1, reset=False)[fuente]#
Bases:
ParamTreeBaseConfiguración de parámetros generales de la medición
- property device#
- class ruidaqan.gui.parameters.ParamTreeBase(name, params, reset=False)[fuente]#
Bases:
ParameterTree- 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
ruidaqan.gui.plotter module#
- class ruidaqan.gui.plotter.LegendItem(color, name, channel)[fuente]#
Bases:
QWidget- property channel#
- class ruidaqan.gui.plotter.PlotProcessing(axis_lbls=('', ''), units=('', ''))[fuente]#
Bases:
QWidgetWidget para graficar durante el procesamiento
ruidaqan.gui.plotter_oscilloscope module#
ruidaqan.gui.procesado_gui module#
- class ruidaqan.gui.procesado_gui.ProgresoMedicion(esp_med_par, cfg_adv, tipo_med=None, par_fondo=None)[fuente]#
Bases:
QWidgetClase 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_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
- 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:
QWidgetClase para mostrar la utilización de los rangos utilizados por la DAQ TODO
- class ruidaqan.gui.procesado_gui.VentanaControlDC(tot_hist, n_det, labels, cip, offsets)[fuente]#
Bases:
QMainWindowVentana 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
- 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
ruidaqan.gui.reader module#
- class ruidaqan.gui.reader.GetDevicesInfo[fuente]#
Bases:
objectObtiene 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.
- class ruidaqan.gui.reader.SignalReader(sample_rate, sample_size, channels, ranges, **kargs)[fuente]#
Bases:
QThreadThread 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)
- 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
ruidaqan.gui.reader_debug module#
- class ruidaqan.gui.reader_debug.GetDevicesInfo[fuente]#
Bases:
objectSimula 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.
- class ruidaqan.gui.reader_debug.SignalReader(sample_rate, sample_size, channels, *args, **kargs)[fuente]#
Bases:
QThreadThread 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
ruidaqan.gui.ruidaq_main module#
GUI for the neutron noise measurement program
- class ruidaqan.gui.ruidaq_main.MainWindow(parent=None)[fuente]#
Bases:
QMainWindowMain 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