Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Matlab 2017a nargout bug #86

Open
Nabarb opened this issue May 11, 2020 · 0 comments
Open

[BUG] Matlab 2017a nargout bug #86

Nabarb opened this issue May 11, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Nabarb
Copy link
Collaborator

Nabarb commented May 11, 2020

Bug Report

Description

This happens when a method is called with "dot" reference and is caused by the builtin numArgumentsFromSubscript not behaving as expected. Instead of returning the correct nargout it basically returns numel(nigelObj) creating all sorts of problems, such as "the too many output args" when calling tankObj.nigelDash from base.

Release or Branch

All of them.

Machine

  • OS: Win-64 (64-bit)
  • Matlab Version: R2017* and maybe later as well. 2019b and 2020 are not affected.
@Nabarb Nabarb added the bug Something isn't working label May 11, 2020
Nabarb added a commit that referenced this issue May 11, 2020
This tries to fix the bug #86 emerging in matlab 2017 editions (and maybe others) where the builtin numArgumentsFromSubscript is not behaving as expected, Instead of returning the correct nargout it basically returns numel(nigelObj) creating all sorts of problems, such as the too many output args when calling tankObj.nigelDash from base.

This solution relies on the number of declared args in the method declaration to determine nargout at this stage. This does not affect the effective number of output arguments which are still controlled by the number of variables on the left of an assignment. Bear in mind that this will effect the number of output args when called without an explicit assignment.
Nabarb pushed a commit that referenced this issue May 14, 2020
Fixed small bug in buildWorkerCoonfigScript. Now works as intended, it was getting the two modalities mixed up.

Fixed ismethod issue in numArgsFromSub. in nigelObj. references #86.
m053m716 pushed a commit that referenced this issue Nov 2, 2020
* Proposed fix for 2017 nargout bug

This tries to fix the bug #86 emerging in matlab 2017 editions (and maybe others) where the builtin numArgumentsFromSubscript is not behaving as expected, Instead of returning the correct nargout it basically returns numel(nigelObj) creating all sorts of problems, such as the too many output args when calling tankObj.nigelDash from base.

This solution relies on the number of declared args in the method declaration to determine nargout at this stage. This does not affect the effective number of output arguments which are still controlled by the number of variables on the left of an assignment. Bear in mind that this will effect the number of output args when called without an explicit assignment.

* fixes

Fixed small bug in buildWorkerCoonfigScript. Now works as intended, it was getting the two modalities mixed up.

Fixed ismethod issue in numArgsFromSub. in nigelObj. references #86.

* Critical fix in rereferencing

Found a critical in rereferencing that was actually preventing the rereferencing from happening.

* bugfix getspiketime (when sorted)

getspiketime was returning an empty array ehen called with optional "class" input. (Was looking at the wrong field of the event file)

fixed.

* Feature/new sort (#88)

* Sort new features

Added a pletora of features to the Sort interface.
Fixed and improved the way the SortFiles are saved and loaded, (getClus getSort). Fixed small bugs here and there,

HighDimsUi now has the same interface language as dashboard (with nigelpanels etc). A new button was added to find the most convenient projection according to LDA. When pressed moves the plane visualized in featuresUI in the position that best separates the selected cluster.
Thanks DataHigh!

ginput
Changed the cross-hair color to improve visibility.

multicallbackwrap wasn't really working. fixed.

NigelButton
fixed a small bug that was overwriting WindowButtonUpFnc of the figure it was put on. Now it uses multiCallbackWrap to avoid overwriting.
FaturesUI
The 2D graph now cna be zoomed and panned. Use the MouseWheel to zoom. MouseWheel + alt or control to pan horizontally and vertically.

Saving performance greatly improved by saving only the clusters that actually need saving. Each channels starts with a UnsavedChanges target to false and a ConfirmedChanges to false. When a change is done the UnsavedChanges goes to true. When confirmed, ConfirmedChanges goes to true.
SpikeImage; SortUi;

* Fixed zooming in FeaturesUI

Now the two graphs have linked axes that change and shift together.

Also, navigation is now homogeneous between the two figures

* Fixed bug in Sort/savedata

fixed a bug in savedata. Program was crashing when a channel was turned off in mask

* performance update

Small performance update in plotting and updating spike profiles and features.

* Added pca and random projection

Added the possibility to project data onto the plane of max variance as well as to a random projection plane.

This is accessible from the HighDimsUi

* Feature/new sd (#92)

# New Spike Detection
Added by: Federico (FB)

## Features
### Change in Structure
`doSD` has been essentially re-written. 
* All the SD algorithms were moved to their own functions in the block private folder. 
* The same was done for feature extraction and artifact rejection.

#### Motivation
We want the pipeline to be more flexible, particularly in the spike detection step where many labs or users have their own preferred method. Reorganizing the structure of `doSD` in this way allows the specification of SD choices both in the `defaults.SD` file, as well as on an ad hoc basis through a user interface.

#### To-Do
* A short wiki entry will follow with the style specifications and naming convention of the files.

### Spike Detection Algorithm Updates
* Revised and fixed `AdaptThresh`, `HardThresh`, `SNEO`, and `TIFCO`.
* Fixed associated `SD` parameters.

### `configSD`
Added a GUI to configure the SD parameters. 

#### Strategy
It randomly extracts 1 minute of data from the recording, providing a graphical interface that displays the data and any spikes detected as the end-user tries different parameter configurations until they are satisfied that the current parameter settings can detect spikes well in the data.  and you can try different parameters on the extracted data.
* Artifact rejection parameters can be selected in the same way.
* The "current channel" can be changed by the end-user.

* noncritical bugfixes

Fixed a potential bug in rereferencing

Changed swtteo to compute wavelet coefficient at runtime instead of during the parameters loading. This makes it possible to try different wavelets in the configSD intereface

* bugfix

Fixed a couple of glitches in the configSD interface,
Also, SD defaults are modified to some more sensible values

* Fixed plotwaves

* Explore data class added

Added the explore data class to view snippets of data interactively.

added datascrollerAxis class: mimics timescrolleraxis but with data instead of events and videos.It's used by exploredata class.

added the possibility of plotting plotWaves into an existing axis

* plotWaves reducees plots

Now plotwaves reduces plots as well. Zooming is not suggested because of this. Inside the ExplroeData utility zooming is handled from the dataScrollerAxis

dataScrollerAxis now uses the full lineplotreducer utility and zooming is therefore enabled

Also fixed a small issue with nigelColors

* bigfix

Fixed small bugs and glitches for plotWaves and DataScrollerAxis

* Spike Overlay

Added the spike Overlay for plotWaved. It works by purgin the y-reduced signal by all non spike parts and plotting it on top of either CAR or Filt already plotted.
It is selected by passing Spikes as first input

* exploreData bugfix

fixed small glitch

* Updates to get RMS values of filtered data

* not sure if change to analyzeRMS.m is technically correct, but it ran
*updated block methods list to reflect changes in plotWaves

* Visualization bugfix

Added the empty case to ToString

Added a fialsafe in case time is not set properly in block.
fixed the usage of reduce_to_width

Co-authored-by: Federico <[email protected]>
Co-authored-by: Page Hayley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants