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

Make all plots with time end at tstop #544

Open
ntolley opened this issue Aug 15, 2022 · 12 comments · May be fixed by #752
Open

Make all plots with time end at tstop #544

ntolley opened this issue Aug 15, 2022 · 12 comments · May be fixed by #752
Labels
good first issue Good for newcomers

Comments

@ntolley
Copy link
Contributor

ntolley commented Aug 15, 2022

Currently some of the plots like cell_response.plot_spikes_raster() do not end at tstop. This change will be useful for plotting functionality in the dashboard gui.

@jasmainak
Copy link
Collaborator

Does the cell_response object store tstop ?

@ntolley
Copy link
Contributor Author

ntolley commented Aug 15, 2022

It has the times attribute so we can just infer tstop from that

@jasmainak jasmainak added the good first issue Good for newcomers label Aug 15, 2022
@rythorpe
Copy link
Contributor

Is there a reason we didn't implement this before? (I feel like this came up in discussion at one point....)

@aritrasinha108
Copy link

Can I work on this?

@jasmainak
Copy link
Collaborator

sure, what functions will be affected by this?

@aritrasinha108
Copy link

I looked into all the plots that are defined inside hnn_core.viz. Among all the plots that plotted against time, there are three functions that are needed to be changed. they are:

  1. hnn_core.viz.plot_spike_raster
  2. hnn_core.viz.plot_connectivity_matrix
  3. hnn_core.viz.plot_laminar_csd

The other plots like plot_dipole, plot_laminar_lfp, plot_tfr_morlet, etc. have added time limits (if necessary) to their plots (both upper and lower) as tmin and tmax. I plan to follow a similar procedure so that all the other functions which are using the plot functions remain unchanged.

@jasmainak
Copy link
Collaborator

why would plot_connectivity_matrix have a tstop? Did you read the documentation related to this function?

@aritrasinha108
Copy link

aritrasinha108 commented Mar 4, 2023

Sorry, My bad. Only hnn_core.viz.plot_spike_raster and hnn_core.viz.plot_laminar_csd are required to have a tstop or a tmax. I have added a PR for this. Could you please look into it and see if I am in the right direction. Thanks

@rythorpe
Copy link
Contributor

rythorpe commented Mar 5, 2023

Sorry, My bad. Only hnn_core.viz.plot_spike_raster and hnn_core.viz.plot_laminar_csd are required to have a tstop or a tmax. I have added a PR for this. Could you please look into it and see if I am in the right direction. Thanks

I think you'll also need to add tmax to viz.plot_spikes_hist() - other than that lgtm!

@aritrasinha108
Copy link

Sorry, My bad. Only hnn_core.viz.plot_spike_raster and hnn_core.viz.plot_laminar_csd are required to have a tstop or a tmax. I have added a PR for this. Could you please look into it and see if I am in the right direction. Thanks

I think you'll also need to add tmax to viz.plot_spikes_hist() - other than that lgtm!

@rythorpe thanks a lot. I have added the parameters and refactored it accordingly for spikes_hist too in the PR.

@ntolley
Copy link
Contributor Author

ntolley commented Oct 11, 2023

@tianqi-cheng can you take a look at this as your next issue? If you read the discussion you'll see that there is an existing PR (#604 ) that is almost ready to be merged

Go ahead and read over the code/suggestions. Eventually you'll need to fetch the branch for that PR to your local computer so that you can push back changes to the existing PR: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@tianqi-cheng
Copy link

@tianqi-cheng can you take a look at this as your next issue? If you read the discussion you'll see that there is an existing PR (#604 ) that is almost ready to be merged

Go ahead and read over the code/suggestions. Eventually you'll need to fetch the branch for that PR to your local computer so that you can push back changes to the existing PR: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Got it! I will take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
5 participants