Skip to content

Conversation

@lschwetlick
Copy link
Collaborator

@lschwetlick lschwetlick commented Dec 25, 2024

I fixed the page for the Pooling utility in the docs.

There was a strange bug (?) in the plot_psychometric_function code which reversed the logic of smaller dots representing blocks with fewer stimulus levels. Its strange because it seemed very intentional. I changed it here, but if you can see any reason not to please let me know. That function was recently touched by @guillermoaguilar and @pberkes but the line seems to have been there since always.

Adresses issue #83

Copy link
Collaborator

@pberkes pberkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I added a could of minor comments.

Please also remove the file user_guides/Pooling-Utility , and its reference in _toc.yml. It refers to a work-in-progress page.


```{code-cell} ipython3
#act = pool_blocks(inp, max_tol=0.4, max_gap=10, max_length=10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is commented out, is it meant to show how the utility is called? Maybe introducing it with "the general form of the manual pooling utility looks like this:" might make sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


This brakes the large blocks up again allowing us to notice if there was more variability over time than expected.

The last option gives us a different rule to achieve something in a similar direction: We can enforce that a block must be collected en bloc like this:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I got this: a block can be of unlimited size, and there is a maximum gap of 0 between blocks? Is it not like the first case without options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one pools all trials within a tolerance. The next one pools only up to a block size of 25. The last one pools only subsequent trials. If I understand correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thanks. maybe "we can enforce to pool only subsequent trials", instead of "must be collected en block"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

# We added a factor of 1000 to make visually similar to the MATLAB version
size = np.sqrt(_data_size / data[:, 2])*(data_size*1000)
# We added a factor of 100 to make visually similar to the MATLAB version
size = np.sqrt(data[:, 2])*(data_size*100)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, the factor of 100-1000 was always there, and recently @guillermoaguilar added a data_size option in case this default is not good enough. Maybe we should move the factor directly in the keyword argument? I.e. make data_size = 100 by default, and then the user can adjust it if necessary

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh but I see now the "reversing" of the logic... it's true, it seems the wrong way around

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data_size and _data_size were two different values though. That was causing the problem.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, sorry I missed that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its true that we could abandon the 100 scaling factor... on the other hand its also intuitive to have the input value 1 be a reasonable size already. I dont mind either way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for changes, afaic

@pberkes
Copy link
Collaborator

pberkes commented Dec 25, 2024

LGTM

@lschwetlick
Copy link
Collaborator Author

Ok, fixed the phrasing on the one remaining point. Good to merge from my side!

@pberkes
Copy link
Collaborator

pberkes commented Dec 26, 2024

The changes look good. The log-space notebook now has a plot that looks like below for some reason... would mind fixing it please? then it can be merge, as far as I'm concerned

image

@pberkes
Copy link
Collaborator

pberkes commented Dec 27, 2024

LGTM

@pberkes pberkes merged commit 2e91a10 into wichmann-lab:main Dec 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants