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

Specifying Y-direction for FilterNet #394

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

shixnya
Copy link
Collaborator

@shixnya shixnya commented Jan 27, 2025

I've added a new feature in BMTK to be compatible with the LGN of the new V1 model that has Y-axis defined upward. Currently, BMTK uses the downward Y-axis implicitly, while defining the angle of the drifting gratings using upward Y-axis. This may cause confusion, so I tried to make it more optional and explicit.

I did not change the default behavior, but implemented the 'y_dir' option, and the generation of the drifting gratings respect this option. Also, when movie is imported to BMTK, it can be optionally flipped along the Y-axis to resolve compatibility between the typical image format that uses the downward Y-axis and the new LGN model that uses the upward Y-axis.

A few tests were added for these changes and the documentation was updated.

Also, I've fixed a strange behavior of the 'add_movie' method for 'movie' option and 'data_file' is not specified. This method was supposed to work when 'data' was specified instead of 'data_file', but it wasn't.

On the minor thing, the spelling error for 'grating' was fixed on the examples in BMTK, and FilterNet is now compatible with both 'grating' and 'grating' for backward compatibility.

Also added a function to flip y when movies are imported.

y_dir == 'down' is default, but 'up' should be used when LGN coordinate is defined as 'azimuth' and 'elevation', the way the new V1 model defines.

'graiting' is changed to 'grating'
('graiting' will still work.)
@shixnya shixnya requested a review from kaeldai January 27, 2025 18:19
Copy link
Collaborator

@kaeldai kaeldai left a comment

Choose a reason for hiding this comment

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

Quick review of code, everything looks good!

@kaeldai kaeldai merged commit 2872871 into AllenInstitute:develop Jan 27, 2025
5 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