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

Add exposure mode (auto/manual) for Pupil Cam 2 #1210

Merged
merged 3 commits into from Jul 2, 2018

Conversation

ChingT
Copy link
Contributor

@ChingT ChingT commented Jun 13, 2018

No description provided.

Copy link
Contributor

@papr papr left a comment

Choose a reason for hiding this comment

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

Hey @ChingT
This is great work! I added a few naming proposals with the goal to improve consistency in readability throughout our code base.

I am not 100% happy yet with my proposal. Please let me know what you think about it and if you would like to change my proposal.

try: controls_dict['Auto Exposure Mode'].value = 1
except KeyError: pass
# try: controls_dict['Auto Exposure Mode'].value = 1
# except KeyError: pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Were these lines commented for testing purposes or can they be deleted?

self.check_freq = 0.1/3
self.last_check_timestamp = None

def cal_exposure_time(self, frame):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to refactor the name to calculate_based_on_frame(). This would avoid redundant labeling.



class GetExposureTime(object):
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though PEP8 would agree with this naming it would be more consistent with all other class names in this project to rename this function to Get_Exposure_Time.

Additionally, I would like to propose to rename this to simply Exposure_Time. Together with the comments below this would yield this naming:

preferred_exposure_time = Exposure_Time(max_ET, frame_rate)
target = preferred_exposure_time.calculate_based_on_frame(frame)

self.checkframestripes = None
self.get_exposure_time = None
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to rename this instance variable to preferred_exposure_time


def frame_rate_getter():
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intended that the frame rate selector has been removed?

fix errors
@ChingT
Copy link
Contributor Author

ChingT commented Jun 29, 2018

@papr Thank you for the comments. I think they are nice proposals!

@mkassner mkassner merged commit 00e384d into pupil-labs:master Jul 2, 2018
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.

None yet

3 participants