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

Updated the optomotor python script and the blueprint #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Opt_Moto.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def txt_to_xml(self):
self.experiment_dateTime.text = str(self.input_dateTime.get())

self.experiment_duration = tree.find("./metadata/experiment/duration")
self.experiment_duration.text = str(self.testtimebox.get())
self.experiment_duration.text = str(self.durationtime())

self.experiment_description = tree.find("./metadata/experiment/description")
self.experiment_description.text = str(self.input_ExperimentDescription.get())
Expand All @@ -540,7 +540,7 @@ def txt_to_xml(self):
type.text = "OptomotoR"
else:
type = et.SubElement(period, "type")
type.text = "OptomotoL"
type.text = "OptomotorL"
duration = et.SubElement(period, "duration")
duration.text = str(self.periodbox.get())
outcome = et.SubElement(period, "outcome")
Expand Down Expand Up @@ -571,6 +571,11 @@ def test_time(self):
self.testtime += 1
return self.testtime

def duration_time(self):
self.durationtime =60 * int(self.testtimebox.get()) # Multiply the total duration with 60 to get seconds.
# This data is later on added to the xml file
return self.durationtime

def give_curr_count(self):
status, curr_count, curr_index = ul.get_status(
self.board_num, FunctionType.AOFUNCTION)
Expand Down
6 changes: 3 additions & 3 deletions Optomotorics_blueprint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<duration></duration>
<description></description>
<sample_rate></sample_rate>
<arena_type>motor</arena_type>
<arena_type>Joystick</arena_type>
<meter_type></meter_type>
</experiment>
</metadata>
Expand All @@ -36,12 +36,12 @@
</CSV_descriptor>
<variables>
<variable number="1">
<type>fly</type>
<type>j_pos</type>
<var_type>float32</var_type>
<unit>arb_unit</unit>
</variable>
<variable number="2">
<type>arena</type>
<type>a_pos</type>
<var_type>float32</var_type>
<unit>arb_unit</unit>
</variable>
Expand Down