Skip to content

WIP: Webform#2

Closed
jakirkham wants to merge 2 commits intoDudLab:gh_pagesfrom
jakirkham:gh_pages
Closed

WIP: Webform#2
jakirkham wants to merge 2 commits intoDudLab:gh_pagesfrom
jakirkham:gh_pages

Conversation

@jakirkham
Copy link
Member

@jakirkham jakirkham commented Jul 28, 2016

Provides a simple webform that one can fill out online and download a JSON config file from. To see a live demo, please follow this link.

@dudmanj
Copy link

dudmanj commented Jul 28, 2016

This is the way my matlab code writes the json for the config file (some naming differences that we can correct). is this formatting similar to how you are generating the file?

{"position":{"y":{"ch":138},"x":{"ch":137}},"rigName":"Josh_v0","events":{"reward":{"ch":142},"stim1":{"ch":0},"stim2":{"ch":0},"trial":{"ch":0},"threshold":{"ch":143}},"water_port":{"ch":139}}

On Jul 28, 2016, at 10:21 AM, jakirkham notifications@github.com wrote:

Provides a simple webform that one can fill out online and download a JSON config file from.

You can view, comment on, or merge this pull request online at:
  #2
Commit Summary

Create a webpage to fill out the config file and download as JSON. Disable Jekyll.
File Changes

A
.nojekyll (0) A
index.html (35) A
js/submit.js (46)
Patch Links:

https://github.com/DudLab/lab_config/pull/2.patch
https://github.com/DudLab/lab_config/pull/2.diff


You are receiving this because you are subscribed to this thread.
Reply to this email directly,
view it on GitHub, or
mute the thread.

@jakirkham
Copy link
Member Author

jakirkham commented Jul 28, 2016

Right now the format is the same as the other PR ( #1 ). Just one big object with keywords for each field and their values. We could certainly change the format if you want. Here is an example of the file it will give you below.

{
    "Rig_Name": "Falcon",
    "User": "Luke Skywalker",
    "Proj_Code": "Force",
    "Rec_Sys": "BlackRock_Cerebus",
    "Behav_Code_Ver": "1.0.0",
    "NS_Path": "/home/lskywalker/data/ns",
    "Behav_Path": "/home/lskywalker/data/bhv",
    "Jpos_X_Ch": "0",
    "Jpos_Y_Ch": "1",
    "Mpos_X_Ch": "2",
    "Mpos_Y_Ch": "3",
    "Lick_Ch": "4",
    "Rew_Ch": "5",
    "Trial_Start_Ch": "6",
    "Trial_Event_Ch": "7"
}

Edit: Basically just a one-to-one mapping from the Excel file.

@jakirkham jakirkham changed the title Webform WIP: Webform Jul 28, 2016
@dudmanj
Copy link

dudmanj commented Jul 28, 2016

ok. I can make it more verbose like this.

josh

On Jul 28, 2016, at 10:38 AM, jakirkham notifications@github.com wrote:

Right now the format is the same as the other PR (
#1 ). Just one big object with keywords for each field and their values. We could certainly change the format if you want. Here is an example of the file it will give you below.

{
"Rig_Name": "Falcon",
"User": "Luke Skywalker",
"Proj_Code": "Force",
"Rec_Sys": "BlackRock_Cerebus",
"Behav_Code_Ver": "1.0.0",
"NS_Path": "/home/lskywalker/data/ns",
"Behav_Path": "/home/lskywalker/data/bhv",
"Jpos_X_Ch": "0",
"Jpos_Y_Ch": "1",
"Mpos_X_Ch": "2",
"Mpos_Y_Ch": "3",
"Lick_Ch": "4",
"Rew_Ch": "5",
"Trial_Start_Ch": "6",
"Trial_Event_Ch": "7"
}


You are receiving this because you commented.
Reply to this email directly,
view it on GitHub, or
mute the thread.

@dudmanj
Copy link

dudmanj commented Jul 28, 2016

We need to add some additional fields

Stim1, Stim2, Trial_Start, Operant_Event1, Operant_Event2

@dudmanj
Copy link

dudmanj commented Jul 28, 2016

Also somewhere in directions should mention that user can enter a 0 for any channel that is unused in a particular configuration

@jakirkham
Copy link
Member Author

Stim1, Stim2, Trial_Start, Operant_Event1, Operant_Event2

Any preference on where they live? Just add to the end?

Also somewhere in directions should mention that user can enter a 0 for any channel that is unused in a particular configuration

Sure. We could have channels default to 0. That way, no action is required for those channels.

@dudmanj
Copy link

dudmanj commented Jul 28, 2016

ok default to 0

Grouping of variables would be nice:

Stim_, Operant_ (replaces Trial_Event), Trial_Start, Rew, Lick are all events 
Pos_, Mpos_, Water_Port, LaserPower* are continuous data

On Jul 28, 2016, at 2:19 PM, jakirkham notifications@github.com wrote:

Stim1, Stim2, Trial_Start, Operant_Event1, Operant_Event2

Any preference on where they live? Just add to the end?

Also somewhere in directions should mention that user can enter a 0 for any channel that is unused in a particular configuration

Sure. We could have channels default to 0. That way, no action is required for those channels.

You are receiving this because you commented.
Reply to this email directly,
view it on GitHub, or
mute the thread.

@jakirkham
Copy link
Member Author

Replacing with PR ( #3 ). Needed - instead of an _ in the branch names.

@jakirkham jakirkham closed this Jul 28, 2016
@jakirkham jakirkham deleted the gh_pages branch July 28, 2016 18:52
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