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

Write blog explaining how to integrate datashuttle into existing pipelines. #413

Open
JoeZiminski opened this issue Sep 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@JoeZiminski
Copy link
Member

Add a blog on how to integrate datashuttle with an existing workflow (e.g. ids from pyrat). ATM it is difficult at first to understand how it is supposed to slot into an existing pipeline (for example, barefuly any experiemnts use an ID system of 001, 002... ETC instead using system (e.g. pyrat) IDs. So it must be clear how these play well together and how to integrate non-sub / ses ids into the pipeline, such as in the nice below example from Laura S.

def get_file_path():
    # get your project
    project = DataShuttle("social_sleaping")
    # create a prompt to enter the ID number
    # (which we will use to get the subject number)
    id_number = input("Enter ID number: ")
    sub = ID_DICT.get(id_number)
    # get your session number and create a new folder
    # for the session you are about to record.
    # the function get_next_ses() normally checks for the next session
    # if you are recording for a new subject you can use it as well to create
    # the first session folder for this subject.
    session = project.get_next_ses(top_level_folder="rawdata",
                                   sub=f"sub-{sub}_id-{id_number}")
    # create the folders
    created_folders = project.create_folders(
        top_level_folder="rawdata",
        sub_names=f"sub-{sub}_id-{id_number}",
        ses_names=f"{session}_@DATETIME@",
        datatype=["behav"]
    )
    # create a prompt to enter the experiment information and
    # conspecific ID for social experiments.
    # (this is only important for the video file name and might not be
    # relevant for you.)
    exp_number = input("Enter Experiment condition: ")
    comsp_id = input("Enter Conspecific ID: ")
    # print the start of your acquisition
    start = datetime.now()
    print(datetime.now())
    # create the video file name
    file_name_video_1 = f"{exp_number}_{comsp_id}_camera1.avi"
    # create the path to the video file
    file_path1 = created_folders['behav'][0] / file_name_video_1
    file_path1.touch()
    return file_path1
@JoeZiminski JoeZiminski added the enhancement New feature or request label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant