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

Empty/initialize fields #1248

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Empty/initialize fields #1248

wants to merge 1 commit into from

Conversation

XX-Yin
Copy link
Collaborator

@XX-Yin XX-Yin commented Dec 23, 2024

Pull Request instructions:

  • Please follow the update protocol
  • Answer the questions below in detail. Your responses will be emailed to experimenters.
  • If the experimenters must do anything new, provide detailed step by step instructions on the wiki
  • If computer maintainers need to manually update anything, provide detailed step by step instructions
  • Use markdown syntax in order for your comments to be rendered reliably in the email: "1." instead of "1)", use four spaces for indents.
  • If you use the keyword "skip email" in the title, it will skip the email updates
  • Merges from "develop" into "production_testing" should use the keyword "production merge" in the title for reliable indexing of updates
  • Merges from "production_testing" into "main" should use the keyword "update main"

Describe changes:

Clear/initialize some fields when starting a new session.

What issues or discussions does this update address?

To clear or initialize certain fields from previous sessions when the new session is started without restarting the GUI. These fields may interfere with the generation of the manifest file if not reset.

Describe the expected change in behavior from the perspective of the experimenter

No

Describe any manual update steps for task computers

No

Was this update tested in 446/447?

Tested on 323_Ephys3

@alexpiet
Copy link
Collaborator

@micahwoodard Can you please review this?

if not self.Camera_dialog.StartRecording.isChecked():
self.Camera_dialog.camera_start_time=''
self.Camera_dialog.camera_stop_time=''
# clear fiber start and end time
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't quite know the downstream effect but would these variables be better initialized as None? seems weird to me that they are just empty stings but maybe that is what the code is expecting downstream

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also does this fix #1124?

self.Camera_dialog.camera_stop_time=''
# clear fiber start and end time
if hasattr(self, 'fiber_photometry_end_time'):
del self.fiber_photometry_end_time
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we deleting this one and not clearing it like the others?

if not self.StartExcitation.isChecked():
if hasattr(self, 'fiber_photometry_start_time'):
del self.fiber_photometry_start_time

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here

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.

3 participants