neurochat.nc_ui module

This module implements NeuroChaT_Ui, the main class for NeuroChaT GUI.

It contains other graphical and data objects and connects to the NeuroChaT class for setting configuration and analysis in NeuroChaT.

@author: Md Nurul Islam; islammn at tcd dot ie

class neurochat.nc_ui.NeuroChaT_Ui[source]

Bases: PyQt5.QtWidgets.QMainWindow

This class creates the main neurochat UI menu.

about_nc()[source]

Display a wiki page about the program.

accumulate_output()[source]

Open the UiMerge() object to accumulate PDF or PS files.

angle_calculation()[source]

Open an excel file and calculate angles between centroids.

The centroids are computed from the highest firing place field identified from the firing map.

See also

NeuroChaT.angle_calculation()

append_excel()[source]
behaviour_ui()[source]

Set up the behaviour of NeuroChaT_ui widgets.

browse_all()[source]

In turn, browse spike, lfp and spatial.

See also

neurochat.nc_ui.browse_spike(), neurochat.nc_ui.browse_spatial(), neurochat.nc_ui.browse_lfp()

browse_lfp()[source]

Open a file dialog for selecting an lfp file.

This is disabled, depending on the mode and file format.

browse_spatial()[source]

Open a file dialog for selecting a spatial file.

This is disabled, depending on the mode and file format.

browse_spike()[source]

Open a file dialog for selecting a spike file.

Depending on the mode, also browses Excel or HDF5 files. Also populates a set of units and lfps available on selection.

cell_type_analysis(cell_type)[source]

Set the analysis checkboxes based on the type of cell selected.

cell_type_select()[source]

Called when there is a change in the cell type selection button groups.

Sets the cell type to the selected item.

clear_backend_files()[source]

Reset all file selections to default.

clear_files()[source]

Call to clear_backend_files.

clear_log()[source]

Clear the texts in the log box.

closeEvent(event)[source]

Called when NeuroChaT window is about to close.

Opens a dialogue for saving the session information in NeuroChaT configuration file (.ncfg).

cluster_evaluate()[source]

Open a file dialog for selecting the Excel list.

This excel list contains specifications for cluster evaluation and evaluates the clusters using NeuroChaT().cluster_evaluate() method.

See also

NeuroChaT()

compare_units()[source]

Open a file dialog for selecting the Excel list.

This excel list contains specifications for comparing units and compares the units through NeuroChaT().cluster_similarity() method.

See also

NeuroChaT()

convert_to_nwb()[source]

Open a file dialog for selecting the Excel list.

This excel list contains specifications for NWB file for conversion. It then converts the files using the NeuroChaT().convert_to_nwb() method.

See also

NeuroChaT()

data_format_select(ind)[source]

Called when there is a change in the data format selection combo box.

Sets the data format to the selected item.

exit_nc()[source]

Called when ‘Exit’ menu item is clicked.

Closes the NeuroChaT window.

export_graphic_info()[source]

Called when ‘Export graphic file info’ menu is clicked.

Opens a file dialogue for the selection of an Excel file, and exports the graphic file info in the table to the file

export_results()[source]

Called when ‘Export Results’ button is clicked.

Opens a file dialogue for the selection of an Excel file, and exports the results in the table to the file

graphic_format_select()[source]

Called when there is a change in the graphic format selection.

Sets the output graphic format to the selected item.

lfp_chan_getitems()[source]

Return the list of LFP items.

This depends on the system, and returns files (Neuralynx) or their file extension (Axona) once the spike data is set using the ‘Browse’ button.

load_session()[source]

Prompt the user to select a .ncfg file and loads the config.

The settings and parameters from the file are passed to the GUI elements.

menu_ui()[source]

Set up the menu items in NeuroChaT GUI.

merge_output()[source]

Open the UiMerge() object to merge PDF or PS files.

mode_select(ind)[source]

Called when there is a change in the analysis mode selection combo box.

Sets the data analysis mode to the selected item.

place_cell_plots()[source]

Plot place cell figures for each set file in a directory.

restore_start_button()[source]

Reactivate the start button, displays the results in UI table.

retranslate_ui()[source]

Set up the title and icon in NeuroChaT GUI.

save_log()[source]

Open a file dialog for the user to select an output file.

The current contents of the log-box are exported to this text file.

save_session()[source]

Prompt the user to select a .ncfg file and saves config.

The current settings and parameters from the GUI elements are saved to the file.

selectGraphicFormatUi()[source]

Set up the graphic format selection panel in NeuroChaT GUI.

select_all()[source]

Called when ‘Select All’ box is checked or unchecked.

It checks or unchecks all other analyses.

select_analysis_ui()[source]

Set up the analysis type selection panel in NeuroChaT GUI.

select_cell_type_ui()[source]

Set up the cell type selection panel in NeuroChaT GUI.

set_lfp_chan(value)[source]

Called when the selection in the ‘LFP Ch No’ is changed.

Sets the lfp channel accordingly.

set_parameters()[source]

Show the UiParameters() widget.

set_unit_no(value)[source]

Called when the selection in the ‘Unit No’ is changed.

Sets the unit number accordingly.

setup_ui()[source]

Set up the elements of NeuroChaT_ui class.

start()[source]

Called when start button is clicked.

Starts the entire backend operation in NeuroChaT

tutorial()[source]

Display a tutorial for the program.

unit_getitems()[source]

Return the list of units once spike data is set.

update_log(msg)[source]

Update the log-box with new message.

Parameters:msg – New log message or record
Returns:None
verify_units()[source]

Open a file dialog for selecting the Excel list.

This excel list contains specifications for verifying the units and verifies the unit using the NeuroChaT().verify_units() method.

See also

NeuroChaT()

view_api()[source]

Display API documentation for neurochat.

view_help()[source]

Display user guide pdf on GitHub.

class neurochat.nc_ui.ParamBoxLayout[source]

Bases: PyQt5.QtWidgets.QVBoxLayout

Facilitates adding new widget items to the analysis parameter window.

Subclass of QtWidgets.QVBoxLayout.

addRow(label_1, widg, label_2)[source]

Add a new row of widget using the QtWidgets.QHBoxLayout().

Parameters:
  • label_1 (str) – Name of the parameter
  • widg – PyQt5 widget to add
  • label_2 (str) – Additional description of the parameter, i.e., unit, range etc.
class neurochat.nc_ui.UiParameters(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog

NeuroChaT user interface for setting analysis specific parameters.

ang_vel_page()[source]

Set the ui elements for the ‘ang_vel’ analysis parameters.

behaviour_ui()[source]

Set the behaviour of the GUI elements.

border_page()[source]

Set the ui elements for the ‘border’ analysis parameters.

burst_page()[source]

Set the ui elements for the ‘burst’ analysis parameters.

change_stack_page()[source]

Change the stacked widgets of parameter settings.

This is updated according to the analysis selected from the list on left of the window.

gradient_page()[source]

Set the ui elements for the ‘gradient’ analysis parameters.

grid_page()[source]

Set the ui elements for the ‘grid’ analysis parameters.

hd_rate_page()[source]

Set the ui elements for the ‘hd_rate’ analysis parameters.

hd_shuffle_page()[source]

Set the ui elements for the ‘hd_shuffle’ analysis parameters.

hd_time_lapse_page()[source]

Set the ui elements for the ‘hd_time_lapse’ analysis parameters.

hd_time_shift_page()[source]

Set the ui elements for the ‘hd_time_shift’ analysis parameters.

inter_depend_page()[source]

Set the ui elements for the ‘inter_depend’ analysis parameters.

isi_corr_page()[source]

Set the ui elements for the ‘isi_corr’ analysis parameters.

isi_page()[source]

Set the ui elements for the ‘isi’ analysis parameters.

lfp_spectrum_page()[source]

Set the ui elements for the ‘lfp_spectrum’ analysis parameters.

lfp_spike_causality_page()[source]

Set the ui elements for the ‘lfp_spike_causality’ parameters.

loc_rate_page()[source]

Set the ui elements for the ‘loc_rate’ analysis parameters.

loc_shuffle_page()[source]

Set the ui elements for the ‘loc_shuffle’ analysis parameters.

loc_time_lapse_page()[source]

Set the ui elements for the ‘loc_time_lapse’ analysis parameters.

loc_time_shift_page()[source]

Set the ui elements for the ‘loc_time_shift’ analysis parameters.

multiple_regression_page()[source]

Set the ui elements for the ‘multiple_regression’ parameters.

phase_lock_page()[source]

Set the ui elements for the ‘phase_lock’ analysis parameters.

set_loc_rate_filter(filt_type)[source]

Set the ui elements for the filters for firing rate map.

set_spat_corr_filter(filt_type)[source]

Set the ui elements for the filters for autocorrelation of fmap.

setup_ui()[source]

Set the GUI elements for the widget.

spatial_corr_page()[source]

Set the ui elements for the ‘spatial_corr’ analysis parameters.

speed_page()[source]

Set the ui elements for the ‘speed’ analysis parameters.

spike_phase_page()[source]

Set the ui elements for the ‘spike_phase’ analysis parameters.

theta_cell_page()[source]

Set the ui elements for the ‘theta_cell’ analysis parameters.

theta_skip_cell_page()[source]

Set the ui elements for the ‘theta_skip_cell’ analysis parameters.

waveform_page()[source]

Set the ui elements for the ‘Waveform Analysis’ parameters.

class neurochat.nc_ui.UiResults(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog

NeuroChaT user interface for displaying the analysis results.

Also facilitates the exporting of results.

set_data(pd_model)[source]

Set the PandasModel as the data model for the table-view.

Parameters:pd_model (PandasModel) – PandasModel as the table-data
set_default()[source]

Not implemented.

Can be used for clearing the table and the data model underneath.

setup_ui()[source]

Set up the GUI elements of the widget and their behaviour.

Clicking on the ‘Export Results’ button calls the NeuroChaT_Ui.export_results() method.

See also

PandasModel()